forked from LiveCarta/PayPal-PHP-SDK
Merge branch '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,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 BankAccount
|
||||
|
||||
@@ -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,8 +3,8 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Validation\NumericValidator;
|
||||
use PayPal\Converter\FormatConverter;
|
||||
use PayPal\Validation\NumericValidator;
|
||||
|
||||
/**
|
||||
* Class Cost
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* Class CreditCard
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
@@ -20,10 +19,9 @@ 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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
use PayPal\Validation\UrlValidator;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -12,13 +12,15 @@ class OpenIdSession
|
||||
* Returns the PayPal URL to which the user must be redirected to
|
||||
* 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
|
||||
* @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.
|
||||
* @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
|
||||
* @param ApiContext $apiContext Optional API Context
|
||||
* @param null $nonce
|
||||
* @param null $state
|
||||
* @param ApiContext $apiContext Optional API Context
|
||||
* @return string Authorization URL
|
||||
*/
|
||||
public static function getAuthorizationUrl($redirectUri, $scope, $clientId, $nonce = null, $state = null, $apiContext = null)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 PaymentInstruction
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* Class Payout
|
||||
|
||||
@@ -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 PayoutItem
|
||||
|
||||
@@ -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 Refund
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,9 +4,9 @@ namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Exception\PayPalConnectionException;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Validation\JsonValidator;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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,12 +198,14 @@ class OAuthTokenCredential extends PayPalResourceModel
|
||||
if ($response != null && isset($response["refresh_token"])) {
|
||||
return $response['refresh_token'];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates Access Token based on given input
|
||||
*
|
||||
* @param $config
|
||||
* @param array $config
|
||||
* @param string|null $refreshToken
|
||||
* @return string
|
||||
*/
|
||||
@@ -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':
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
namespace PayPal\Transport;
|
||||
|
||||
use PayPal\Core\PayPalLoggingManager;
|
||||
use PayPal\Core\PayPalHttpConfig;
|
||||
use PayPal\Core\PayPalHttpConnection;
|
||||
use PayPal\Core\PayPalLoggingManager;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
$createdPlan = require 'UpdatePlan.php';
|
||||
|
||||
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\FundingInstrument;
|
||||
use PayPal\Api\Payer;
|
||||
use PayPal\Api\PayerInfo;
|
||||
use PayPal\Api\Plan;
|
||||
use PayPal\Api\ShippingAddress;
|
||||
|
||||
/* Create a new instance of Agreement object
|
||||
{
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
$createdPlan = require 'UpdatePlan.php';
|
||||
|
||||
use PayPal\Api\Agreement;
|
||||
use PayPal\Api\Plan;
|
||||
use PayPal\Api\Payer;
|
||||
use PayPal\Api\Plan;
|
||||
use PayPal\Api\ShippingAddress;
|
||||
|
||||
/* Create a new instance of Agreement object
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
// API used: /v1/payments/billing-plans
|
||||
|
||||
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\Currency;
|
||||
use PayPal\Api\MerchantPreferences;
|
||||
use PayPal\Api\PaymentDefinition;
|
||||
use PayPal\Api\Plan;
|
||||
|
||||
// Create a new instance of Plan object
|
||||
$plan = new Plan();
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
$createdAgreement = require 'CreateBillingAgreementWithCreditCard.php';
|
||||
|
||||
use PayPal\Api\Agreement;
|
||||
use PayPal\Api\PatchRequest;
|
||||
use PayPal\Api\Patch;
|
||||
use PayPal\Api\PatchRequest;
|
||||
|
||||
$patch = new Patch();
|
||||
|
||||
|
||||
@@ -13,10 +13,11 @@
|
||||
/** @var Plan $createdPlan */
|
||||
$createdPlan = require 'CreatePlan.php';
|
||||
|
||||
use PayPal\Api\Plan;
|
||||
use PayPal\Api\PatchRequest;
|
||||
use PayPal\Api\Patch;
|
||||
use PayPal\Api\PatchRequest;
|
||||
use PayPal\Api\Plan;
|
||||
use PayPal\Common\PayPalModel;
|
||||
|
||||
try {
|
||||
$patch = new Patch();
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
/** @var Plan $createdPlan */
|
||||
$createdPlan = require 'CreatePlan.php';
|
||||
|
||||
use PayPal\Api\Plan;
|
||||
use PayPal\Api\PatchRequest;
|
||||
use PayPal\Api\Patch;
|
||||
use PayPal\Api\PatchRequest;
|
||||
use PayPal\Api\Plan;
|
||||
|
||||
try {
|
||||
$patch = new Patch();
|
||||
|
||||
@@ -19,8 +19,8 @@ if (!file_exists($composerAutoload)) {
|
||||
require $composerAutoload;
|
||||
require __DIR__ . '/common.php';
|
||||
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Auth\OAuthTokenCredential;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', '1');
|
||||
|
||||
@@ -4,14 +4,6 @@
|
||||
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
|
||||
*
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
/** @var Invoice $invoice */
|
||||
$invoice = require 'SendInvoice.php';
|
||||
|
||||
use PayPal\Api\Invoice;
|
||||
use PayPal\Api\CancelNotification;
|
||||
use PayPal\Api\Invoice;
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
// an invoice.
|
||||
|
||||
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\BillingInfo;
|
||||
use PayPal\Api\Cost;
|
||||
use PayPal\Api\Currency;
|
||||
use PayPal\Api\PaymentTerm;
|
||||
use PayPal\Api\ShippingInfo;
|
||||
use PayPal\Api\Invoice;
|
||||
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();
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
$invoice = require 'CreateInvoice.php';
|
||||
|
||||
use PayPal\Api\Invoice;
|
||||
use PayPal\Api\CancelNotification;
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
$invoice = require 'SendInvoice.php';
|
||||
|
||||
use PayPal\Api\Invoice;
|
||||
use PayPal\Api\Notification;
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// ### Obtain Access Token From Refresh Token
|
||||
require __DIR__ . '/../bootstrap.php';
|
||||
|
||||
use PayPal\Api\OpenIdUserinfo;
|
||||
use PayPal\Api\OpenIdTokeninfo;
|
||||
use PayPal\Api\OpenIdUserinfo;
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -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.
|
||||
/** @var \PayPal\Api\Webhook $webhook */
|
||||
$webhook = require __DIR__ . '/../bootstrap.php';
|
||||
use PayPal\Api\Authorization;
|
||||
|
||||
$params = array(
|
||||
// 'start_time'=>'2014-12-06T11:00:00Z',
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
/** @var Authorization $authorization */
|
||||
$authorization = require 'GetAuthorization.php';
|
||||
use PayPal\Api\Amount;
|
||||
use PayPal\Api\Capture;
|
||||
use PayPal\Api\Authorization;
|
||||
use PayPal\Api\Capture;
|
||||
|
||||
|
||||
// ### Capture Payment
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
require __DIR__ . '/../bootstrap.php';
|
||||
|
||||
use PayPal\Api\Address;
|
||||
use PayPal\Api\Amount;
|
||||
use PayPal\Api\CreditCard;
|
||||
use PayPal\Api\FundingInstrument;
|
||||
use PayPal\Api\Payer;
|
||||
use PayPal\Api\Amount;
|
||||
use PayPal\Api\Transaction;
|
||||
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
|
||||
// to correct setting. In this case, it would be 'authorize'
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
|
||||
require __DIR__ . '/../bootstrap.php';
|
||||
use PayPal\Api\Amount;
|
||||
use PayPal\Api\Payer;
|
||||
use PayPal\Api\FuturePayment;
|
||||
use PayPal\Api\Payer;
|
||||
use PayPal\Api\RedirectUrls;
|
||||
use PayPal\Api\Transaction;
|
||||
|
||||
session_start();
|
||||
|
||||
// ### Payer
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
|
||||
require __DIR__ . '/../bootstrap.php';
|
||||
use PayPal\Api\Amount;
|
||||
use PayPal\Api\CreditCard;
|
||||
use PayPal\Api\Details;
|
||||
use PayPal\Api\FundingInstrument;
|
||||
use PayPal\Api\Item;
|
||||
use PayPal\Api\ItemList;
|
||||
use PayPal\Api\CreditCard;
|
||||
use PayPal\Api\Payer;
|
||||
use PayPal\Api\Payment;
|
||||
use PayPal\Api\FundingInstrument;
|
||||
use PayPal\Api\Transaction;
|
||||
|
||||
// ### CreditCard
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
/** @var CreditCard $card */
|
||||
$card = require __DIR__ . '/../vault/CreateCreditCard.php';
|
||||
use PayPal\Api\Amount;
|
||||
use PayPal\Api\CreditCard;
|
||||
use PayPal\Api\CreditCardToken;
|
||||
use PayPal\Api\Details;
|
||||
use PayPal\Api\FundingInstrument;
|
||||
use PayPal\Api\Item;
|
||||
use PayPal\Api\ItemList;
|
||||
use PayPal\Api\CreditCardToken;
|
||||
use PayPal\Api\Payer;
|
||||
use PayPal\Api\Payment;
|
||||
use PayPal\Api\FundingInstrument;
|
||||
use PayPal\Api\Transaction;
|
||||
use PayPal\Api\CreditCard;
|
||||
|
||||
// ### Credit card token
|
||||
// Saved credit card id from a previous call to
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
$authorization = require 'AuthorizePayment.php';
|
||||
$authorizationId = $authorization->getId();
|
||||
use PayPal\Api\Authorization;
|
||||
use PayPal\Api\Payment;
|
||||
|
||||
// ### GetAuthorization
|
||||
// You can retrieve info about an Authorization
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
$request = require 'AuthorizationCapture.php';
|
||||
|
||||
use PayPal\Api\Capture;
|
||||
use PayPal\Api\Amount;
|
||||
use PayPal\Api\Authorization;
|
||||
|
||||
// ### Retrieve Capture details
|
||||
// You can look up a capture by invoking the Capture::get method
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
/** @var \PayPal\Api\Payment $payment */
|
||||
$payment = require __DIR__ . '/ExecutePayment.php';
|
||||
|
||||
use PayPal\Api\Order;
|
||||
use PayPal\Api\Amount;
|
||||
use PayPal\Api\Authorization;
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
/** @var \PayPal\Api\Payment $payment */
|
||||
$payment = require __DIR__ . '/ExecutePayment.php';
|
||||
|
||||
use PayPal\Api\Capture;
|
||||
use PayPal\Api\Amount;
|
||||
use PayPal\Api\Capture;
|
||||
|
||||
// ### Approval Status
|
||||
// Determine if the user approved the payment or not
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
/** @var \PayPal\Api\Payment $payment */
|
||||
$payment = require __DIR__ . '/ExecutePayment.php';
|
||||
|
||||
use PayPal\Api\Capture;
|
||||
use PayPal\Api\Amount;
|
||||
|
||||
// ### Approval Status
|
||||
// Determine if the user approved the payment or not
|
||||
if (isset($_GET['success']) && $_GET['success'] == 'true') {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// API used: v1/payments/authorization/{authorization_id}/reauthorize
|
||||
/** @var Authorization $authorization */
|
||||
$authorization = require 'AuthorizePayment.php';
|
||||
use PayPal\Api\Authorization;
|
||||
use PayPal\Api\Amount;
|
||||
use PayPal\Api\Authorization;
|
||||
|
||||
// ### Reauthorization
|
||||
// Reauthorization is available only for PayPal account payments
|
||||
|
||||
@@ -6,10 +6,8 @@
|
||||
/** @var Capture $capture */
|
||||
$capture = require 'AuthorizationCapture.php';
|
||||
|
||||
use PayPal\Api\Authorization;
|
||||
use PayPal\Api\Capture;
|
||||
use PayPal\Api\Refund;
|
||||
use PayPal\Api\Amount;
|
||||
|
||||
// ### Refund
|
||||
// Create a refund object indicating
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
/** @var Payment $payment */
|
||||
$payment = require __DIR__ . '/../payments/CreatePayment.php';
|
||||
use PayPal\Api\Sale;
|
||||
use PayPal\Api\Payment;
|
||||
use PayPal\Api\Sale;
|
||||
|
||||
// ### Get Sale From Created Payment
|
||||
// You can retrieve the sale Id from Related Resources for each transactions.
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\Address;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\AgreementStateDescriptor;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\AgreementTransaction;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\AgreementTransactions;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Converter\FormatConverter;
|
||||
use PayPal\Validation\NumericValidator;
|
||||
use PayPal\Api\Amount;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
|
||||
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\Transport\PPRestCall;
|
||||
|
||||
/**
|
||||
* Class Authorization
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Api\BankAccount;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\BankAccountsList;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\BankToken;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\BillingInfo;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\CancelNotification;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
|
||||
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\Transport\PPRestCall;
|
||||
|
||||
/**
|
||||
* Class Capture
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\CarrierAccountToken;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\CartBase;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\ChargeModel;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Converter\FormatConverter;
|
||||
use PayPal\Validation\NumericValidator;
|
||||
use PayPal\Api\Cost;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\CreateProfileResponse;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
<?php
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Api\CreditCardHistory;
|
||||
|
||||
use PayPal\Api\Address;
|
||||
use PayPal\Api\CreditCard;
|
||||
use PayPal\Test\Constants;
|
||||
use PayPal\Api\CreditCardHistory;
|
||||
|
||||
class CreditCardHistoryTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\CreditCardList;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
|
||||
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\Transport\PPRestCall;
|
||||
|
||||
/**
|
||||
* Class CreditCard
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\CreditCardToken;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\Credit;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\CurrencyConversion;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Converter\FormatConverter;
|
||||
use PayPal\Validation\NumericValidator;
|
||||
use PayPal\Api\Currency;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\CustomAmount;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Converter\FormatConverter;
|
||||
use PayPal\Validation\NumericValidator;
|
||||
use PayPal\Api\Details;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\ErrorDetails;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\Error;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\ExtendedBankAccount;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\FlowConfig;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\FmfDetails;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\FundingDetail;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\FundingInstrument;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\FundingOption;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\FundingSource;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
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