forked from LiveCarta/PayPal-PHP-SDK
Merge branch 'irfanevrens-master'
This commit is contained in:
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Address
|
* Class Address
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -4,10 +4,9 @@ namespace PayPal\Api;
|
|||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Core\PayPalConstants;
|
use PayPal\Core\PayPalConstants;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Api\AgreementTransactions;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Agreement
|
* Class Agreement
|
||||||
|
|||||||
@@ -3,10 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Api\Capture;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Authorization
|
* Class Authorization
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BankAccount
|
* Class BankAccount
|
||||||
|
|||||||
@@ -3,10 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Api\Refund;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Capture
|
* Class Capture
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
use PayPal\Common\PayPalModel;
|
||||||
use PayPal\Validation\NumericValidator;
|
|
||||||
use PayPal\Converter\FormatConverter;
|
use PayPal\Converter\FormatConverter;
|
||||||
|
use PayPal\Validation\NumericValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Cost
|
* Class Cost
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
use PayPal\Validation\ArgumentValidator;
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreditCard
|
* Class CreditCard
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
use PayPal\Common\PayPalModel;
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreditCardHistory
|
* Class CreditCardHistory
|
||||||
@@ -12,7 +11,7 @@ use PayPal\Rest\ApiContext;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property \PayPal\Api\CreditCard credit_cards
|
* @property \PayPal\Api\CreditCard[] credit_cards
|
||||||
* @property int count
|
* @property int count
|
||||||
* @property string next_id
|
* @property string next_id
|
||||||
*/
|
*/
|
||||||
@@ -20,10 +19,9 @@ class CreditCardHistory extends PayPalModel
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* A list of credit card resources
|
* A list of credit card resources
|
||||||
*
|
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\CreditCard $credit-cards
|
*
|
||||||
*
|
* @param \PayPal\Api\CreditCard[] $credit_cards
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCreditCards($credit_cards)
|
public function setCreditCards($credit_cards)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
use PayPal\Validation\UrlValidator;
|
use PayPal\Validation\UrlValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class InvoiceAddress
|
* Class InvoiceAddress
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -5,11 +5,20 @@ namespace PayPal\Api;
|
|||||||
use PayPal\Common\PayPalModel;
|
use PayPal\Common\PayPalModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Class OpenIdAddress
|
||||||
|
*
|
||||||
* End-User's preferred address.
|
* End-User's preferred address.
|
||||||
|
*
|
||||||
|
* @package PayPal\Api
|
||||||
|
*
|
||||||
|
* @property string street_address
|
||||||
|
* @property string locality
|
||||||
|
* @property string region
|
||||||
|
* @property string postal_code
|
||||||
|
* @property string country
|
||||||
*/
|
*/
|
||||||
class OpenIdAddress extends PayPalModel
|
class OpenIdAddress extends PayPalModel
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Full street address component, which may include house number, street name.
|
* Full street address component, which may include house number, street name.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -4,7 +4,13 @@ namespace PayPal\Api;
|
|||||||
use PayPal\Common\PayPalModel;
|
use PayPal\Common\PayPalModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Class OpenIdError
|
||||||
|
*
|
||||||
* Error resource
|
* Error resource
|
||||||
|
*
|
||||||
|
* @property string error
|
||||||
|
* @property string error_description
|
||||||
|
* @property string error_uri
|
||||||
*/
|
*/
|
||||||
class OpenIdError extends PayPalModel
|
class OpenIdError extends PayPalModel
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,13 +12,15 @@ class OpenIdSession
|
|||||||
* Returns the PayPal URL to which the user must be redirected to
|
* Returns the PayPal URL to which the user must be redirected to
|
||||||
* start the authentication / authorization process.
|
* start the authentication / authorization process.
|
||||||
*
|
*
|
||||||
* @param string $redirectUri Uri on merchant website to where
|
* @param string $redirectUri Uri on merchant website to where
|
||||||
* the user must be redirected to post paypal login
|
* the user must be redirected to post paypal login
|
||||||
* @param array $scope The access privilges that you are requesting for
|
* @param array $scope The access privilges that you are requesting for
|
||||||
* from the user. Pass empty array for all scopes.
|
* from the user. Pass empty array for all scopes.
|
||||||
* @param string $clientId client id from developer portal
|
* @param string $clientId client id from developer portal
|
||||||
* See https://developer.paypal.com/webapps/developer/docs/integration/direct/log-in-with-paypal/detailed/#attributes for more
|
* See https://developer.paypal.com/webapps/developer/docs/integration/direct/log-in-with-paypal/detailed/#attributes for more
|
||||||
* @param ApiContext $apiContext Optional API Context
|
* @param null $nonce
|
||||||
|
* @param null $state
|
||||||
|
* @param ApiContext $apiContext Optional API Context
|
||||||
* @return string Authorization URL
|
* @return string Authorization URL
|
||||||
*/
|
*/
|
||||||
public static function getAuthorizationUrl($redirectUri, $scope, $clientId, $nonce = null, $state = null, $apiContext = null)
|
public static function getAuthorizationUrl($redirectUri, $scope, $clientId, $nonce = null, $state = null, $apiContext = null)
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Class OpenIdTokeninfo
|
||||||
|
*
|
||||||
* Token grant resource
|
* Token grant resource
|
||||||
|
*
|
||||||
|
* @property string scope
|
||||||
|
* @property string access_token
|
||||||
|
* @property string refresh_token
|
||||||
|
* @property string token_type
|
||||||
|
* @property string id_token
|
||||||
|
* @property int expires_in
|
||||||
*/
|
*/
|
||||||
class OpenIdTokeninfo extends PayPalResourceModel
|
class OpenIdTokeninfo extends PayPalResourceModel
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,31 @@ use PayPal\Common\PayPalResourceModel;
|
|||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Class OpenIdUserinfo
|
||||||
|
*
|
||||||
* OpenIdConnect UserInfo Resource
|
* OpenIdConnect UserInfo Resource
|
||||||
|
*
|
||||||
|
* @property string user_id
|
||||||
|
* @property string sub
|
||||||
|
* @property mixed name
|
||||||
|
* @property string given_name
|
||||||
|
* @property string family_name
|
||||||
|
* @property string middle_name
|
||||||
|
* @property string picture
|
||||||
|
* @property string email
|
||||||
|
* @property bool email_verified
|
||||||
|
* @property string gender
|
||||||
|
* @property string birthday
|
||||||
|
* @property string zoneinfo
|
||||||
|
* @property string locale
|
||||||
|
* @property string language
|
||||||
|
* @property bool verified
|
||||||
|
* @property string phone_number
|
||||||
|
* @property OpenIdAddress address
|
||||||
|
* @property mixed verified_account
|
||||||
|
* @property mixed account_type
|
||||||
|
* @property string age_range
|
||||||
|
* @property string payer_id
|
||||||
*/
|
*/
|
||||||
class OpenIdUserinfo extends PayPalResourceModel
|
class OpenIdUserinfo extends PayPalResourceModel
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,11 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Api\Capture;
|
|
||||||
use PayPal\Api\Authorization;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Order
|
* Class Order
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
use PayPal\Common\PayPalModel;
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Payee
|
* Class Payee
|
||||||
|
|||||||
@@ -4,11 +4,9 @@ namespace PayPal\Api;
|
|||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Core\PayPalConstants;
|
use PayPal\Core\PayPalConstants;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Api\object;
|
|
||||||
use PayPal\Api\PaymentHistory;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Payment
|
* Class Payment
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class PaymentInstruction
|
* Class PaymentInstruction
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
use PayPal\Validation\ArgumentValidator;
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Payout
|
* Class Payout
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class PayoutItem
|
* Class PayoutItem
|
||||||
|
|||||||
@@ -4,10 +4,9 @@ namespace PayPal\Api;
|
|||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
use PayPal\Common\PayPalModel;
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Api\PlanList;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Plan
|
* Class Plan
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Refund
|
* Class Refund
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Sale
|
* Class Sale
|
||||||
@@ -15,6 +15,7 @@ use PayPal\Transport\PayPalRestCall;
|
|||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string id
|
* @property string id
|
||||||
|
* @property string purchase_unit_reference_id
|
||||||
* @property string create_time
|
* @property string create_time
|
||||||
* @property string update_time
|
* @property string update_time
|
||||||
* @property \PayPal\Api\Amount amount
|
* @property \PayPal\Api\Amount amount
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ShippingAddress
|
* Class ShippingAddress
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class TransactionBase
|
* Class TransactionBase
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
use PayPal\Common\PayPalModel;
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Transactions
|
* Class Transactions
|
||||||
|
|||||||
@@ -3,10 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Api\CreateProfileResponse;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class WebProfile
|
* Class WebProfile
|
||||||
|
|||||||
@@ -3,10 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Api\WebhookList;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
use PayPal\Validation\UrlValidator;
|
use PayPal\Validation\UrlValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ namespace PayPal\Api;
|
|||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Exception\PayPalConnectionException;
|
use PayPal\Exception\PayPalConnectionException;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
use PayPal\Validation\JsonValidator;
|
use PayPal\Validation\JsonValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,10 +3,9 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Api\WebhookEventList;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class WebhookEventType
|
* Class WebhookEventType
|
||||||
|
|||||||
@@ -198,12 +198,14 @@ class OAuthTokenCredential extends PayPalResourceModel
|
|||||||
if ($response != null && isset($response["refresh_token"])) {
|
if ($response != null && isset($response["refresh_token"])) {
|
||||||
return $response['refresh_token'];
|
return $response['refresh_token'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates Access Token based on given input
|
* Updates Access Token based on given input
|
||||||
*
|
*
|
||||||
* @param $config
|
* @param array $config
|
||||||
* @param string|null $refreshToken
|
* @param string|null $refreshToken
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -251,6 +253,7 @@ class OAuthTokenCredential extends PayPalResourceModel
|
|||||||
* Generates a new access token
|
* Generates a new access token
|
||||||
*
|
*
|
||||||
* @param array $config
|
* @param array $config
|
||||||
|
* @param null|string $refreshToken
|
||||||
* @return null
|
* @return null
|
||||||
* @throws PayPalConnectionException
|
* @throws PayPalConnectionException
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace PayPal\Common;
|
namespace PayPal\Common;
|
||||||
use PayPal\Handler\IPayPalHandler;
|
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
use PayPal\Rest\IResource;
|
use PayPal\Rest\IResource;
|
||||||
use PayPal\Transport\PayPalRestCall;
|
use PayPal\Transport\PayPalRestCall;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class PayPalResourceModel
|
* Class PayPalResourceModel
|
||||||
* An Executable PayPalModel Class
|
* An Executable PayPalModel Class
|
||||||
|
|||||||
@@ -93,6 +93,8 @@ class PayPalHttpConnection
|
|||||||
switch ($this->httpConfig->getMethod()) {
|
switch ($this->httpConfig->getMethod()) {
|
||||||
case 'POST':
|
case 'POST':
|
||||||
curl_setopt($ch, CURLOPT_POST, true);
|
curl_setopt($ch, CURLOPT_POST, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
||||||
|
break;
|
||||||
case 'PUT':
|
case 'PUT':
|
||||||
case 'PATCH':
|
case 'PATCH':
|
||||||
case 'DELETE':
|
case 'DELETE':
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PayPal\Transport;
|
namespace PayPal\Transport;
|
||||||
|
|
||||||
use PayPal\Core\PayPalLoggingManager;
|
|
||||||
use PayPal\Core\PayPalHttpConfig;
|
use PayPal\Core\PayPalHttpConfig;
|
||||||
use PayPal\Core\PayPalHttpConnection;
|
use PayPal\Core\PayPalHttpConnection;
|
||||||
|
use PayPal\Core\PayPalLoggingManager;
|
||||||
use PayPal\Rest\ApiContext;
|
use PayPal\Rest\ApiContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,12 +12,12 @@
|
|||||||
$createdPlan = require 'UpdatePlan.php';
|
$createdPlan = require 'UpdatePlan.php';
|
||||||
|
|
||||||
use PayPal\Api\Agreement;
|
use PayPal\Api\Agreement;
|
||||||
use PayPal\Api\Plan;
|
|
||||||
use PayPal\Api\Payer;
|
|
||||||
use PayPal\Api\ShippingAddress;
|
|
||||||
use PayPal\Api\PayerInfo;
|
|
||||||
use PayPal\Api\CreditCard;
|
use PayPal\Api\CreditCard;
|
||||||
use PayPal\Api\FundingInstrument;
|
use PayPal\Api\FundingInstrument;
|
||||||
|
use PayPal\Api\Payer;
|
||||||
|
use PayPal\Api\PayerInfo;
|
||||||
|
use PayPal\Api\Plan;
|
||||||
|
use PayPal\Api\ShippingAddress;
|
||||||
|
|
||||||
/* Create a new instance of Agreement object
|
/* Create a new instance of Agreement object
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
$createdPlan = require 'UpdatePlan.php';
|
$createdPlan = require 'UpdatePlan.php';
|
||||||
|
|
||||||
use PayPal\Api\Agreement;
|
use PayPal\Api\Agreement;
|
||||||
use PayPal\Api\Plan;
|
|
||||||
use PayPal\Api\Payer;
|
use PayPal\Api\Payer;
|
||||||
|
use PayPal\Api\Plan;
|
||||||
use PayPal\Api\ShippingAddress;
|
use PayPal\Api\ShippingAddress;
|
||||||
|
|
||||||
/* Create a new instance of Agreement object
|
/* Create a new instance of Agreement object
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
// API used: /v1/payments/billing-plans
|
// API used: /v1/payments/billing-plans
|
||||||
|
|
||||||
require __DIR__ . '/../bootstrap.php';
|
require __DIR__ . '/../bootstrap.php';
|
||||||
use PayPal\Api\Plan;
|
|
||||||
use PayPal\Api\PaymentDefinition;
|
|
||||||
use PayPal\Api\MerchantPreferences;
|
|
||||||
use PayPal\Api\Currency;
|
|
||||||
use PayPal\Api\ChargeModel;
|
use PayPal\Api\ChargeModel;
|
||||||
|
use PayPal\Api\Currency;
|
||||||
|
use PayPal\Api\MerchantPreferences;
|
||||||
|
use PayPal\Api\PaymentDefinition;
|
||||||
|
use PayPal\Api\Plan;
|
||||||
|
|
||||||
// Create a new instance of Plan object
|
// Create a new instance of Plan object
|
||||||
$plan = new Plan();
|
$plan = new Plan();
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
$createdAgreement = require 'CreateBillingAgreementWithCreditCard.php';
|
$createdAgreement = require 'CreateBillingAgreementWithCreditCard.php';
|
||||||
|
|
||||||
use PayPal\Api\Agreement;
|
use PayPal\Api\Agreement;
|
||||||
use PayPal\Api\PatchRequest;
|
|
||||||
use PayPal\Api\Patch;
|
use PayPal\Api\Patch;
|
||||||
|
use PayPal\Api\PatchRequest;
|
||||||
|
|
||||||
$patch = new Patch();
|
$patch = new Patch();
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,11 @@
|
|||||||
/** @var Plan $createdPlan */
|
/** @var Plan $createdPlan */
|
||||||
$createdPlan = require 'CreatePlan.php';
|
$createdPlan = require 'CreatePlan.php';
|
||||||
|
|
||||||
use PayPal\Api\Plan;
|
|
||||||
use PayPal\Api\PatchRequest;
|
|
||||||
use PayPal\Api\Patch;
|
use PayPal\Api\Patch;
|
||||||
|
use PayPal\Api\PatchRequest;
|
||||||
|
use PayPal\Api\Plan;
|
||||||
use PayPal\Common\PayPalModel;
|
use PayPal\Common\PayPalModel;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$patch = new Patch();
|
$patch = new Patch();
|
||||||
|
|
||||||
|
|||||||
@@ -13,9 +13,9 @@
|
|||||||
/** @var Plan $createdPlan */
|
/** @var Plan $createdPlan */
|
||||||
$createdPlan = require 'CreatePlan.php';
|
$createdPlan = require 'CreatePlan.php';
|
||||||
|
|
||||||
use PayPal\Api\Plan;
|
|
||||||
use PayPal\Api\PatchRequest;
|
|
||||||
use PayPal\Api\Patch;
|
use PayPal\Api\Patch;
|
||||||
|
use PayPal\Api\PatchRequest;
|
||||||
|
use PayPal\Api\Plan;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$patch = new Patch();
|
$patch = new Patch();
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ if (!file_exists($composerAutoload)) {
|
|||||||
require $composerAutoload;
|
require $composerAutoload;
|
||||||
require __DIR__ . '/common.php';
|
require __DIR__ . '/common.php';
|
||||||
|
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
use PayPal\Auth\OAuthTokenCredential;
|
use PayPal\Auth\OAuthTokenCredential;
|
||||||
|
use PayPal\Rest\ApiContext;
|
||||||
|
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
ini_set('display_errors', '1');
|
ini_set('display_errors', '1');
|
||||||
|
|||||||
@@ -4,14 +4,6 @@
|
|||||||
Common functions used across samples
|
Common functions used across samples
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use PayPal\Api\Address;
|
|
||||||
use PayPal\Api\CreditCard;
|
|
||||||
use PayPal\Api\Amount;
|
|
||||||
use PayPal\Api\Payer;
|
|
||||||
use PayPal\Api\Payment;
|
|
||||||
use PayPal\Api\Transaction;
|
|
||||||
use PayPal\Api\FundingInstrument;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper Class for Printing Results
|
* Helper Class for Printing Results
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
/** @var Invoice $invoice */
|
/** @var Invoice $invoice */
|
||||||
$invoice = require 'SendInvoice.php';
|
$invoice = require 'SendInvoice.php';
|
||||||
|
|
||||||
use PayPal\Api\Invoice;
|
|
||||||
use PayPal\Api\CancelNotification;
|
use PayPal\Api\CancelNotification;
|
||||||
|
use PayPal\Api\Invoice;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|||||||
@@ -5,17 +5,17 @@
|
|||||||
// an invoice.
|
// an invoice.
|
||||||
|
|
||||||
require __DIR__ . '/../bootstrap.php';
|
require __DIR__ . '/../bootstrap.php';
|
||||||
use PayPal\Api\Cost;
|
|
||||||
use PayPal\Api\Invoice;
|
|
||||||
use PayPal\Api\MerchantInfo;
|
|
||||||
use PayPal\Api\BillingInfo;
|
|
||||||
use PayPal\Api\InvoiceItem;
|
|
||||||
use PayPal\Api\Phone;
|
|
||||||
use PayPal\Api\Address;
|
use PayPal\Api\Address;
|
||||||
|
use PayPal\Api\BillingInfo;
|
||||||
|
use PayPal\Api\Cost;
|
||||||
use PayPal\Api\Currency;
|
use PayPal\Api\Currency;
|
||||||
use PayPal\Api\PaymentTerm;
|
use PayPal\Api\Invoice;
|
||||||
use PayPal\Api\ShippingInfo;
|
|
||||||
use PayPal\Api\InvoiceAddress;
|
use PayPal\Api\InvoiceAddress;
|
||||||
|
use PayPal\Api\InvoiceItem;
|
||||||
|
use PayPal\Api\MerchantInfo;
|
||||||
|
use PayPal\Api\PaymentTerm;
|
||||||
|
use PayPal\Api\Phone;
|
||||||
|
use PayPal\Api\ShippingInfo;
|
||||||
|
|
||||||
$invoice = new Invoice();
|
$invoice = new Invoice();
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
$invoice = require 'CreateInvoice.php';
|
$invoice = require 'CreateInvoice.php';
|
||||||
|
|
||||||
use PayPal\Api\Invoice;
|
use PayPal\Api\Invoice;
|
||||||
use PayPal\Api\CancelNotification;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
$invoice = require 'SendInvoice.php';
|
$invoice = require 'SendInvoice.php';
|
||||||
|
|
||||||
use PayPal\Api\Invoice;
|
use PayPal\Api\Invoice;
|
||||||
use PayPal\Api\Notification;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// ### Obtain Access Token From Refresh Token
|
// ### Obtain Access Token From Refresh Token
|
||||||
require __DIR__ . '/../bootstrap.php';
|
require __DIR__ . '/../bootstrap.php';
|
||||||
|
|
||||||
use PayPal\Api\OpenIdUserinfo;
|
|
||||||
use PayPal\Api\OpenIdTokeninfo;
|
use PayPal\Api\OpenIdTokeninfo;
|
||||||
|
use PayPal\Api\OpenIdUserinfo;
|
||||||
|
|
||||||
// To obtain User Info, you have to follow three steps in general.
|
// To obtain User Info, you have to follow three steps in general.
|
||||||
// First, you need to obtain user's consent to retrieve the information you want.
|
// First, you need to obtain user's consent to retrieve the information you want.
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
// for a webhook events. This is made in a sample just to make sure there is minimum of one webhook to listen to.
|
// for a webhook events. This is made in a sample just to make sure there is minimum of one webhook to listen to.
|
||||||
/** @var \PayPal\Api\Webhook $webhook */
|
/** @var \PayPal\Api\Webhook $webhook */
|
||||||
$webhook = require __DIR__ . '/../bootstrap.php';
|
$webhook = require __DIR__ . '/../bootstrap.php';
|
||||||
use PayPal\Api\Authorization;
|
|
||||||
|
|
||||||
$params = array(
|
$params = array(
|
||||||
// 'start_time'=>'2014-12-06T11:00:00Z',
|
// 'start_time'=>'2014-12-06T11:00:00Z',
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
/** @var Authorization $authorization */
|
/** @var Authorization $authorization */
|
||||||
$authorization = require 'GetAuthorization.php';
|
$authorization = require 'GetAuthorization.php';
|
||||||
use PayPal\Api\Amount;
|
use PayPal\Api\Amount;
|
||||||
use PayPal\Api\Capture;
|
|
||||||
use PayPal\Api\Authorization;
|
use PayPal\Api\Authorization;
|
||||||
|
use PayPal\Api\Capture;
|
||||||
|
|
||||||
|
|
||||||
// ### Capture Payment
|
// ### Capture Payment
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
require __DIR__ . '/../bootstrap.php';
|
require __DIR__ . '/../bootstrap.php';
|
||||||
|
|
||||||
use PayPal\Api\Address;
|
use PayPal\Api\Address;
|
||||||
|
use PayPal\Api\Amount;
|
||||||
use PayPal\Api\CreditCard;
|
use PayPal\Api\CreditCard;
|
||||||
use PayPal\Api\FundingInstrument;
|
use PayPal\Api\FundingInstrument;
|
||||||
use PayPal\Api\Payer;
|
use PayPal\Api\Payer;
|
||||||
use PayPal\Api\Amount;
|
|
||||||
use PayPal\Api\Transaction;
|
|
||||||
use PayPal\Api\Payment;
|
use PayPal\Api\Payment;
|
||||||
|
use PayPal\Api\Transaction;
|
||||||
|
|
||||||
// The biggest difference between creating a payment, and authorizing a payment is to set the intent of payment
|
// The biggest difference between creating a payment, and authorizing a payment is to set the intent of payment
|
||||||
// to correct setting. In this case, it would be 'authorize'
|
// to correct setting. In this case, it would be 'authorize'
|
||||||
|
|||||||
@@ -7,10 +7,11 @@
|
|||||||
|
|
||||||
require __DIR__ . '/../bootstrap.php';
|
require __DIR__ . '/../bootstrap.php';
|
||||||
use PayPal\Api\Amount;
|
use PayPal\Api\Amount;
|
||||||
use PayPal\Api\Payer;
|
|
||||||
use PayPal\Api\FuturePayment;
|
use PayPal\Api\FuturePayment;
|
||||||
|
use PayPal\Api\Payer;
|
||||||
use PayPal\Api\RedirectUrls;
|
use PayPal\Api\RedirectUrls;
|
||||||
use PayPal\Api\Transaction;
|
use PayPal\Api\Transaction;
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
// ### Payer
|
// ### Payer
|
||||||
|
|||||||
@@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
require __DIR__ . '/../bootstrap.php';
|
require __DIR__ . '/../bootstrap.php';
|
||||||
use PayPal\Api\Amount;
|
use PayPal\Api\Amount;
|
||||||
|
use PayPal\Api\CreditCard;
|
||||||
use PayPal\Api\Details;
|
use PayPal\Api\Details;
|
||||||
|
use PayPal\Api\FundingInstrument;
|
||||||
use PayPal\Api\Item;
|
use PayPal\Api\Item;
|
||||||
use PayPal\Api\ItemList;
|
use PayPal\Api\ItemList;
|
||||||
use PayPal\Api\CreditCard;
|
|
||||||
use PayPal\Api\Payer;
|
use PayPal\Api\Payer;
|
||||||
use PayPal\Api\Payment;
|
use PayPal\Api\Payment;
|
||||||
use PayPal\Api\FundingInstrument;
|
|
||||||
use PayPal\Api\Transaction;
|
use PayPal\Api\Transaction;
|
||||||
|
|
||||||
// ### CreditCard
|
// ### CreditCard
|
||||||
|
|||||||
@@ -8,15 +8,15 @@
|
|||||||
/** @var CreditCard $card */
|
/** @var CreditCard $card */
|
||||||
$card = require __DIR__ . '/../vault/CreateCreditCard.php';
|
$card = require __DIR__ . '/../vault/CreateCreditCard.php';
|
||||||
use PayPal\Api\Amount;
|
use PayPal\Api\Amount;
|
||||||
|
use PayPal\Api\CreditCard;
|
||||||
|
use PayPal\Api\CreditCardToken;
|
||||||
use PayPal\Api\Details;
|
use PayPal\Api\Details;
|
||||||
|
use PayPal\Api\FundingInstrument;
|
||||||
use PayPal\Api\Item;
|
use PayPal\Api\Item;
|
||||||
use PayPal\Api\ItemList;
|
use PayPal\Api\ItemList;
|
||||||
use PayPal\Api\CreditCardToken;
|
|
||||||
use PayPal\Api\Payer;
|
use PayPal\Api\Payer;
|
||||||
use PayPal\Api\Payment;
|
use PayPal\Api\Payment;
|
||||||
use PayPal\Api\FundingInstrument;
|
|
||||||
use PayPal\Api\Transaction;
|
use PayPal\Api\Transaction;
|
||||||
use PayPal\Api\CreditCard;
|
|
||||||
|
|
||||||
// ### Credit card token
|
// ### Credit card token
|
||||||
// Saved credit card id from a previous call to
|
// Saved credit card id from a previous call to
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
$authorization = require 'AuthorizePayment.php';
|
$authorization = require 'AuthorizePayment.php';
|
||||||
$authorizationId = $authorization->getId();
|
$authorizationId = $authorization->getId();
|
||||||
use PayPal\Api\Authorization;
|
use PayPal\Api\Authorization;
|
||||||
use PayPal\Api\Payment;
|
|
||||||
|
|
||||||
// ### GetAuthorization
|
// ### GetAuthorization
|
||||||
// You can retrieve info about an Authorization
|
// You can retrieve info about an Authorization
|
||||||
|
|||||||
@@ -8,8 +8,6 @@
|
|||||||
$request = require 'AuthorizationCapture.php';
|
$request = require 'AuthorizationCapture.php';
|
||||||
|
|
||||||
use PayPal\Api\Capture;
|
use PayPal\Api\Capture;
|
||||||
use PayPal\Api\Amount;
|
|
||||||
use PayPal\Api\Authorization;
|
|
||||||
|
|
||||||
// ### Retrieve Capture details
|
// ### Retrieve Capture details
|
||||||
// You can look up a capture by invoking the Capture::get method
|
// You can look up a capture by invoking the Capture::get method
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
/** @var \PayPal\Api\Payment $payment */
|
/** @var \PayPal\Api\Payment $payment */
|
||||||
$payment = require __DIR__ . '/ExecutePayment.php';
|
$payment = require __DIR__ . '/ExecutePayment.php';
|
||||||
|
|
||||||
use PayPal\Api\Order;
|
|
||||||
use PayPal\Api\Amount;
|
use PayPal\Api\Amount;
|
||||||
use PayPal\Api\Authorization;
|
use PayPal\Api\Authorization;
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
/** @var \PayPal\Api\Payment $payment */
|
/** @var \PayPal\Api\Payment $payment */
|
||||||
$payment = require __DIR__ . '/ExecutePayment.php';
|
$payment = require __DIR__ . '/ExecutePayment.php';
|
||||||
|
|
||||||
use PayPal\Api\Capture;
|
|
||||||
use PayPal\Api\Amount;
|
use PayPal\Api\Amount;
|
||||||
|
use PayPal\Api\Capture;
|
||||||
|
|
||||||
// ### Approval Status
|
// ### Approval Status
|
||||||
// Determine if the user approved the payment or not
|
// Determine if the user approved the payment or not
|
||||||
|
|||||||
@@ -7,9 +7,6 @@
|
|||||||
/** @var \PayPal\Api\Payment $payment */
|
/** @var \PayPal\Api\Payment $payment */
|
||||||
$payment = require __DIR__ . '/ExecutePayment.php';
|
$payment = require __DIR__ . '/ExecutePayment.php';
|
||||||
|
|
||||||
use PayPal\Api\Capture;
|
|
||||||
use PayPal\Api\Amount;
|
|
||||||
|
|
||||||
// ### Approval Status
|
// ### Approval Status
|
||||||
// Determine if the user approved the payment or not
|
// Determine if the user approved the payment or not
|
||||||
if (isset($_GET['success']) && $_GET['success'] == 'true') {
|
if (isset($_GET['success']) && $_GET['success'] == 'true') {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
// API used: v1/payments/authorization/{authorization_id}/reauthorize
|
// API used: v1/payments/authorization/{authorization_id}/reauthorize
|
||||||
/** @var Authorization $authorization */
|
/** @var Authorization $authorization */
|
||||||
$authorization = require 'AuthorizePayment.php';
|
$authorization = require 'AuthorizePayment.php';
|
||||||
use PayPal\Api\Authorization;
|
|
||||||
use PayPal\Api\Amount;
|
use PayPal\Api\Amount;
|
||||||
|
use PayPal\Api\Authorization;
|
||||||
|
|
||||||
// ### Reauthorization
|
// ### Reauthorization
|
||||||
// Reauthorization is available only for PayPal account payments
|
// Reauthorization is available only for PayPal account payments
|
||||||
|
|||||||
@@ -6,10 +6,8 @@
|
|||||||
/** @var Capture $capture */
|
/** @var Capture $capture */
|
||||||
$capture = require 'AuthorizationCapture.php';
|
$capture = require 'AuthorizationCapture.php';
|
||||||
|
|
||||||
use PayPal\Api\Authorization;
|
|
||||||
use PayPal\Api\Capture;
|
use PayPal\Api\Capture;
|
||||||
use PayPal\Api\Refund;
|
use PayPal\Api\Refund;
|
||||||
use PayPal\Api\Amount;
|
|
||||||
|
|
||||||
// ### Refund
|
// ### Refund
|
||||||
// Create a refund object indicating
|
// Create a refund object indicating
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
/** @var Payment $payment */
|
/** @var Payment $payment */
|
||||||
$payment = require __DIR__ . '/../payments/CreatePayment.php';
|
$payment = require __DIR__ . '/../payments/CreatePayment.php';
|
||||||
use PayPal\Api\Sale;
|
|
||||||
use PayPal\Api\Payment;
|
use PayPal\Api\Payment;
|
||||||
|
use PayPal\Api\Sale;
|
||||||
|
|
||||||
// ### Get Sale From Created Payment
|
// ### Get Sale From Created Payment
|
||||||
// You can retrieve the sale Id from Related Resources for each transactions.
|
// You can retrieve the sale Id from Related Resources for each transactions.
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\Address;
|
use PayPal\Api\Address;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\AgreementStateDescriptor;
|
use PayPal\Api\AgreementStateDescriptor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,11 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Api\AgreementTransactions;
|
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
use PayPal\Transport\PayPalRestCall;
|
|
||||||
use PayPal\Api\Agreement;
|
use PayPal\Api\Agreement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\AgreementTransaction;
|
use PayPal\Api\AgreementTransaction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\AgreementTransactions;
|
use PayPal\Api\AgreementTransactions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Converter\FormatConverter;
|
|
||||||
use PayPal\Validation\NumericValidator;
|
|
||||||
use PayPal\Api\Amount;
|
use PayPal\Api\Amount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,12 +2,8 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Api\Capture;
|
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
use PayPal\Transport\PPRestCall;
|
|
||||||
use PayPal\Api\Authorization;
|
use PayPal\Api\Authorization;
|
||||||
|
use PayPal\Transport\PPRestCall;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Authorization
|
* Class Authorization
|
||||||
|
|||||||
@@ -2,10 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
use PayPal\Transport\PayPalRestCall;
|
|
||||||
use PayPal\Api\BankAccount;
|
use PayPal\Api\BankAccount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\BankAccountsList;
|
use PayPal\Api\BankAccountsList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\BankToken;
|
use PayPal\Api\BankToken;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\BillingInfo;
|
use PayPal\Api\BillingInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\CancelNotification;
|
use PayPal\Api\CancelNotification;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,12 +2,8 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Api\Refund;
|
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
use PayPal\Transport\PPRestCall;
|
|
||||||
use PayPal\Api\Capture;
|
use PayPal\Api\Capture;
|
||||||
|
use PayPal\Transport\PPRestCall;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Capture
|
* Class Capture
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\CarrierAccountToken;
|
use PayPal\Api\CarrierAccountToken;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\CartBase;
|
use PayPal\Api\CartBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\ChargeModel;
|
use PayPal\Api\ChargeModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Converter\FormatConverter;
|
|
||||||
use PayPal\Validation\NumericValidator;
|
|
||||||
use PayPal\Api\Cost;
|
use PayPal\Api\Cost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\CreateProfileResponse;
|
use PayPal\Api\CreateProfileResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Api\CreditCardHistory;
|
|
||||||
|
|
||||||
use PayPal\Api\Address;
|
|
||||||
use PayPal\Api\CreditCard;
|
use PayPal\Api\CreditCard;
|
||||||
use PayPal\Test\Constants;
|
use PayPal\Api\CreditCardHistory;
|
||||||
|
|
||||||
class CreditCardHistoryTest extends \PHPUnit_Framework_TestCase
|
class CreditCardHistoryTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\CreditCardList;
|
use PayPal\Api\CreditCardList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,12 +2,8 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
|
||||||
use PayPal\Validation\ArgumentValidator;
|
|
||||||
use PayPal\Api\CreditCardList;
|
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
use PayPal\Transport\PPRestCall;
|
|
||||||
use PayPal\Api\CreditCard;
|
use PayPal\Api\CreditCard;
|
||||||
|
use PayPal\Transport\PPRestCall;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreditCard
|
* Class CreditCard
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\CreditCardToken;
|
use PayPal\Api\CreditCardToken;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\Credit;
|
use PayPal\Api\Credit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\CurrencyConversion;
|
use PayPal\Api\CurrencyConversion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Converter\FormatConverter;
|
|
||||||
use PayPal\Validation\NumericValidator;
|
|
||||||
use PayPal\Api\Currency;
|
use PayPal\Api\Currency;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\CustomAmount;
|
use PayPal\Api\CustomAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Converter\FormatConverter;
|
|
||||||
use PayPal\Validation\NumericValidator;
|
|
||||||
use PayPal\Api\Details;
|
use PayPal\Api\Details;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\ErrorDetails;
|
use PayPal\Api\ErrorDetails;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\Error;
|
use PayPal\Api\Error;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\ExtendedBankAccount;
|
use PayPal\Api\ExtendedBankAccount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\FlowConfig;
|
use PayPal\Api\FlowConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\FmfDetails;
|
use PayPal\Api\FmfDetails;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\FundingDetail;
|
use PayPal\Api\FundingDetail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\FundingInstrument;
|
use PayPal\Api\FundingInstrument;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\FundingOption;
|
use PayPal\Api\FundingOption;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\FundingSource;
|
use PayPal\Api\FundingSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalModel;
|
|
||||||
use PayPal\Api\HyperSchema;
|
use PayPal\Api\HyperSchema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user