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;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
|
||||
/**
|
||||
* Class Address
|
||||
*
|
||||
|
||||
@@ -4,10 +4,9 @@ namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Core\PayPalConstants;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Api\AgreementTransactions;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
|
||||
/**
|
||||
* Class Agreement
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Api\Capture;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
|
||||
/**
|
||||
* Class Authorization
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Api\Refund;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
|
||||
/**
|
||||
* Class Capture
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* Class CreditCardHistory
|
||||
@@ -12,7 +11,7 @@ use PayPal\Rest\ApiContext;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property \PayPal\Api\CreditCard credit_cards
|
||||
* @property \PayPal\Api\CreditCard[] credit_cards
|
||||
* @property int count
|
||||
* @property string next_id
|
||||
*/
|
||||
@@ -22,8 +21,7 @@ class CreditCardHistory extends PayPalModel
|
||||
* A list of credit card resources
|
||||
*
|
||||
*
|
||||
* @param \PayPal\Api\CreditCard $credit-cards
|
||||
*
|
||||
* @param \PayPal\Api\CreditCard[] $credit_cards
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreditCards($credit_cards)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
|
||||
/**
|
||||
* Class InvoiceAddress
|
||||
*
|
||||
|
||||
@@ -5,11 +5,20 @@ namespace PayPal\Api;
|
||||
use PayPal\Common\PayPalModel;
|
||||
|
||||
/**
|
||||
* Class OpenIdAddress
|
||||
*
|
||||
* 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
|
||||
{
|
||||
|
||||
/**
|
||||
* Full street address component, which may include house number, street name.
|
||||
*
|
||||
|
||||
@@ -4,7 +4,13 @@ namespace PayPal\Api;
|
||||
use PayPal\Common\PayPalModel;
|
||||
|
||||
/**
|
||||
* Class OpenIdError
|
||||
*
|
||||
* Error resource
|
||||
*
|
||||
* @property string error
|
||||
* @property string error_description
|
||||
* @property string error_uri
|
||||
*/
|
||||
class OpenIdError extends PayPalModel
|
||||
{
|
||||
|
||||
@@ -18,6 +18,8 @@ class OpenIdSession
|
||||
* from the user. Pass empty array for all scopes.
|
||||
* @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
|
||||
* @param null $nonce
|
||||
* @param null $state
|
||||
* @param ApiContext $apiContext Optional API Context
|
||||
* @return string Authorization URL
|
||||
*/
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
<?php
|
||||
namespace PayPal\Api;
|
||||
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
|
||||
/**
|
||||
* Class OpenIdTokeninfo
|
||||
*
|
||||
* 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
|
||||
{
|
||||
|
||||
@@ -5,7 +5,31 @@ use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* Class OpenIdUserinfo
|
||||
*
|
||||
* 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
|
||||
{
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Api\Capture;
|
||||
use PayPal\Api\Authorization;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
|
||||
/**
|
||||
* Class Order
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* Class Payee
|
||||
|
||||
@@ -4,11 +4,9 @@ namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Core\PayPalConstants;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Api\object;
|
||||
use PayPal\Api\PaymentHistory;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
|
||||
/**
|
||||
* Class Payment
|
||||
|
||||
@@ -4,10 +4,9 @@ namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Api\PlanList;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
|
||||
/**
|
||||
* Class Plan
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
|
||||
/**
|
||||
* Class Sale
|
||||
@@ -15,6 +15,7 @@ use PayPal\Transport\PayPalRestCall;
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string id
|
||||
* @property string purchase_unit_reference_id
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property \PayPal\Api\Amount amount
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
|
||||
/**
|
||||
* Class ShippingAddress
|
||||
*
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* Class TransactionBase
|
||||
*
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* Class Transactions
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Api\CreateProfileResponse;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
|
||||
/**
|
||||
* Class WebProfile
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Api\WebhookList;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Validation\UrlValidator;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Api\WebhookEventList;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
|
||||
/**
|
||||
* Class WebhookEventType
|
||||
|
||||
@@ -198,6 +198,8 @@ class OAuthTokenCredential extends PayPalResourceModel
|
||||
if ($response != null && isset($response["refresh_token"])) {
|
||||
return $response['refresh_token'];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -251,6 +253,7 @@ class OAuthTokenCredential extends PayPalResourceModel
|
||||
* Generates a new access token
|
||||
*
|
||||
* @param array $config
|
||||
* @param null|string $refreshToken
|
||||
* @return null
|
||||
* @throws PayPalConnectionException
|
||||
*/
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace PayPal\Common;
|
||||
use PayPal\Handler\IPayPalHandler;
|
||||
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Rest\IResource;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
|
||||
|
||||
/**
|
||||
* Class PayPalResourceModel
|
||||
* An Executable PayPalModel Class
|
||||
|
||||
@@ -93,6 +93,8 @@ class PayPalHttpConnection
|
||||
switch ($this->httpConfig->getMethod()) {
|
||||
case 'POST':
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
||||
break;
|
||||
case 'PUT':
|
||||
case 'PATCH':
|
||||
case 'DELETE':
|
||||
|
||||
Reference in New Issue
Block a user