Class Socialveo\Core\library\payment\adapter\PayPalAdapter

InheritanceSocialveo\Core\library\payment\adapter\PayPalAdapter » Socialveo\Core\library\payment\adapter\PaymentAdapter

Class PayPalAdapter

Property Details

$apiContext protected property

Method Details

__construct() public method

Stripe constructor.

public void __construct ( )
charge() public method

Create payment

public array charge ( $user, $data )
$user Socialveo\Core\models\User
$data array
throws Exception
checkPaymentAmount() public method

Check payment amount

public void checkPaymentAmount ( $payment, $amount )
$payment Socialveo\Core\models\Payment
$amount \PayPal\Api\Amount|\PayPal\Api\Currency
throws Exception
getApiContext() public method

Returns PayPal ApiContext

public \PayPal\Rest\ApiContext getApiContext ( )
parseUrlToken() public static method

Parse token from url

public static string|false parseUrlToken ( $url )
$url string
subscription() public method

Create subscription

public array subscription ( $user, $data )
$user Socialveo\Core\models\User
$data array
throws Exception
updatePayment() public method

Update payment after form validation

public \PayPal\Api\Payment updatePayment ( $payment, $charge, &$history = [] )
$payment Socialveo\Core\models\Payment
$charge \PayPal\Api\Agreement|\PayPal\Api\Payment
$history array
throws Exception
updateSubscription() public method

Update subscription

public void updateSubscription ( $payment )
$payment \PayPal\Api\Payment
validatePaymentToken() public method

Validate payment token

public boolean validatePaymentToken ( $payment, $token, $paymentID null )
$payment Socialveo\Core\models\Payment
$token string
$paymentID string