forked from LiveCarta/PayPal-PHP-SDK
Merge branch 'master' of https://github.com/irfanevrens/PayPal-PHP-SDK into 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,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,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;
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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 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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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,6 +198,8 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -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':
|
||||||
|
|||||||
Reference in New Issue
Block a user