forked from LiveCarta/PayPal-PHP-SDK
Update payments API to v1.9
This commit is contained in:
committed by
jaypatel512 and sdcoffey
parent
7c5ea8b997
commit
c2947ff409
@@ -10,11 +10,12 @@ namespace PayPal\Api;
|
|||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string phone
|
* @property string phone
|
||||||
|
* @property string type
|
||||||
*/
|
*/
|
||||||
class Address extends BaseAddress
|
class Address extends BaseAddress
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Phone number in E.123 format.
|
* Phone number in E.123 format. 50 characters max.
|
||||||
*
|
*
|
||||||
* @param string $phone
|
* @param string $phone
|
||||||
*
|
*
|
||||||
@@ -27,7 +28,7 @@ class Address extends BaseAddress
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Phone number in E.123 format.
|
* Phone number in E.123 format. 50 characters max.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -36,4 +37,26 @@ class Address extends BaseAddress
|
|||||||
return $this->phone;
|
return $this->phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of address (e.g., HOME_OR_WORK, GIFT etc).
|
||||||
|
*
|
||||||
|
* @param string $type
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setType($type)
|
||||||
|
{
|
||||||
|
$this->type = $type;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of address (e.g., HOME_OR_WORK, GIFT etc).
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getType()
|
||||||
|
{
|
||||||
|
return $this->type;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ use PayPal\Common\PayPalModel;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
|
* @deprecated Used for limited release only.
|
||||||
|
*
|
||||||
* @property string alternate_payment_account_id
|
* @property string alternate_payment_account_id
|
||||||
* @property string external_customer_id
|
* @property string external_customer_id
|
||||||
* @property string alternate_payment_provider_id
|
* @property string alternate_payment_provider_id
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ use PayPal\Validation\NumericValidator;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string currency
|
* @property string currency
|
||||||
* @property string total
|
* @property string total
|
||||||
* @property \PayPal\Api\Details details
|
* @property \PayPal\Api\Details details
|
||||||
*/
|
*/
|
||||||
class Amount extends PayPalModel
|
class Amount extends PayPalModel
|
||||||
@@ -23,7 +23,7 @@ class Amount extends PayPalModel
|
|||||||
* 3-letter [currency code](https://developer.paypal.com/docs/integration/direct/rest_api_payment_country_currency_support/). PayPal does not support all currencies.
|
* 3-letter [currency code](https://developer.paypal.com/docs/integration/direct/rest_api_payment_country_currency_support/). PayPal does not support all currencies.
|
||||||
*
|
*
|
||||||
* @param string $currency
|
* @param string $currency
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCurrency($currency)
|
public function setCurrency($currency)
|
||||||
@@ -46,7 +46,7 @@ class Amount extends PayPalModel
|
|||||||
* Total amount charged from the payer to the payee. In case of a refund, this is the refunded amount to the original payer from the payee. 10 characters max with support for 2 decimal places.
|
* Total amount charged from the payer to the payee. In case of a refund, this is the refunded amount to the original payer from the payee. 10 characters max with support for 2 decimal places.
|
||||||
*
|
*
|
||||||
* @param string|double $total
|
* @param string|double $total
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setTotal($total)
|
public function setTotal($total)
|
||||||
@@ -71,7 +71,7 @@ class Amount extends PayPalModel
|
|||||||
* Additional details of the payment amount.
|
* Additional details of the payment amount.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Details $details
|
* @param \PayPal\Api\Details $details
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setDetails($details)
|
public function setDetails($details)
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
use PayPal\Validation\ArgumentValidator;
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
use PayPal\Rest\ApiContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Authorization
|
* Class Authorization
|
||||||
@@ -13,21 +13,23 @@ use PayPal\Validation\ArgumentValidator;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string id
|
* @property string id
|
||||||
* @property \PayPal\Api\Amount amount
|
* @property \PayPal\Api\Amount amount
|
||||||
* @property string payment_mode
|
* @property string payment_mode
|
||||||
* @property string state
|
* @property string state
|
||||||
* @property string reason_code
|
* @property string reason_code
|
||||||
* @property string pending_reason
|
* @property string pending_reason
|
||||||
* @property string protection_eligibility
|
* @property string protection_eligibility
|
||||||
* @property string protection_eligibility_type
|
* @property string protection_eligibility_type
|
||||||
* @property \PayPal\Api\FmfDetails fmf_details
|
* @property \PayPal\Api\FmfDetails fmf_details
|
||||||
* @property string parent_payment
|
* @property string parent_payment
|
||||||
* @property \PayPal\Api\ProcessorResponse processor_response
|
* @property \PayPal\Api\ProcessorResponse processor_response
|
||||||
* @property string valid_until
|
* @property string valid_until
|
||||||
* @property string create_time
|
* @property string create_time
|
||||||
* @property string update_time
|
* @property string update_time
|
||||||
* @property \PayPal\Api\Links[] links
|
* @property string reference_id
|
||||||
|
* @property string receipt_id
|
||||||
|
* @property \PayPal\Api\Links[] links
|
||||||
*/
|
*/
|
||||||
class Authorization extends PayPalResourceModel
|
class Authorization extends PayPalResourceModel
|
||||||
{
|
{
|
||||||
@@ -35,7 +37,7 @@ class Authorization extends PayPalResourceModel
|
|||||||
* ID of the authorization transaction.
|
* ID of the authorization transaction.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setId($id)
|
public function setId($id)
|
||||||
@@ -58,7 +60,7 @@ class Authorization extends PayPalResourceModel
|
|||||||
* Amount being authorized.
|
* Amount being authorized.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Amount $amount
|
* @param \PayPal\Api\Amount $amount
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAmount($amount)
|
public function setAmount($amount)
|
||||||
@@ -82,7 +84,7 @@ class Authorization extends PayPalResourceModel
|
|||||||
* Valid Values: ["INSTANT_TRANSFER"]
|
* Valid Values: ["INSTANT_TRANSFER"]
|
||||||
*
|
*
|
||||||
* @param string $payment_mode
|
* @param string $payment_mode
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPaymentMode($payment_mode)
|
public function setPaymentMode($payment_mode)
|
||||||
@@ -106,7 +108,7 @@ class Authorization extends PayPalResourceModel
|
|||||||
* Valid Values: ["pending", "authorized", "partially_captured", "captured", "expired", "voided"]
|
* Valid Values: ["pending", "authorized", "partially_captured", "captured", "expired", "voided"]
|
||||||
*
|
*
|
||||||
* @param string $state
|
* @param string $state
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setState($state)
|
public function setState($state)
|
||||||
@@ -130,7 +132,7 @@ class Authorization extends PayPalResourceModel
|
|||||||
* Valid Values: ["AUTHORIZATION"]
|
* Valid Values: ["AUTHORIZATION"]
|
||||||
*
|
*
|
||||||
* @param string $reason_code
|
* @param string $reason_code
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setReasonCode($reason_code)
|
public function setReasonCode($reason_code)
|
||||||
@@ -154,7 +156,7 @@ class Authorization extends PayPalResourceModel
|
|||||||
* Valid Values: ["AUTHORIZATION"]
|
* Valid Values: ["AUTHORIZATION"]
|
||||||
*
|
*
|
||||||
* @param string $pending_reason
|
* @param string $pending_reason
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPendingReason($pending_reason)
|
public function setPendingReason($pending_reason)
|
||||||
@@ -178,7 +180,7 @@ class Authorization extends PayPalResourceModel
|
|||||||
* Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
|
* Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
|
||||||
*
|
*
|
||||||
* @param string $protection_eligibility
|
* @param string $protection_eligibility
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setProtectionEligibility($protection_eligibility)
|
public function setProtectionEligibility($protection_eligibility)
|
||||||
@@ -202,7 +204,7 @@ class Authorization extends PayPalResourceModel
|
|||||||
* Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"]
|
* Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"]
|
||||||
*
|
*
|
||||||
* @param string $protection_eligibility_type
|
* @param string $protection_eligibility_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setProtectionEligibilityType($protection_eligibility_type)
|
public function setProtectionEligibilityType($protection_eligibility_type)
|
||||||
@@ -225,7 +227,7 @@ class Authorization extends PayPalResourceModel
|
|||||||
* Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, or pending action. Returned in a payment response only if the merchant has enabled FMF in the profile settings and one of the fraud filters was triggered based on those settings. See [Fraud Management Filters Summary](https://developer.paypal.com/docs/classic/fmf/integration-guide/FMFSummary/) for more information.
|
* Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, or pending action. Returned in a payment response only if the merchant has enabled FMF in the profile settings and one of the fraud filters was triggered based on those settings. See [Fraud Management Filters Summary](https://developer.paypal.com/docs/classic/fmf/integration-guide/FMFSummary/) for more information.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\FmfDetails $fmf_details
|
* @param \PayPal\Api\FmfDetails $fmf_details
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFmfDetails($fmf_details)
|
public function setFmfDetails($fmf_details)
|
||||||
@@ -248,7 +250,7 @@ class Authorization extends PayPalResourceModel
|
|||||||
* ID of the Payment resource that this transaction is based on.
|
* ID of the Payment resource that this transaction is based on.
|
||||||
*
|
*
|
||||||
* @param string $parent_payment
|
* @param string $parent_payment
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setParentPayment($parent_payment)
|
public function setParentPayment($parent_payment)
|
||||||
@@ -294,7 +296,7 @@ class Authorization extends PayPalResourceModel
|
|||||||
* Authorization expiration time and date as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
* Authorization expiration time and date as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||||
*
|
*
|
||||||
* @param string $valid_until
|
* @param string $valid_until
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setValidUntil($valid_until)
|
public function setValidUntil($valid_until)
|
||||||
@@ -317,7 +319,7 @@ class Authorization extends PayPalResourceModel
|
|||||||
* Time of authorization as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
* Time of authorization as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||||
*
|
*
|
||||||
* @param string $create_time
|
* @param string $create_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCreateTime($create_time)
|
public function setCreateTime($create_time)
|
||||||
@@ -340,7 +342,7 @@ class Authorization extends PayPalResourceModel
|
|||||||
* Time that the resource was last updated.
|
* Time that the resource was last updated.
|
||||||
*
|
*
|
||||||
* @param string $update_time
|
* @param string $update_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setUpdateTime($update_time)
|
public function setUpdateTime($update_time)
|
||||||
@@ -360,11 +362,57 @@ class Authorization extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve details about a previously created authorization by passing the authorization_id in the request URI.
|
* Identifier to the purchase or transaction unit corresponding to this authorization transaction.
|
||||||
*
|
*
|
||||||
* @param string $authorizationId
|
* @param string $reference_id
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
*
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setReferenceId($reference_id)
|
||||||
|
{
|
||||||
|
$this->reference_id = $reference_id;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Identifier to the purchase or transaction unit corresponding to this authorization transaction.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getReferenceId()
|
||||||
|
{
|
||||||
|
return $this->reference_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Receipt id is 16 digit number payment identification number returned for guest users to identify the payment.
|
||||||
|
*
|
||||||
|
* @param string $receipt_id
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setReceiptId($receipt_id)
|
||||||
|
{
|
||||||
|
$this->receipt_id = $receipt_id;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Receipt id is 16 digit number payment identification number returned for guest users to identify the payment.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getReceiptId()
|
||||||
|
{
|
||||||
|
return $this->receipt_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shows details for an authorization, by ID.
|
||||||
|
*
|
||||||
|
* @param string $authorizationId
|
||||||
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Authorization
|
* @return Authorization
|
||||||
*/
|
*/
|
||||||
public static function get($authorizationId, $apiContext = null, $restCall = null)
|
public static function get($authorizationId, $apiContext = null, $restCall = null)
|
||||||
@@ -385,11 +433,11 @@ class Authorization extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Capture and process a previously created authorization by passing the authorization_id in the request URI. To use this request, the original payment call must have the intent set to authorize.
|
* Captures and processes an authorization, by ID. To use this call, the original payment call must specify an intent of `authorize`.
|
||||||
*
|
*
|
||||||
* @param Capture $capture
|
* @param Capture $capture
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Capture
|
* @return Capture
|
||||||
*/
|
*/
|
||||||
public function capture($capture, $apiContext = null, $restCall = null)
|
public function capture($capture, $apiContext = null, $restCall = null)
|
||||||
@@ -411,10 +459,10 @@ class Authorization extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Void (cancel) a previously authorized payment by passing the authorization_id in the request URI. Note that a fully captured authorization cannot be voided.
|
* Voids, or cancels, an authorization, by ID. You cannot void a fully captured authorization.
|
||||||
*
|
*
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Authorization
|
* @return Authorization
|
||||||
*/
|
*/
|
||||||
public function void($apiContext = null, $restCall = null)
|
public function void($apiContext = null, $restCall = null)
|
||||||
@@ -434,10 +482,10 @@ class Authorization extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reauthorize a PayPal account payment by passing the authorization_id in the request URI. You should reauthorize a payment after the initial 3-day honor period to ensure that funds are still available. Request supports only amount field
|
* Reauthorizes a PayPal account payment, by authorization ID. To ensure that funds are still available, reauthorize a payment after the initial three-day honor period. Supports only the `amount` request parameter.
|
||||||
*
|
*
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Authorization
|
* @return Authorization
|
||||||
*/
|
*/
|
||||||
public function reauthorize($apiContext = null, $restCall = null)
|
public function reauthorize($apiContext = null, $restCall = null)
|
||||||
|
|||||||
@@ -11,38 +11,37 @@ use PayPal\Common\PayPalModel;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string account_number
|
* @property string account_number
|
||||||
* @property string account_number_type
|
* @property string account_number_type
|
||||||
* @property string routing_number
|
* @property string routing_number
|
||||||
* @property string account_type
|
* @property string account_type
|
||||||
* @property string account_name
|
* @property string account_name
|
||||||
* @property string check_type
|
* @property string check_type
|
||||||
* @property string auth_type
|
* @property string auth_type
|
||||||
* @property string auth_capture_timestamp
|
* @property string auth_capture_timestamp
|
||||||
* @property string bank_name
|
* @property string bank_name
|
||||||
* @property string country_code
|
* @property string country_code
|
||||||
* @property string first_name
|
* @property string first_name
|
||||||
* @property string last_name
|
* @property string last_name
|
||||||
* @property string birth_date
|
* @property string birth_date
|
||||||
* @property \PayPal\Api\Address billing_address
|
* @property \PayPal\Api\Address billing_address
|
||||||
* @property string state
|
* @property string state
|
||||||
* @property string confirmation_status
|
* @property string confirmation_status
|
||||||
* @property string payer_id
|
* @property string payer_id
|
||||||
* @property string external_customer_id
|
* @property string external_customer_id
|
||||||
* @property string merchant_id
|
* @property string merchant_id
|
||||||
* @property string create_time
|
* @property string create_time
|
||||||
* @property string update_time
|
* @property string update_time
|
||||||
* @property string valid_until
|
* @property string valid_until
|
||||||
* @property \PayPal\Api\Links[] links
|
* @property \PayPal\Api\Links[] links
|
||||||
*/
|
*/
|
||||||
class BankAccount extends PayPalModel
|
class BankAccount extends PayPalModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* ID of the bank account being saved for later use.
|
* ID of the bank account being saved for later use.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param string $id
|
* @param string $id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setId($id)
|
public function setId($id)
|
||||||
@@ -53,7 +52,6 @@ class BankAccount extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the bank account being saved for later use.
|
* ID of the bank account being saved for later use.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -66,7 +64,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Account number in either IBAN (max length 34) or BBAN (max length 17) format.
|
* Account number in either IBAN (max length 34) or BBAN (max length 17) format.
|
||||||
*
|
*
|
||||||
* @param string $account_number
|
* @param string $account_number
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAccountNumber($account_number)
|
public function setAccountNumber($account_number)
|
||||||
@@ -90,7 +88,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Valid Values: ["BBAN", "IBAN"]
|
* Valid Values: ["BBAN", "IBAN"]
|
||||||
*
|
*
|
||||||
* @param string $account_number_type
|
* @param string $account_number_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAccountNumberType($account_number_type)
|
public function setAccountNumberType($account_number_type)
|
||||||
@@ -113,7 +111,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Routing transit number (aka Bank Code) of the bank (typically for domestic use only - for international use, IBAN includes bank code). For more information refer to http://en.wikipedia.org/wiki/Bank_code.
|
* Routing transit number (aka Bank Code) of the bank (typically for domestic use only - for international use, IBAN includes bank code). For more information refer to http://en.wikipedia.org/wiki/Bank_code.
|
||||||
*
|
*
|
||||||
* @param string $routing_number
|
* @param string $routing_number
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setRoutingNumber($routing_number)
|
public function setRoutingNumber($routing_number)
|
||||||
@@ -137,7 +135,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Valid Values: ["CHECKING", "SAVINGS"]
|
* Valid Values: ["CHECKING", "SAVINGS"]
|
||||||
*
|
*
|
||||||
* @param string $account_type
|
* @param string $account_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAccountType($account_type)
|
public function setAccountType($account_type)
|
||||||
@@ -160,7 +158,7 @@ class BankAccount extends PayPalModel
|
|||||||
* A customer designated name.
|
* A customer designated name.
|
||||||
*
|
*
|
||||||
* @param string $account_name
|
* @param string $account_name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAccountName($account_name)
|
public function setAccountName($account_name)
|
||||||
@@ -184,7 +182,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Valid Values: ["PERSONAL", "COMPANY"]
|
* Valid Values: ["PERSONAL", "COMPANY"]
|
||||||
*
|
*
|
||||||
* @param string $check_type
|
* @param string $check_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCheckType($check_type)
|
public function setCheckType($check_type)
|
||||||
@@ -208,7 +206,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Valid Values: ["CCD", "PPD", "TEL", "POP", "ARC", "RCK", "WEB"]
|
* Valid Values: ["CCD", "PPD", "TEL", "POP", "ARC", "RCK", "WEB"]
|
||||||
*
|
*
|
||||||
* @param string $auth_type
|
* @param string $auth_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAuthType($auth_type)
|
public function setAuthType($auth_type)
|
||||||
@@ -231,7 +229,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Time at which the authorization (or check) was captured. Use this field if the user authorization needs to be captured due to any privacy requirements.
|
* Time at which the authorization (or check) was captured. Use this field if the user authorization needs to be captured due to any privacy requirements.
|
||||||
*
|
*
|
||||||
* @param string $auth_capture_timestamp
|
* @param string $auth_capture_timestamp
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAuthCaptureTimestamp($auth_capture_timestamp)
|
public function setAuthCaptureTimestamp($auth_capture_timestamp)
|
||||||
@@ -254,7 +252,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Name of the bank.
|
* Name of the bank.
|
||||||
*
|
*
|
||||||
* @param string $bank_name
|
* @param string $bank_name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setBankName($bank_name)
|
public function setBankName($bank_name)
|
||||||
@@ -277,7 +275,7 @@ class BankAccount extends PayPalModel
|
|||||||
* 2 letter country code of the Bank.
|
* 2 letter country code of the Bank.
|
||||||
*
|
*
|
||||||
* @param string $country_code
|
* @param string $country_code
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCountryCode($country_code)
|
public function setCountryCode($country_code)
|
||||||
@@ -300,7 +298,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Account holder's first name.
|
* Account holder's first name.
|
||||||
*
|
*
|
||||||
* @param string $first_name
|
* @param string $first_name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFirstName($first_name)
|
public function setFirstName($first_name)
|
||||||
@@ -323,7 +321,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Account holder's last name.
|
* Account holder's last name.
|
||||||
*
|
*
|
||||||
* @param string $last_name
|
* @param string $last_name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setLastName($last_name)
|
public function setLastName($last_name)
|
||||||
@@ -346,7 +344,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Birth date of the bank account holder.
|
* Birth date of the bank account holder.
|
||||||
*
|
*
|
||||||
* @param string $birth_date
|
* @param string $birth_date
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setBirthDate($birth_date)
|
public function setBirthDate($birth_date)
|
||||||
@@ -369,7 +367,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Billing address.
|
* Billing address.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Address $billing_address
|
* @param \PayPal\Api\Address $billing_address
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setBillingAddress($billing_address)
|
public function setBillingAddress($billing_address)
|
||||||
@@ -393,7 +391,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Valid Values: ["ACTIVE", "INACTIVE", "DELETED"]
|
* Valid Values: ["ACTIVE", "INACTIVE", "DELETED"]
|
||||||
*
|
*
|
||||||
* @param string $state
|
* @param string $state
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setState($state)
|
public function setState($state)
|
||||||
@@ -417,7 +415,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Valid Values: ["UNCONFIRMED", "CONFIRMED"]
|
* Valid Values: ["UNCONFIRMED", "CONFIRMED"]
|
||||||
*
|
*
|
||||||
* @param string $confirmation_status
|
* @param string $confirmation_status
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setConfirmationStatus($confirmation_status)
|
public function setConfirmationStatus($confirmation_status)
|
||||||
@@ -440,7 +438,7 @@ class BankAccount extends PayPalModel
|
|||||||
* [DEPRECATED] Use external_customer_id instead.
|
* [DEPRECATED] Use external_customer_id instead.
|
||||||
*
|
*
|
||||||
* @param string $payer_id
|
* @param string $payer_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPayerId($payer_id)
|
public function setPayerId($payer_id)
|
||||||
@@ -463,7 +461,7 @@ class BankAccount extends PayPalModel
|
|||||||
* A unique identifier of the customer to whom this bank account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
|
* A unique identifier of the customer to whom this bank account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
|
||||||
*
|
*
|
||||||
* @param string $external_customer_id
|
* @param string $external_customer_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setExternalCustomerId($external_customer_id)
|
public function setExternalCustomerId($external_customer_id)
|
||||||
@@ -483,10 +481,10 @@ class BankAccount extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A unique identifier of the merchant for which this bank account has been stored for. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchnt.
|
* A unique identifier of the merchant for which this bank account has been stored for. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchant.
|
||||||
*
|
*
|
||||||
* @param string $merchant_id
|
* @param string $merchant_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setMerchantId($merchant_id)
|
public function setMerchantId($merchant_id)
|
||||||
@@ -496,7 +494,7 @@ class BankAccount extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A unique identifier of the merchant for which this bank account has been stored for. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchnt.
|
* A unique identifier of the merchant for which this bank account has been stored for. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchant.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -509,7 +507,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Time the resource was created.
|
* Time the resource was created.
|
||||||
*
|
*
|
||||||
* @param string $create_time
|
* @param string $create_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCreateTime($create_time)
|
public function setCreateTime($create_time)
|
||||||
@@ -532,7 +530,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Time the resource was last updated.
|
* Time the resource was last updated.
|
||||||
*
|
*
|
||||||
* @param string $update_time
|
* @param string $update_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setUpdateTime($update_time)
|
public function setUpdateTime($update_time)
|
||||||
@@ -555,7 +553,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Date/Time until this resource can be used to fund a payment.
|
* Date/Time until this resource can be used to fund a payment.
|
||||||
*
|
*
|
||||||
* @param string $valid_until
|
* @param string $valid_until
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setValidUntil($valid_until)
|
public function setValidUntil($valid_until)
|
||||||
@@ -578,7 +576,7 @@ class BankAccount extends PayPalModel
|
|||||||
* Sets Links
|
* Sets Links
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Links[] $links
|
* @param \PayPal\Api\Links[] $links
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setLinks($links)
|
public function setLinks($links)
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ use PayPal\Common\PayPalModel;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
|
* @deprecated Used internally only.
|
||||||
|
*
|
||||||
* @property string billing_agreement_id
|
* @property string billing_agreement_id
|
||||||
*/
|
*/
|
||||||
class Billing extends PayPalModel
|
class Billing extends PayPalModel
|
||||||
|
|||||||
@@ -3,8 +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\Validation\ArgumentValidator;
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
use PayPal\Rest\ApiContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Capture
|
* Class Capture
|
||||||
@@ -13,23 +14,25 @@ use PayPal\Validation\ArgumentValidator;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string id
|
* @property string id
|
||||||
* @property \PayPal\Api\Amount amount
|
* @property \PayPal\Api\Amount amount
|
||||||
* @property bool is_final_capture
|
* @property bool is_final_capture
|
||||||
* @property string state
|
* @property string state
|
||||||
* @property string parent_payment
|
* @property string reason_code
|
||||||
|
* @property string parent_payment
|
||||||
|
* @property string invoice_number
|
||||||
* @property \PayPal\Api\Currency transaction_fee
|
* @property \PayPal\Api\Currency transaction_fee
|
||||||
* @property string create_time
|
* @property string create_time
|
||||||
* @property string update_time
|
* @property string update_time
|
||||||
* @property \PayPal\Api\Links[] links
|
* @property \PayPal\Api\Links[] links
|
||||||
*/
|
*/
|
||||||
class Capture extends PayPalResourceModel
|
class Capture extends PayPalResourceModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* ID of the capture transaction.
|
* The ID of the capture transaction.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setId($id)
|
public function setId($id)
|
||||||
@@ -39,7 +42,7 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the capture transaction.
|
* The ID of the capture transaction.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -49,10 +52,10 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount being captured. If the amount matches the orginally authorized amount, the state of the authorization changes to `captured`. If not, the state of the authorization changes to `partially_captured`.
|
* The amount to capture. If the amount matches the orginally authorized amount, the state of the authorization changes to `captured`. If not, the state of the authorization changes to `partially_captured`.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Amount $amount
|
* @param \PayPal\Api\Amount $amount
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAmount($amount)
|
public function setAmount($amount)
|
||||||
@@ -62,7 +65,7 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount being captured. If the amount matches the orginally authorized amount, the state of the authorization changes to `captured`. If not, the state of the authorization changes to `partially_captured`.
|
* The amount to capture. If the amount matches the orginally authorized amount, the state of the authorization changes to `captured`. If not, the state of the authorization changes to `partially_captured`.
|
||||||
*
|
*
|
||||||
* @return \PayPal\Api\Amount
|
* @return \PayPal\Api\Amount
|
||||||
*/
|
*/
|
||||||
@@ -72,10 +75,10 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If set to `true`, all remaining funds held by the authorization will be released in the funding instrument.
|
* Indicates whether to release all remaining funds that the authorization holds in the funding instrument. Default is `false`.
|
||||||
*
|
*
|
||||||
* @param bool $is_final_capture
|
* @param bool $is_final_capture
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setIsFinalCapture($is_final_capture)
|
public function setIsFinalCapture($is_final_capture)
|
||||||
@@ -85,7 +88,7 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If set to `true`, all remaining funds held by the authorization will be released in the funding instrument.
|
* Indicates whether to release all remaining funds that the authorization holds in the funding instrument. Default is `false`.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
@@ -95,11 +98,11 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* State of the capture.
|
* The state of the capture.
|
||||||
* Valid Values: ["pending", "completed", "refunded", "partially_refunded"]
|
* Valid Values: ["pending", "completed", "refunded", "partially_refunded"]
|
||||||
*
|
*
|
||||||
* @param string $state
|
* @param string $state
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setState($state)
|
public function setState($state)
|
||||||
@@ -109,7 +112,7 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* State of the capture.
|
* The state of the capture.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -119,10 +122,34 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the payment resource on which this transaction is based.
|
* The reason code that describes why the transaction state is pending or reversed.
|
||||||
|
* Valid Values: ["CHARGEBACK", "GUARANTEE", "BUYER_COMPLAINT", "REFUND", "UNCONFIRMED_SHIPPING_ADDRESS", "ECHECK", "INTERNATIONAL_WITHDRAWAL", "RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION", "PAYMENT_REVIEW", "REGULATORY_REVIEW", "UNILATERAL", "VERIFICATION_REQUIRED", "TRANSACTION_APPROVED_AWAITING_FUNDING"]
|
||||||
|
*
|
||||||
|
* @param string $reason_code
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setReasonCode($reason_code)
|
||||||
|
{
|
||||||
|
$this->reason_code = $reason_code;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reason code that describes why the transaction state is pending or reversed.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getReasonCode()
|
||||||
|
{
|
||||||
|
return $this->reason_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The ID of the payment on which this transaction is based.
|
||||||
*
|
*
|
||||||
* @param string $parent_payment
|
* @param string $parent_payment
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setParentPayment($parent_payment)
|
public function setParentPayment($parent_payment)
|
||||||
@@ -132,7 +159,7 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the payment resource on which this transaction is based.
|
* The ID of the payment on which this transaction is based.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -142,10 +169,33 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transaction fee applicable for this payment.
|
* The invoice number to track this payment.
|
||||||
|
*
|
||||||
|
* @param string $invoice_number
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setInvoiceNumber($invoice_number)
|
||||||
|
{
|
||||||
|
$this->invoice_number = $invoice_number;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The invoice number to track this payment.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getInvoiceNumber()
|
||||||
|
{
|
||||||
|
return $this->invoice_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The transaction fee for this payment.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Currency $transaction_fee
|
* @param \PayPal\Api\Currency $transaction_fee
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setTransactionFee($transaction_fee)
|
public function setTransactionFee($transaction_fee)
|
||||||
@@ -155,7 +205,7 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transaction fee applicable for this payment.
|
* The transaction fee for this payment.
|
||||||
*
|
*
|
||||||
* @return \PayPal\Api\Currency
|
* @return \PayPal\Api\Currency
|
||||||
*/
|
*/
|
||||||
@@ -165,10 +215,10 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Time of capture as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
* The date and time of capture, as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||||
*
|
*
|
||||||
* @param string $create_time
|
* @param string $create_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCreateTime($create_time)
|
public function setCreateTime($create_time)
|
||||||
@@ -178,7 +228,7 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Time of capture as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
* The date and time of capture, as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -188,10 +238,10 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Time that the resource was last updated.
|
* The date and time when the resource was last updated.
|
||||||
*
|
*
|
||||||
* @param string $update_time
|
* @param string $update_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setUpdateTime($update_time)
|
public function setUpdateTime($update_time)
|
||||||
@@ -201,7 +251,7 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Time that the resource was last updated.
|
* The date and time when the resource was last updated.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -211,11 +261,11 @@ class Capture extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve details about a captured payment by passing the capture_id in the request URI.
|
* Shows details for a captured payment, by ID.
|
||||||
*
|
*
|
||||||
* @param string $captureId
|
* @param string $captureId
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Capture
|
* @return Capture
|
||||||
*/
|
*/
|
||||||
public static function get($captureId, $apiContext = null, $restCall = null)
|
public static function get($captureId, $apiContext = null, $restCall = null)
|
||||||
@@ -238,6 +288,7 @@ class Capture extends PayPalResourceModel
|
|||||||
/**
|
/**
|
||||||
* Refund a captured payment by passing the capture_id in the request URI. In addition, include an amount object in the body of the request JSON.
|
* Refund a captured payment by passing the capture_id in the request URI. In addition, include an amount object in the body of the request JSON.
|
||||||
*
|
*
|
||||||
|
* @deprecated Please use #refundCapturedPayment instead.
|
||||||
* @param Refund $refund
|
* @param Refund $refund
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
@@ -261,4 +312,30 @@ class Capture extends PayPalResourceModel
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refunds a captured payment, by ID. Include an `amount` object in the JSON request body.
|
||||||
|
*
|
||||||
|
* @param RefundRequest $refundRequest
|
||||||
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
|
* @return DetailedRefund
|
||||||
|
*/
|
||||||
|
public function refundCapturedPayment($refundRequest, $apiContext = null, $restCall = null)
|
||||||
|
{
|
||||||
|
ArgumentValidator::validate($this->getId(), "Id");
|
||||||
|
ArgumentValidator::validate($refundRequest, 'refundRequest');
|
||||||
|
$payLoad = $refundRequest->toJSON();
|
||||||
|
$json = self::executeCall(
|
||||||
|
"/v1/payments/capture/{$this->getId()}/refund",
|
||||||
|
"POST",
|
||||||
|
$payLoad,
|
||||||
|
null,
|
||||||
|
$apiContext,
|
||||||
|
$restCall
|
||||||
|
);
|
||||||
|
$ret = new DetailedRefund();
|
||||||
|
$ret->fromJson($json);
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use PayPal\Common\PayPalModel;
|
|||||||
/**
|
/**
|
||||||
* Class CarrierAccount
|
* Class CarrierAccount
|
||||||
*
|
*
|
||||||
* Payment Instrument that facilitates carrier billing
|
* Payment instrument that enables carrier billing.
|
||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
@@ -20,7 +20,7 @@ use PayPal\Common\PayPalModel;
|
|||||||
class CarrierAccount extends PayPalModel
|
class CarrierAccount extends PayPalModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* ID that identifies the payer<65>s carrier account. Can be used in subsequent REST API calls, e.g. for making payments.
|
* The ID of the carrier account of the payer. Use in subsequent REST API calls. For example, to make payments.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
*
|
*
|
||||||
@@ -33,7 +33,7 @@ class CarrierAccount extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID that identifies the payer<65>s carrier account. Can be used in subsequent REST API calls, e.g. for making payments.
|
* The ID of the carrier account of the payer. Use in subsequent REST API calls. For example, to make payments.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -43,7 +43,7 @@ class CarrierAccount extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The payer<EFBFBD>s phone number in E.164 format.
|
* The phone number of the payer, in E.164 format.
|
||||||
*
|
*
|
||||||
* @param string $phone_number
|
* @param string $phone_number
|
||||||
*
|
*
|
||||||
@@ -56,7 +56,7 @@ class CarrierAccount extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The payer<EFBFBD>s phone number in E.164 format.
|
* The phone number of the payer, in E.164 format.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -66,7 +66,7 @@ class CarrierAccount extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User identifier as created by the merchant.
|
* The ID of the customer, as created by the merchant.
|
||||||
*
|
*
|
||||||
* @param string $external_customer_id
|
* @param string $external_customer_id
|
||||||
*
|
*
|
||||||
@@ -79,7 +79,7 @@ class CarrierAccount extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User identifier as created by the merchant.
|
* The ID of the customer, as created by the merchant.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -89,7 +89,7 @@ class CarrierAccount extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The method of obtaining the phone number (USER_PROVIDED or READ_FROM_DEVICE).
|
* The method used to obtain the phone number. Value is `READ_FROM_DEVICE` or `USER_PROVIDED`.
|
||||||
* Valid Values: ["READ_FROM_DEVICE", "USER_PROVIDED"]
|
* Valid Values: ["READ_FROM_DEVICE", "USER_PROVIDED"]
|
||||||
*
|
*
|
||||||
* @param string $phone_source
|
* @param string $phone_source
|
||||||
@@ -103,7 +103,7 @@ class CarrierAccount extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The method of obtaining the phone number (USER_PROVIDED or READ_FROM_DEVICE).
|
* The method used to obtain the phone number. Value is `READ_FROM_DEVICE` or `USER_PROVIDED`.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -113,7 +113,7 @@ class CarrierAccount extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The country where the phone number is registered. Specified in 2-character IS0-3166-1 format.
|
* The ISO 3166-1 alpha-2 country code where the phone number is registered.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\CountryCode $country_code
|
* @param \PayPal\Api\CountryCode $country_code
|
||||||
*
|
*
|
||||||
@@ -126,7 +126,7 @@ class CarrierAccount extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The country where the phone number is registered. Specified in 2-character IS0-3166-1 format.
|
* The ISO 3166-1 alpha-2 country code where the phone number is registered.
|
||||||
*
|
*
|
||||||
* @return \PayPal\Api\CountryCode
|
* @return \PayPal\Api\CountryCode
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class CarrierAccountToken extends PayPalModel
|
|||||||
* ID of a previously saved carrier account resource.
|
* ID of a previously saved carrier account resource.
|
||||||
*
|
*
|
||||||
* @param string $carrier_account_id
|
* @param string $carrier_account_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCarrierAccountId($carrier_account_id)
|
public function setCarrierAccountId($carrier_account_id)
|
||||||
@@ -43,7 +43,7 @@ class CarrierAccountToken extends PayPalModel
|
|||||||
* The unique identifier of the payer used when saving this carrier account instrument.
|
* The unique identifier of the payer used when saving this carrier account instrument.
|
||||||
*
|
*
|
||||||
* @param string $external_customer_id
|
* @param string $external_customer_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setExternalCustomerId($external_customer_id)
|
public function setExternalCustomerId($external_customer_id)
|
||||||
|
|||||||
@@ -12,17 +12,18 @@ use PayPal\Validation\UrlValidator;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string reference_id
|
* @property string reference_id
|
||||||
* @property \PayPal\Api\Amount amount
|
* @property \PayPal\Api\Amount amount
|
||||||
* @property string description
|
* @property \PayPal\Api\Payee payee
|
||||||
* @property string note_to_payee
|
* @property string description
|
||||||
* @property string custom
|
* @property string note_to_payee
|
||||||
* @property string invoice_number
|
* @property string custom
|
||||||
* @property string soft_descriptor
|
* @property string invoice_number
|
||||||
|
* @property string soft_descriptor
|
||||||
* @property \PayPal\Api\PaymentOptions payment_options
|
* @property \PayPal\Api\PaymentOptions payment_options
|
||||||
* @property \PayPal\Api\ItemList item_list
|
* @property \PayPal\Api\ItemList item_list
|
||||||
* @property string notify_url
|
* @property string notify_url
|
||||||
* @property string order_url
|
* @property string order_url
|
||||||
*/
|
*/
|
||||||
class CartBase extends PayPalModel
|
class CartBase extends PayPalModel
|
||||||
{
|
{
|
||||||
@@ -30,7 +31,7 @@ class CartBase extends PayPalModel
|
|||||||
* Merchant identifier to the purchase unit. Optional parameter
|
* Merchant identifier to the purchase unit. Optional parameter
|
||||||
*
|
*
|
||||||
* @param string $reference_id
|
* @param string $reference_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setReferenceId($reference_id)
|
public function setReferenceId($reference_id)
|
||||||
@@ -53,7 +54,7 @@ class CartBase extends PayPalModel
|
|||||||
* Amount being collected.
|
* Amount being collected.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Amount $amount
|
* @param \PayPal\Api\Amount $amount
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAmount($amount)
|
public function setAmount($amount)
|
||||||
@@ -75,9 +76,8 @@ class CartBase extends PayPalModel
|
|||||||
/**
|
/**
|
||||||
* Recipient of the funds in this transaction.
|
* Recipient of the funds in this transaction.
|
||||||
*
|
*
|
||||||
* @deprecated Not publicly available
|
|
||||||
* @param \PayPal\Api\Payee $payee
|
* @param \PayPal\Api\Payee $payee
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPayee($payee)
|
public function setPayee($payee)
|
||||||
@@ -89,7 +89,6 @@ class CartBase extends PayPalModel
|
|||||||
/**
|
/**
|
||||||
* Recipient of the funds in this transaction.
|
* Recipient of the funds in this transaction.
|
||||||
*
|
*
|
||||||
* @deprecated Not publicly available
|
|
||||||
* @return \PayPal\Api\Payee
|
* @return \PayPal\Api\Payee
|
||||||
*/
|
*/
|
||||||
public function getPayee()
|
public function getPayee()
|
||||||
@@ -98,10 +97,10 @@ class CartBase extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of transaction.
|
* Description of what is being paid for.
|
||||||
*
|
*
|
||||||
* @param string $description
|
* @param string $description
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setDescription($description)
|
public function setDescription($description)
|
||||||
@@ -111,7 +110,7 @@ class CartBase extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of transaction.
|
* Description of what is being paid for.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -124,7 +123,7 @@ class CartBase extends PayPalModel
|
|||||||
* Note to the recipient of the funds in this transaction.
|
* Note to the recipient of the funds in this transaction.
|
||||||
*
|
*
|
||||||
* @param string $note_to_payee
|
* @param string $note_to_payee
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setNoteToPayee($note_to_payee)
|
public function setNoteToPayee($note_to_payee)
|
||||||
@@ -144,10 +143,10 @@ class CartBase extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free-form field for the use of clients. Only supported when the `payment_method` is set to `paypal`.
|
* free-form field for the use of clients
|
||||||
*
|
*
|
||||||
* @param string $custom
|
* @param string $custom
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCustom($custom)
|
public function setCustom($custom)
|
||||||
@@ -157,7 +156,7 @@ class CartBase extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free-form field for the use of clients. Only supported when the `payment_method` is set to `paypal`.
|
* free-form field for the use of clients
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -167,10 +166,10 @@ class CartBase extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoice number used to track the payment. Only supported when the `payment_method` is set to `paypal`.
|
* invoice number to track this payment
|
||||||
*
|
*
|
||||||
* @param string $invoice_number
|
* @param string $invoice_number
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setInvoiceNumber($invoice_number)
|
public function setInvoiceNumber($invoice_number)
|
||||||
@@ -180,7 +179,7 @@ class CartBase extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoice number used to track the payment. Only supported when the `payment_method` is set to `paypal`.
|
* invoice number to track this payment
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -193,7 +192,7 @@ class CartBase extends PayPalModel
|
|||||||
* Soft descriptor used when charging this funding source. If length exceeds max length, the value will be truncated
|
* Soft descriptor used when charging this funding source. If length exceeds max length, the value will be truncated
|
||||||
*
|
*
|
||||||
* @param string $soft_descriptor
|
* @param string $soft_descriptor
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setSoftDescriptor($soft_descriptor)
|
public function setSoftDescriptor($soft_descriptor)
|
||||||
@@ -214,10 +213,9 @@ class CartBase extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Soft descriptor city used when charging this funding source. If length exceeds max length, the value will be truncated. Only supported when the `payment_method` is set to `credit_card`
|
* Soft descriptor city used when charging this funding source. If length exceeds max length, the value will be truncated. Only supported when the `payment_method` is set to `credit_card`
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param string $soft_descriptor_city
|
* @param string $soft_descriptor_city
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setSoftDescriptorCity($soft_descriptor_city)
|
public function setSoftDescriptorCity($soft_descriptor_city)
|
||||||
@@ -228,7 +226,6 @@ class CartBase extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Soft descriptor city used when charging this funding source. If length exceeds max length, the value will be truncated. Only supported when the `payment_method` is set to `credit_card`
|
* Soft descriptor city used when charging this funding source. If length exceeds max length, the value will be truncated. Only supported when the `payment_method` is set to `credit_card`
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -241,7 +238,7 @@ class CartBase extends PayPalModel
|
|||||||
* Payment options requested for this purchase unit
|
* Payment options requested for this purchase unit
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\PaymentOptions $payment_options
|
* @param \PayPal\Api\PaymentOptions $payment_options
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPaymentOptions($payment_options)
|
public function setPaymentOptions($payment_options)
|
||||||
@@ -261,10 +258,10 @@ class CartBase extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Items and related shipping address within a transaction.
|
* List of items being paid for.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\ItemList $item_list
|
* @param \PayPal\Api\ItemList $item_list
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setItemList($item_list)
|
public function setItemList($item_list)
|
||||||
@@ -274,7 +271,7 @@ class CartBase extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Items and related shipping address within a transaction.
|
* List of items being paid for.
|
||||||
*
|
*
|
||||||
* @return \PayPal\Api\ItemList
|
* @return \PayPal\Api\ItemList
|
||||||
*/
|
*/
|
||||||
@@ -333,7 +330,6 @@ class CartBase extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* List of external funding being applied to the purchase unit. Each external_funding unit should have a unique reference_id
|
* List of external funding being applied to the purchase unit. Each external_funding unit should have a unique reference_id
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\ExternalFunding[] $external_funding
|
* @param \PayPal\Api\ExternalFunding[] $external_funding
|
||||||
*
|
*
|
||||||
@@ -347,7 +343,6 @@ class CartBase extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* List of external funding being applied to the purchase unit. Each external_funding unit should have a unique reference_id
|
* List of external funding being applied to the purchase unit. Each external_funding unit should have a unique reference_id
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\ExternalFunding[]
|
* @return \PayPal\Api\ExternalFunding[]
|
||||||
*/
|
*/
|
||||||
@@ -358,7 +353,6 @@ class CartBase extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Append ExternalFunding to the list.
|
* Append ExternalFunding to the list.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\ExternalFunding $externalFunding
|
* @param \PayPal\Api\ExternalFunding $externalFunding
|
||||||
* @return $this
|
* @return $this
|
||||||
@@ -376,7 +370,6 @@ class CartBase extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove ExternalFunding from the list.
|
* Remove ExternalFunding from the list.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\ExternalFunding $externalFunding
|
* @param \PayPal\Api\ExternalFunding $externalFunding
|
||||||
* @return $this
|
* @return $this
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use PayPal\Common\PayPalModel;
|
|||||||
/**
|
/**
|
||||||
* Class CountryCode
|
* Class CountryCode
|
||||||
*
|
*
|
||||||
* Representation of a country code.
|
* The ISO 3166-1 alpha-2 country code. A complete list of valid codes is available at Wikipedia: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 In particular, note that the country code for Great Britain is GB, not UK as used in that country's top-level domain names.
|
||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
@@ -19,7 +19,7 @@ class CountryCode extends PayPalModel
|
|||||||
* ISO country code based on 2-character IS0-3166-1 codes.
|
* ISO country code based on 2-character IS0-3166-1 codes.
|
||||||
*
|
*
|
||||||
* @param string $country_code
|
* @param string $country_code
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCountryCode($country_code)
|
public function setCountryCode($country_code)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class Credit extends PayPalModel
|
|||||||
* Unique identifier of credit resource.
|
* Unique identifier of credit resource.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setId($id)
|
public function setId($id)
|
||||||
@@ -44,7 +44,7 @@ class Credit extends PayPalModel
|
|||||||
* Valid Values: ["BILL_ME_LATER", "PAYPAL_EXTRAS_MASTERCARD", "EBAY_MASTERCARD", "PAYPAL_SMART_CONNECT"]
|
* Valid Values: ["BILL_ME_LATER", "PAYPAL_EXTRAS_MASTERCARD", "EBAY_MASTERCARD", "PAYPAL_SMART_CONNECT"]
|
||||||
*
|
*
|
||||||
* @param string $type
|
* @param string $type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setType($type)
|
public function setType($type)
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ class CreditCard extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* State of the funding instrument.
|
* State of the credit card funding instrument.
|
||||||
* Valid Values: ["expired", "ok"]
|
* Valid Values: ["expired", "ok"]
|
||||||
*
|
*
|
||||||
* @param string $state
|
* @param string $state
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ use PayPal\Common\PayPalModel;
|
|||||||
* @property string payer_id
|
* @property string payer_id
|
||||||
* @property string last4
|
* @property string last4
|
||||||
* @property string type
|
* @property string type
|
||||||
* @property int expire_month
|
* @property int expire_month
|
||||||
* @property int expire_year
|
* @property int expire_year
|
||||||
*/
|
*/
|
||||||
class CreditCardToken extends PayPalModel
|
class CreditCardToken extends PayPalModel
|
||||||
{
|
{
|
||||||
@@ -24,7 +24,7 @@ class CreditCardToken extends PayPalModel
|
|||||||
* ID of credit card previously stored using `/vault/credit-card`.
|
* ID of credit card previously stored using `/vault/credit-card`.
|
||||||
*
|
*
|
||||||
* @param string $credit_card_id
|
* @param string $credit_card_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCreditCardId($credit_card_id)
|
public function setCreditCardId($credit_card_id)
|
||||||
@@ -47,7 +47,7 @@ class CreditCardToken extends PayPalModel
|
|||||||
* A unique identifier that you can assign and track when storing a credit card or using a stored credit card. This ID can help to avoid unintentional use or misuse of credit cards. This ID can be any value you would like to associate with the saved card, such as a UUID, username, or email address. **Required when using a stored credit card if a payer_id was originally provided when storing the credit card in vault.**
|
* A unique identifier that you can assign and track when storing a credit card or using a stored credit card. This ID can help to avoid unintentional use or misuse of credit cards. This ID can be any value you would like to associate with the saved card, such as a UUID, username, or email address. **Required when using a stored credit card if a payer_id was originally provided when storing the credit card in vault.**
|
||||||
*
|
*
|
||||||
* @param string $payer_id
|
* @param string $payer_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPayerId($payer_id)
|
public function setPayerId($payer_id)
|
||||||
@@ -70,7 +70,7 @@ class CreditCardToken extends PayPalModel
|
|||||||
* Last four digits of the stored credit card number.
|
* Last four digits of the stored credit card number.
|
||||||
*
|
*
|
||||||
* @param string $last4
|
* @param string $last4
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setLast4($last4)
|
public function setLast4($last4)
|
||||||
@@ -93,7 +93,7 @@ class CreditCardToken extends PayPalModel
|
|||||||
* Credit card type. Valid types are: `visa`, `mastercard`, `discover`, `amex`. Values are presented in lowercase and not should not be used for display.
|
* Credit card type. Valid types are: `visa`, `mastercard`, `discover`, `amex`. Values are presented in lowercase and not should not be used for display.
|
||||||
*
|
*
|
||||||
* @param string $type
|
* @param string $type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setType($type)
|
public function setType($type)
|
||||||
@@ -116,7 +116,7 @@ class CreditCardToken extends PayPalModel
|
|||||||
* Expiration month with no leading zero. Acceptable values are 1 through 12.
|
* Expiration month with no leading zero. Acceptable values are 1 through 12.
|
||||||
*
|
*
|
||||||
* @param int $expire_month
|
* @param int $expire_month
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setExpireMonth($expire_month)
|
public function setExpireMonth($expire_month)
|
||||||
@@ -139,7 +139,7 @@ class CreditCardToken extends PayPalModel
|
|||||||
* 4-digit expiration year.
|
* 4-digit expiration year.
|
||||||
*
|
*
|
||||||
* @param int $expire_year
|
* @param int $expire_year
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setExpireYear($expire_year)
|
public function setExpireYear($expire_year)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ use PayPal\Validation\NumericValidator;
|
|||||||
class Currency extends PayPalModel
|
class Currency extends PayPalModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 3 letter currency code
|
* 3 letter currency code as defined by ISO 4217.
|
||||||
*
|
*
|
||||||
* @param string $currency
|
* @param string $currency
|
||||||
*
|
*
|
||||||
@@ -32,7 +32,7 @@ class Currency extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 3 letter currency code
|
* 3 letter currency code as defined by ISO 4217.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -42,7 +42,7 @@ class Currency extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* amount upto 2 decimals represented as string
|
* amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code.
|
||||||
*
|
*
|
||||||
* @param string|double $value
|
* @param string|double $value
|
||||||
*
|
*
|
||||||
@@ -57,7 +57,7 @@ class Currency extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* amount upto 2 decimals represented as string
|
* amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ use PayPal\Validation\UrlValidator;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string conversion_date
|
* @property string conversion_date
|
||||||
* @property string from_currency
|
* @property string from_currency
|
||||||
* @property string from_amount
|
* @property string from_amount
|
||||||
* @property string to_currency
|
* @property string to_currency
|
||||||
* @property string to_amount
|
* @property string to_amount
|
||||||
* @property string conversion_type
|
* @property string conversion_type
|
||||||
* @property bool conversion_type_changeable
|
* @property bool conversion_type_changeable
|
||||||
* @property \PayPal\Api\Links[] links
|
* @property \PayPal\Api\Links[] links
|
||||||
*/
|
*/
|
||||||
class CurrencyConversion extends PayPalModel
|
class CurrencyConversion extends PayPalModel
|
||||||
@@ -27,7 +27,7 @@ class CurrencyConversion extends PayPalModel
|
|||||||
* Date of validity for the conversion rate.
|
* Date of validity for the conversion rate.
|
||||||
*
|
*
|
||||||
* @param string $conversion_date
|
* @param string $conversion_date
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setConversionDate($conversion_date)
|
public function setConversionDate($conversion_date)
|
||||||
@@ -50,7 +50,7 @@ class CurrencyConversion extends PayPalModel
|
|||||||
* 3 letter currency code
|
* 3 letter currency code
|
||||||
*
|
*
|
||||||
* @param string $from_currency
|
* @param string $from_currency
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFromCurrency($from_currency)
|
public function setFromCurrency($from_currency)
|
||||||
@@ -70,10 +70,10 @@ class CurrencyConversion extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount participating in currency conversion, set to 1 as default
|
* Amount participating in currency conversion, set to 1 as default
|
||||||
*
|
*
|
||||||
* @param string $from_amount
|
* @param string $from_amount
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFromAmount($from_amount)
|
public function setFromAmount($from_amount)
|
||||||
@@ -83,7 +83,7 @@ class CurrencyConversion extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount participating in currency conversion, set to 1 as default
|
* Amount participating in currency conversion, set to 1 as default
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -96,7 +96,7 @@ class CurrencyConversion extends PayPalModel
|
|||||||
* 3 letter currency code
|
* 3 letter currency code
|
||||||
*
|
*
|
||||||
* @param string $to_currency
|
* @param string $to_currency
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setToCurrency($to_currency)
|
public function setToCurrency($to_currency)
|
||||||
@@ -119,7 +119,7 @@ class CurrencyConversion extends PayPalModel
|
|||||||
* Amount resulting from currency conversion.
|
* Amount resulting from currency conversion.
|
||||||
*
|
*
|
||||||
* @param string $to_amount
|
* @param string $to_amount
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setToAmount($to_amount)
|
public function setToAmount($to_amount)
|
||||||
@@ -143,7 +143,7 @@ class CurrencyConversion extends PayPalModel
|
|||||||
* Valid Values: ["PAYPAL", "VENDOR"]
|
* Valid Values: ["PAYPAL", "VENDOR"]
|
||||||
*
|
*
|
||||||
* @param string $conversion_type
|
* @param string $conversion_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setConversionType($conversion_type)
|
public function setConversionType($conversion_type)
|
||||||
@@ -166,7 +166,7 @@ class CurrencyConversion extends PayPalModel
|
|||||||
* Allow Payer to change conversion type.
|
* Allow Payer to change conversion type.
|
||||||
*
|
*
|
||||||
* @param bool $conversion_type_changeable
|
* @param bool $conversion_type_changeable
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setConversionTypeChangeable($conversion_type_changeable)
|
public function setConversionTypeChangeable($conversion_type_changeable)
|
||||||
@@ -188,7 +188,6 @@ class CurrencyConversion extends PayPalModel
|
|||||||
/**
|
/**
|
||||||
* Base URL to web applications endpoint
|
* Base URL to web applications endpoint
|
||||||
* Valid Values: ["https://www.paypal.com/{country_code}/webapps/xocspartaweb/webflow/sparta/proxwebflow", "https://www.paypal.com/{country_code}/proxflow"]
|
* Valid Values: ["https://www.paypal.com/{country_code}/webapps/xocspartaweb/webflow/sparta/proxwebflow", "https://www.paypal.com/{country_code}/proxflow"]
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param string $web_url
|
* @param string $web_url
|
||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
@@ -203,7 +202,6 @@ class CurrencyConversion extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Base URL to web applications endpoint
|
* Base URL to web applications endpoint
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -216,7 +214,7 @@ class CurrencyConversion extends PayPalModel
|
|||||||
* Sets Links
|
* Sets Links
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Links[] $links
|
* @param \PayPal\Api\Links[] $links
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setLinks($links)
|
public function setLinks($links)
|
||||||
|
|||||||
160
lib/PayPal/Api/DetailedRefund.php
Normal file
160
lib/PayPal/Api/DetailedRefund.php
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PayPal\Api;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class DetailedRefund
|
||||||
|
*
|
||||||
|
* A refund transaction. This is the resource that is returned on GET /refund
|
||||||
|
*
|
||||||
|
* @package PayPal\Api
|
||||||
|
*
|
||||||
|
* @property string custom
|
||||||
|
* @property \PayPal\Api\Currency refund_to_payer
|
||||||
|
* @property \PayPal\Api\ExternalFunding[] refund_to_external_funding
|
||||||
|
* @property \PayPal\Api\Currency refund_from_transaction_fee
|
||||||
|
* @property \PayPal\Api\Currency refund_from_received_amount
|
||||||
|
* @property \PayPal\Api\Currency total_refunded_amount
|
||||||
|
*/
|
||||||
|
class DetailedRefund extends Refund
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* free-form field for the use of clients
|
||||||
|
*
|
||||||
|
* @param string $custom
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setCustom($custom)
|
||||||
|
{
|
||||||
|
$this->custom = $custom;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* free-form field for the use of clients
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getCustom()
|
||||||
|
{
|
||||||
|
return $this->custom;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Amount refunded to payer of the original transaction, in the current Refund call
|
||||||
|
*
|
||||||
|
* @param \PayPal\Api\Currency $refund_to_payer
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setRefundToPayer($refund_to_payer)
|
||||||
|
{
|
||||||
|
$this->refund_to_payer = $refund_to_payer;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Amount refunded to payer of the original transaction, in the current Refund call
|
||||||
|
*
|
||||||
|
* @return \PayPal\Api\Currency
|
||||||
|
*/
|
||||||
|
public function getRefundToPayer()
|
||||||
|
{
|
||||||
|
return $this->refund_to_payer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of external funding that were refunded by the Refund call. Each external_funding unit should have a unique reference_id
|
||||||
|
*
|
||||||
|
* @param \PayPal\Api\ExternalFunding[] $refund_to_external_funding
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setRefundToExternalFunding($refund_to_external_funding)
|
||||||
|
{
|
||||||
|
$this->refund_to_external_funding = $refund_to_external_funding;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of external funding that were refunded by the Refund call. Each external_funding unit should have a unique reference_id
|
||||||
|
*
|
||||||
|
* @return \PayPal\Api\ExternalFunding[]
|
||||||
|
*/
|
||||||
|
public function getRefundToExternalFunding()
|
||||||
|
{
|
||||||
|
return $this->refund_to_external_funding;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transaction fee refunded to original recipient of payment.
|
||||||
|
*
|
||||||
|
* @param \PayPal\Api\Currency $refund_from_transaction_fee
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setRefundFromTransactionFee($refund_from_transaction_fee)
|
||||||
|
{
|
||||||
|
$this->refund_from_transaction_fee = $refund_from_transaction_fee;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transaction fee refunded to original recipient of payment.
|
||||||
|
*
|
||||||
|
* @return \PayPal\Api\Currency
|
||||||
|
*/
|
||||||
|
public function getRefundFromTransactionFee()
|
||||||
|
{
|
||||||
|
return $this->refund_from_transaction_fee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Amount subtracted from PayPal balance of the original recipient of payment, to make this refund.
|
||||||
|
*
|
||||||
|
* @param \PayPal\Api\Currency $refund_from_received_amount
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setRefundFromReceivedAmount($refund_from_received_amount)
|
||||||
|
{
|
||||||
|
$this->refund_from_received_amount = $refund_from_received_amount;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Amount subtracted from PayPal balance of the original recipient of payment, to make this refund.
|
||||||
|
*
|
||||||
|
* @return \PayPal\Api\Currency
|
||||||
|
*/
|
||||||
|
public function getRefundFromReceivedAmount()
|
||||||
|
{
|
||||||
|
return $this->refund_from_received_amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total amount refunded so far from the original purchase. Say, for example, a buyer makes $100 purchase, the buyer was refunded $20 a week ago and is refunded $30 in this transaction. The gross refund amount is $30 (in this transaction). The total refunded amount is $50.
|
||||||
|
*
|
||||||
|
* @param \PayPal\Api\Currency $total_refunded_amount
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setTotalRefundedAmount($total_refunded_amount)
|
||||||
|
{
|
||||||
|
$this->total_refunded_amount = $total_refunded_amount;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total amount refunded so far from the original purchase. Say, for example, a buyer makes $100 purchase, the buyer was refunded $20 a week ago and is refunded $30 in this transaction. The gross refund amount is $30 (in this transaction). The total refunded amount is $50.
|
||||||
|
*
|
||||||
|
* @return \PayPal\Api\Currency
|
||||||
|
*/
|
||||||
|
public function getTotalRefundedAmount()
|
||||||
|
{
|
||||||
|
return $this->total_refunded_amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -28,7 +28,7 @@ class Details extends PayPalModel
|
|||||||
* Amount of the subtotal of the items. **Required** if line items are specified. 10 characters max, with support for 2 decimal places.
|
* Amount of the subtotal of the items. **Required** if line items are specified. 10 characters max, with support for 2 decimal places.
|
||||||
*
|
*
|
||||||
* @param string|double $subtotal
|
* @param string|double $subtotal
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setSubtotal($subtotal)
|
public function setSubtotal($subtotal)
|
||||||
@@ -53,7 +53,7 @@ class Details extends PayPalModel
|
|||||||
* Amount charged for shipping. 10 characters max with support for 2 decimal places.
|
* Amount charged for shipping. 10 characters max with support for 2 decimal places.
|
||||||
*
|
*
|
||||||
* @param string|double $shipping
|
* @param string|double $shipping
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setShipping($shipping)
|
public function setShipping($shipping)
|
||||||
@@ -78,7 +78,7 @@ class Details extends PayPalModel
|
|||||||
* Amount charged for tax. 10 characters max with support for 2 decimal places.
|
* Amount charged for tax. 10 characters max with support for 2 decimal places.
|
||||||
*
|
*
|
||||||
* @param string|double $tax
|
* @param string|double $tax
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setTax($tax)
|
public function setTax($tax)
|
||||||
@@ -103,7 +103,7 @@ class Details extends PayPalModel
|
|||||||
* Amount being charged for the handling fee. Only supported when the `payment_method` is set to `paypal`.
|
* Amount being charged for the handling fee. Only supported when the `payment_method` is set to `paypal`.
|
||||||
*
|
*
|
||||||
* @param string|double $handling_fee
|
* @param string|double $handling_fee
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setHandlingFee($handling_fee)
|
public function setHandlingFee($handling_fee)
|
||||||
@@ -128,7 +128,7 @@ class Details extends PayPalModel
|
|||||||
* Amount being discounted for the shipping fee. Only supported when the `payment_method` is set to `paypal`.
|
* Amount being discounted for the shipping fee. Only supported when the `payment_method` is set to `paypal`.
|
||||||
*
|
*
|
||||||
* @param string|double $shipping_discount
|
* @param string|double $shipping_discount
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setShippingDiscount($shipping_discount)
|
public function setShippingDiscount($shipping_discount)
|
||||||
@@ -153,7 +153,7 @@ class Details extends PayPalModel
|
|||||||
* Amount being charged for the insurance fee. Only supported when the `payment_method` is set to `paypal`.
|
* Amount being charged for the insurance fee. Only supported when the `payment_method` is set to `paypal`.
|
||||||
*
|
*
|
||||||
* @param string|double $insurance
|
* @param string|double $insurance
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setInsurance($insurance)
|
public function setInsurance($insurance)
|
||||||
@@ -178,7 +178,7 @@ class Details extends PayPalModel
|
|||||||
* Amount being charged as gift wrap fee.
|
* Amount being charged as gift wrap fee.
|
||||||
*
|
*
|
||||||
* @param string|double $gift_wrap
|
* @param string|double $gift_wrap
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setGiftWrap($gift_wrap)
|
public function setGiftWrap($gift_wrap)
|
||||||
@@ -203,7 +203,7 @@ class Details extends PayPalModel
|
|||||||
* Fee charged by PayPal. In case of a refund, this is the fee amount refunded to the original receipient of the payment.
|
* Fee charged by PayPal. In case of a refund, this is the fee amount refunded to the original receipient of the payment.
|
||||||
*
|
*
|
||||||
* @param string|double $fee
|
* @param string|double $fee
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFee($fee)
|
public function setFee($fee)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class Error extends PayPalModel
|
|||||||
* Human readable, unique name of the error.
|
* Human readable, unique name of the error.
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setName($name)
|
public function setName($name)
|
||||||
@@ -97,7 +97,7 @@ class Error extends PayPalModel
|
|||||||
* PayPal internal identifier used for correlation purposes.
|
* PayPal internal identifier used for correlation purposes.
|
||||||
*
|
*
|
||||||
* @param string $debug_id
|
* @param string $debug_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setDebugId($debug_id)
|
public function setDebugId($debug_id)
|
||||||
@@ -120,7 +120,7 @@ class Error extends PayPalModel
|
|||||||
* Message describing the error.
|
* Message describing the error.
|
||||||
*
|
*
|
||||||
* @param string $message
|
* @param string $message
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setMessage($message)
|
public function setMessage($message)
|
||||||
@@ -143,7 +143,7 @@ class Error extends PayPalModel
|
|||||||
* URI for detailed information related to this error for the developer.
|
* URI for detailed information related to this error for the developer.
|
||||||
*
|
*
|
||||||
* @param string $information_link
|
* @param string $information_link
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setInformationLink($information_link)
|
public function setInformationLink($information_link)
|
||||||
@@ -166,7 +166,7 @@ class Error extends PayPalModel
|
|||||||
* Additional details of the error
|
* Additional details of the error
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\ErrorDetails[] $details
|
* @param \PayPal\Api\ErrorDetails[] $details
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setDetails($details)
|
public function setDetails($details)
|
||||||
|
|||||||
@@ -64,10 +64,9 @@ class ErrorDetails extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference ID of the purchase_unit associated with this error
|
* Reference ID of the purchase_unit associated with this error
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param string $purchase_unit_reference_id
|
* @param string $purchase_unit_reference_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPurchaseUnitReferenceId($purchase_unit_reference_id)
|
public function setPurchaseUnitReferenceId($purchase_unit_reference_id)
|
||||||
@@ -78,7 +77,6 @@ class ErrorDetails extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference ID of the purchase_unit associated with this error
|
* Reference ID of the purchase_unit associated with this error
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -89,10 +87,9 @@ class ErrorDetails extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* PayPal internal error code.
|
* PayPal internal error code.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param string $code
|
* @param string $code
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCode($code)
|
public function setCode($code)
|
||||||
@@ -103,7 +100,6 @@ class ErrorDetails extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* PayPal internal error code.
|
* PayPal internal error code.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -14,10 +14,9 @@ class ExtendedBankAccount extends BankAccount
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Identifier of the direct debit mandate to validate. Currently supported only for EU bank accounts(SEPA).
|
* Identifier of the direct debit mandate to validate. Currently supported only for EU bank accounts(SEPA).
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param string $mandate_reference_number
|
* @param string $mandate_reference_number
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setMandateReferenceNumber($mandate_reference_number)
|
public function setMandateReferenceNumber($mandate_reference_number)
|
||||||
@@ -28,7 +27,6 @@ class ExtendedBankAccount extends BankAccount
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Identifier of the direct debit mandate to validate. Currently supported only for EU bank accounts(SEPA).
|
* Identifier of the direct debit mandate to validate. Currently supported only for EU bank accounts(SEPA).
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ use PayPal\Common\PayPalModel;
|
|||||||
* @property string funding_account_id
|
* @property string funding_account_id
|
||||||
* @property string display_text
|
* @property string display_text
|
||||||
* @property \PayPal\Api\Amount amount
|
* @property \PayPal\Api\Amount amount
|
||||||
|
* @property string funding_instruction
|
||||||
*/
|
*/
|
||||||
class ExternalFunding extends PayPalModel
|
class ExternalFunding extends PayPalModel
|
||||||
{
|
{
|
||||||
@@ -134,4 +135,27 @@ class ExternalFunding extends PayPalModel
|
|||||||
return $this->amount;
|
return $this->amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that the Payment should be fully funded by External Funded Incentive
|
||||||
|
* Valid Values: ["FULLY_FUNDED"]
|
||||||
|
*
|
||||||
|
* @param string $funding_instruction
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setFundingInstruction($funding_instruction)
|
||||||
|
{
|
||||||
|
$this->funding_instruction = $funding_instruction;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that the Payment should be fully funded by External Funded Incentive
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getFundingInstruction()
|
||||||
|
{
|
||||||
|
return $this->funding_instruction;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class FmfDetails extends PayPalModel
|
|||||||
* Valid Values: ["ACCEPT", "PENDING", "DENY", "REPORT"]
|
* Valid Values: ["ACCEPT", "PENDING", "DENY", "REPORT"]
|
||||||
*
|
*
|
||||||
* @param string $filter_type
|
* @param string $filter_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFilterType($filter_type)
|
public function setFilterType($filter_type)
|
||||||
@@ -47,7 +47,7 @@ class FmfDetails extends PayPalModel
|
|||||||
* Valid Values: ["AVS_NO_MATCH", "AVS_PARTIAL_MATCH", "AVS_UNAVAILABLE_OR_UNSUPPORTED", "CARD_SECURITY_CODE_MISMATCH", "MAXIMUM_TRANSACTION_AMOUNT", "UNCONFIRMED_ADDRESS", "COUNTRY_MONITOR", "LARGE_ORDER_NUMBER", "BILLING_OR_SHIPPING_ADDRESS_MISMATCH", "RISKY_ZIP_CODE", "SUSPECTED_FREIGHT_FORWARDER_CHECK", "TOTAL_PURCHASE_PRICE_MINIMUM", "IP_ADDRESS_VELOCITY", "RISKY_EMAIL_ADDRESS_DOMAIN_CHECK", "RISKY_BANK_IDENTIFICATION_NUMBER_CHECK", "RISKY_IP_ADDRESS_RANGE", "PAYPAL_FRAUD_MODEL"]
|
* Valid Values: ["AVS_NO_MATCH", "AVS_PARTIAL_MATCH", "AVS_UNAVAILABLE_OR_UNSUPPORTED", "CARD_SECURITY_CODE_MISMATCH", "MAXIMUM_TRANSACTION_AMOUNT", "UNCONFIRMED_ADDRESS", "COUNTRY_MONITOR", "LARGE_ORDER_NUMBER", "BILLING_OR_SHIPPING_ADDRESS_MISMATCH", "RISKY_ZIP_CODE", "SUSPECTED_FREIGHT_FORWARDER_CHECK", "TOTAL_PURCHASE_PRICE_MINIMUM", "IP_ADDRESS_VELOCITY", "RISKY_EMAIL_ADDRESS_DOMAIN_CHECK", "RISKY_BANK_IDENTIFICATION_NUMBER_CHECK", "RISKY_IP_ADDRESS_RANGE", "PAYPAL_FRAUD_MODEL"]
|
||||||
*
|
*
|
||||||
* @param string $filter_id
|
* @param string $filter_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFilterId($filter_id)
|
public function setFilterId($filter_id)
|
||||||
@@ -70,7 +70,7 @@ class FmfDetails extends PayPalModel
|
|||||||
* Name of the filter
|
* Name of the filter
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setName($name)
|
public function setName($name)
|
||||||
@@ -93,7 +93,7 @@ class FmfDetails extends PayPalModel
|
|||||||
* Description of the filter.
|
* Description of the filter.
|
||||||
*
|
*
|
||||||
* @param string $description
|
* @param string $description
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setDescription($description)
|
public function setDescription($description)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class FundingDetail extends PayPalModel
|
|||||||
* Expected clearing time
|
* Expected clearing time
|
||||||
*
|
*
|
||||||
* @param string $clearing_time
|
* @param string $clearing_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setClearingTime($clearing_time)
|
public function setClearingTime($clearing_time)
|
||||||
@@ -45,7 +45,7 @@ class FundingDetail extends PayPalModel
|
|||||||
* [DEPRECATED] Hold-off duration of the payment. payment_debit_date should be used instead.
|
* [DEPRECATED] Hold-off duration of the payment. payment_debit_date should be used instead.
|
||||||
*
|
*
|
||||||
* @param string $payment_hold_date
|
* @param string $payment_hold_date
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPaymentHoldDate($payment_hold_date)
|
public function setPaymentHoldDate($payment_hold_date)
|
||||||
@@ -68,7 +68,7 @@ class FundingDetail extends PayPalModel
|
|||||||
* Date when funds will be debited from the payer's account
|
* Date when funds will be debited from the payer's account
|
||||||
*
|
*
|
||||||
* @param string $payment_debit_date
|
* @param string $payment_debit_date
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPaymentDebitDate($payment_debit_date)
|
public function setPaymentDebitDate($payment_debit_date)
|
||||||
@@ -89,10 +89,10 @@ class FundingDetail extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Processing type of the payment card
|
* Processing type of the payment card
|
||||||
* Valid Values: ["PINLESS_DEBIT"]
|
* Valid Values: ["CUP_SECURE", "PINLESS_DEBIT"]
|
||||||
*
|
*
|
||||||
* @param string $processing_type
|
* @param string $processing_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setProcessingType($processing_type)
|
public function setProcessingType($processing_type)
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ use PayPal\Common\PayPalModel;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property \PayPal\Api\CreditCard credit_card
|
* @property \PayPal\Api\CreditCard credit_card
|
||||||
* @property \PayPal\Api\CreditCardToken credit_card_token
|
* @property \PayPal\Api\CreditCardToken credit_card_token
|
||||||
* @property \PayPal\Api\Billing billing
|
* @property \PayPal\Api\Billing billing
|
||||||
*/
|
*/
|
||||||
class FundingInstrument extends PayPalModel
|
class FundingInstrument extends PayPalModel
|
||||||
{
|
{
|
||||||
@@ -34,7 +34,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
* Credit Card instrument.
|
* Credit Card instrument.
|
||||||
*
|
*
|
||||||
* @return \PayPal\Api\CreditCard
|
* @return \PayPal\Api\CreditCard
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public function getCreditCard()
|
public function getCreditCard()
|
||||||
{
|
{
|
||||||
@@ -89,7 +88,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Bank Account information.
|
* Bank Account information.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\ExtendedBankAccount $bank_account
|
* @param \PayPal\Api\ExtendedBankAccount $bank_account
|
||||||
*
|
*
|
||||||
@@ -103,7 +101,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Bank Account information.
|
* Bank Account information.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\ExtendedBankAccount
|
* @return \PayPal\Api\ExtendedBankAccount
|
||||||
*/
|
*/
|
||||||
@@ -114,7 +111,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Vaulted bank account instrument.
|
* Vaulted bank account instrument.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\BankToken $bank_account_token
|
* @param \PayPal\Api\BankToken $bank_account_token
|
||||||
*
|
*
|
||||||
@@ -128,7 +124,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Vaulted bank account instrument.
|
* Vaulted bank account instrument.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\BankToken
|
* @return \PayPal\Api\BankToken
|
||||||
*/
|
*/
|
||||||
@@ -139,7 +134,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* PayPal credit funding instrument.
|
* PayPal credit funding instrument.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\Credit $credit
|
* @param \PayPal\Api\Credit $credit
|
||||||
*
|
*
|
||||||
@@ -153,7 +147,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* PayPal credit funding instrument.
|
* PayPal credit funding instrument.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\Credit
|
* @return \PayPal\Api\Credit
|
||||||
*/
|
*/
|
||||||
@@ -164,7 +157,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Incentive funding instrument.
|
* Incentive funding instrument.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\Incentive $incentive
|
* @param \PayPal\Api\Incentive $incentive
|
||||||
*
|
*
|
||||||
@@ -178,7 +170,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Incentive funding instrument.
|
* Incentive funding instrument.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\Incentive
|
* @return \PayPal\Api\Incentive
|
||||||
*/
|
*/
|
||||||
@@ -189,7 +180,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* External funding instrument.
|
* External funding instrument.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\ExternalFunding $external_funding
|
* @param \PayPal\Api\ExternalFunding $external_funding
|
||||||
*
|
*
|
||||||
@@ -203,7 +193,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* External funding instrument.
|
* External funding instrument.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\ExternalFunding
|
* @return \PayPal\Api\ExternalFunding
|
||||||
*/
|
*/
|
||||||
@@ -214,7 +203,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Carrier account token instrument.
|
* Carrier account token instrument.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\CarrierAccountToken $carrier_account_token
|
* @param \PayPal\Api\CarrierAccountToken $carrier_account_token
|
||||||
*
|
*
|
||||||
@@ -228,7 +216,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Carrier account token instrument.
|
* Carrier account token instrument.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\CarrierAccountToken
|
* @return \PayPal\Api\CarrierAccountToken
|
||||||
*/
|
*/
|
||||||
@@ -239,7 +226,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Carrier account instrument
|
* Carrier account instrument
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\CarrierAccount $carrier_account
|
* @param \PayPal\Api\CarrierAccount $carrier_account
|
||||||
*
|
*
|
||||||
@@ -253,7 +239,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Carrier account instrument
|
* Carrier account instrument
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\CarrierAccount
|
* @return \PayPal\Api\CarrierAccount
|
||||||
*/
|
*/
|
||||||
@@ -264,7 +249,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Private Label Card funding instrument. These are store cards provided by merchants to drive business with value to customer with convenience and rewards.
|
* Private Label Card funding instrument. These are store cards provided by merchants to drive business with value to customer with convenience and rewards.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\PrivateLabelCard $private_label_card
|
* @param \PayPal\Api\PrivateLabelCard $private_label_card
|
||||||
*
|
*
|
||||||
@@ -278,7 +262,6 @@ class FundingInstrument extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Private Label Card funding instrument. These are store cards provided by merchants to drive business with value to customer with convenience and rewards.
|
* Private Label Card funding instrument. These are store cards provided by merchants to drive business with value to customer with convenience and rewards.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\PrivateLabelCard
|
* @return \PayPal\Api\PrivateLabelCard
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -11,25 +11,24 @@ use PayPal\Common\PayPalModel;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string funding_mode
|
* @property string funding_mode
|
||||||
* @property string funding_instrument_type
|
* @property string funding_instrument_type
|
||||||
* @property string soft_descriptor
|
* @property string soft_descriptor
|
||||||
* @property \PayPal\Api\Currency amount
|
* @property \PayPal\Api\Currency amount
|
||||||
* @property \PayPal\Api\Currency negative_balance_amount
|
* @property \PayPal\Api\Currency negative_balance_amount
|
||||||
* @property string legal_text
|
* @property string legal_text
|
||||||
* @property \PayPal\Api\FundingDetail funding_detail
|
* @property \PayPal\Api\FundingDetail funding_detail
|
||||||
* @property string additional_text
|
* @property string additional_text
|
||||||
* @property \PayPal\Api\FundingInstrument extends
|
* @property \PayPal\Api\Links[] links
|
||||||
* @property \PayPal\Api\Links[] links
|
|
||||||
*/
|
*/
|
||||||
class FundingSource extends PayPalModel
|
class FundingSource extends FundingInstrument
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* specifies funding mode of the instrument
|
* specifies funding mode of the instrument
|
||||||
* Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
|
* Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK", "PAY_UPON_INVOICE"]
|
||||||
*
|
*
|
||||||
* @param string $funding_mode
|
* @param string $funding_mode
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFundingMode($funding_mode)
|
public function setFundingMode($funding_mode)
|
||||||
@@ -50,10 +49,10 @@ class FundingSource extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Instrument type for this funding source
|
* Instrument type for this funding source
|
||||||
* Valid Values: ["BALANCE", "PAYMENT_CARD", "BANK_ACCOUNT", "CREDIT", "INCENTIVE"]
|
* Valid Values: ["BALANCE", "PAYMENT_CARD", "BANK_ACCOUNT", "CREDIT", "INCENTIVE", "EXTERNAL_FUNDING", "TAB"]
|
||||||
*
|
*
|
||||||
* @param string $funding_instrument_type
|
* @param string $funding_instrument_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFundingInstrumentType($funding_instrument_type)
|
public function setFundingInstrumentType($funding_instrument_type)
|
||||||
@@ -76,7 +75,7 @@ class FundingSource extends PayPalModel
|
|||||||
* Soft descriptor used when charging this funding source.
|
* Soft descriptor used when charging this funding source.
|
||||||
*
|
*
|
||||||
* @param string $soft_descriptor
|
* @param string $soft_descriptor
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setSoftDescriptor($soft_descriptor)
|
public function setSoftDescriptor($soft_descriptor)
|
||||||
@@ -99,7 +98,7 @@ class FundingSource extends PayPalModel
|
|||||||
* Total anticipated amount of money to be pulled from instrument.
|
* Total anticipated amount of money to be pulled from instrument.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Currency $amount
|
* @param \PayPal\Api\Currency $amount
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAmount($amount)
|
public function setAmount($amount)
|
||||||
@@ -119,33 +118,33 @@ class FundingSource extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Additional amount to be pulled from the instrument to recover a negative balance on the buyer
|
* Additional amount to be pulled from the instrument to recover a negative balance on the buyer's account that is owed to PayPal.
|
||||||
*
|
|
||||||
* @param \PayPal\Api\Currency $amount
|
|
||||||
*
|
*
|
||||||
|
* @param \PayPal\Api\Currency $negative_balance_amount
|
||||||
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setNegativeBalanceAmount($amount)
|
public function setNegativeBalanceAmount($negative_balance_amount)
|
||||||
{
|
{
|
||||||
$this->amount = $amount;
|
$this->negative_balance_amount = $negative_balance_amount;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Additional amount to be pulled from the instrument to recover a negative balance on the buyer
|
* Additional amount to be pulled from the instrument to recover a negative balance on the buyer's account that is owed to PayPal.
|
||||||
*
|
*
|
||||||
* @return \PayPal\Api\Currency
|
* @return \PayPal\Api\Currency
|
||||||
*/
|
*/
|
||||||
public function getNegativeBalanceAmount()
|
public function getNegativeBalanceAmount()
|
||||||
{
|
{
|
||||||
return $this->amount;
|
return $this->negative_balance_amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Localized legal text relevant to funding source.
|
* Localized legal text relevant to funding source.
|
||||||
*
|
*
|
||||||
* @param string $legal_text
|
* @param string $legal_text
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setLegalText($legal_text)
|
public function setLegalText($legal_text)
|
||||||
@@ -168,7 +167,7 @@ class FundingSource extends PayPalModel
|
|||||||
* Additional detail of the funding.
|
* Additional detail of the funding.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\FundingDetail $funding_detail
|
* @param \PayPal\Api\FundingDetail $funding_detail
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFundingDetail($funding_detail)
|
public function setFundingDetail($funding_detail)
|
||||||
@@ -191,7 +190,7 @@ class FundingSource extends PayPalModel
|
|||||||
* Additional text relevant to funding source.
|
* Additional text relevant to funding source.
|
||||||
*
|
*
|
||||||
* @param string $additional_text
|
* @param string $additional_text
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAdditionalText($additional_text)
|
public function setAdditionalText($additional_text)
|
||||||
@@ -215,6 +214,8 @@ class FundingSource extends PayPalModel
|
|||||||
*
|
*
|
||||||
* @param \PayPal\Api\FundingInstrument $extends
|
* @param \PayPal\Api\FundingInstrument $extends
|
||||||
*
|
*
|
||||||
|
* @deprecated Unused
|
||||||
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setExtends($extends)
|
public function setExtends($extends)
|
||||||
@@ -226,6 +227,8 @@ class FundingSource extends PayPalModel
|
|||||||
/**
|
/**
|
||||||
* Gets Extends
|
* Gets Extends
|
||||||
*
|
*
|
||||||
|
* @deprecated Unused
|
||||||
|
*
|
||||||
* @return \PayPal\Api\FundingInstrument
|
* @return \PayPal\Api\FundingInstrument
|
||||||
*/
|
*/
|
||||||
public function getExtends()
|
public function getExtends()
|
||||||
@@ -237,7 +240,7 @@ class FundingSource extends PayPalModel
|
|||||||
* Sets Links
|
* Sets Links
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Links[] $links
|
* @param \PayPal\Api\Links[] $links
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setLinks($links)
|
public function setLinks($links)
|
||||||
|
|||||||
@@ -12,15 +12,15 @@ use PayPal\Validation\UrlValidator;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string id
|
* @property string id
|
||||||
* @property string code
|
* @property string code
|
||||||
* @property string name
|
* @property string name
|
||||||
* @property string description
|
* @property string description
|
||||||
* @property \PayPal\Api\Currency minimum_purchase_amount
|
* @property \PayPal\Api\Currency minimum_purchase_amount
|
||||||
* @property string logo_image_url
|
* @property string logo_image_url
|
||||||
* @property string expiry_date
|
* @property string expiry_date
|
||||||
* @property string type
|
* @property string type
|
||||||
* @property string terms
|
* @property string terms
|
||||||
*/
|
*/
|
||||||
class Incentive extends PayPalModel
|
class Incentive extends PayPalModel
|
||||||
{
|
{
|
||||||
@@ -28,7 +28,7 @@ class Incentive extends PayPalModel
|
|||||||
* Identifier of the instrument in PayPal Wallet
|
* Identifier of the instrument in PayPal Wallet
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setId($id)
|
public function setId($id)
|
||||||
@@ -51,7 +51,7 @@ class Incentive extends PayPalModel
|
|||||||
* Code that identifies the incentive.
|
* Code that identifies the incentive.
|
||||||
*
|
*
|
||||||
* @param string $code
|
* @param string $code
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCode($code)
|
public function setCode($code)
|
||||||
@@ -74,7 +74,7 @@ class Incentive extends PayPalModel
|
|||||||
* Name of the incentive.
|
* Name of the incentive.
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setName($name)
|
public function setName($name)
|
||||||
@@ -97,7 +97,7 @@ class Incentive extends PayPalModel
|
|||||||
* Description of the incentive.
|
* Description of the incentive.
|
||||||
*
|
*
|
||||||
* @param string $description
|
* @param string $description
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setDescription($description)
|
public function setDescription($description)
|
||||||
@@ -120,7 +120,7 @@ class Incentive extends PayPalModel
|
|||||||
* Indicates incentive is applicable for this minimum purchase amount.
|
* Indicates incentive is applicable for this minimum purchase amount.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Currency $minimum_purchase_amount
|
* @param \PayPal\Api\Currency $minimum_purchase_amount
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setMinimumPurchaseAmount($minimum_purchase_amount)
|
public function setMinimumPurchaseAmount($minimum_purchase_amount)
|
||||||
@@ -167,7 +167,7 @@ class Incentive extends PayPalModel
|
|||||||
* expiry date of the incentive.
|
* expiry date of the incentive.
|
||||||
*
|
*
|
||||||
* @param string $expiry_date
|
* @param string $expiry_date
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setExpiryDate($expiry_date)
|
public function setExpiryDate($expiry_date)
|
||||||
@@ -191,7 +191,7 @@ class Incentive extends PayPalModel
|
|||||||
* Valid Values: ["COUPON", "GIFT_CARD", "MERCHANT_SPECIFIC_BALANCE", "VOUCHER"]
|
* Valid Values: ["COUPON", "GIFT_CARD", "MERCHANT_SPECIFIC_BALANCE", "VOUCHER"]
|
||||||
*
|
*
|
||||||
* @param string $type
|
* @param string $type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setType($type)
|
public function setType($type)
|
||||||
@@ -214,7 +214,7 @@ class Incentive extends PayPalModel
|
|||||||
* URI to the associated terms
|
* URI to the associated terms
|
||||||
*
|
*
|
||||||
* @param string $terms
|
* @param string $terms
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setTerms($terms)
|
public function setTerms($terms)
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ use PayPal\Common\PayPalModel;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property int term
|
* @property int term
|
||||||
* @property \PayPal\Api\Currency monthly_payment
|
* @property \PayPal\Api\Currency monthly_payment
|
||||||
* @property \PayPal\Api\Currency discount_amount
|
* @property \PayPal\Api\Currency discount_amount
|
||||||
* @property string discount_percentage
|
* @property string discount_percentage
|
||||||
*/
|
*/
|
||||||
class InstallmentOption extends PayPalModel
|
class InstallmentOption extends PayPalModel
|
||||||
@@ -22,7 +22,7 @@ class InstallmentOption extends PayPalModel
|
|||||||
* Number of installments
|
* Number of installments
|
||||||
*
|
*
|
||||||
* @param int $term
|
* @param int $term
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setTerm($term)
|
public function setTerm($term)
|
||||||
@@ -45,7 +45,7 @@ class InstallmentOption extends PayPalModel
|
|||||||
* Monthly payment
|
* Monthly payment
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Currency $monthly_payment
|
* @param \PayPal\Api\Currency $monthly_payment
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setMonthlyPayment($monthly_payment)
|
public function setMonthlyPayment($monthly_payment)
|
||||||
@@ -68,7 +68,7 @@ class InstallmentOption extends PayPalModel
|
|||||||
* Discount amount applied to the payment, if any
|
* Discount amount applied to the payment, if any
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Currency $discount_amount
|
* @param \PayPal\Api\Currency $discount_amount
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setDiscountAmount($discount_amount)
|
public function setDiscountAmount($discount_amount)
|
||||||
@@ -91,7 +91,7 @@ class InstallmentOption extends PayPalModel
|
|||||||
* Discount percentage applied to the payment, if any
|
* Discount percentage applied to the payment, if any
|
||||||
*
|
*
|
||||||
* @param string $discount_percentage
|
* @param string $discount_percentage
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setDiscountPercentage($discount_percentage)
|
public function setDiscountPercentage($discount_percentage)
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ use PayPal\Validation\UrlValidator;
|
|||||||
* @property string currency
|
* @property string currency
|
||||||
* @property string tax
|
* @property string tax
|
||||||
* @property string url
|
* @property string url
|
||||||
* @property string category
|
|
||||||
*/
|
*/
|
||||||
class Item extends PayPalModel
|
class Item extends PayPalModel
|
||||||
{
|
{
|
||||||
@@ -30,7 +29,7 @@ class Item extends PayPalModel
|
|||||||
* Stock keeping unit corresponding (SKU) to item.
|
* Stock keeping unit corresponding (SKU) to item.
|
||||||
*
|
*
|
||||||
* @param string $sku
|
* @param string $sku
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setSku($sku)
|
public function setSku($sku)
|
||||||
@@ -53,7 +52,7 @@ class Item extends PayPalModel
|
|||||||
* Item name. 127 characters max.
|
* Item name. 127 characters max.
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setName($name)
|
public function setName($name)
|
||||||
@@ -76,7 +75,7 @@ class Item extends PayPalModel
|
|||||||
* Description of the item. Only supported when the `payment_method` is set to `paypal`.
|
* Description of the item. Only supported when the `payment_method` is set to `paypal`.
|
||||||
*
|
*
|
||||||
* @param string $description
|
* @param string $description
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setDescription($description)
|
public function setDescription($description)
|
||||||
@@ -99,7 +98,7 @@ class Item extends PayPalModel
|
|||||||
* Number of a particular item. 10 characters max.
|
* Number of a particular item. 10 characters max.
|
||||||
*
|
*
|
||||||
* @param string $quantity
|
* @param string $quantity
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setQuantity($quantity)
|
public function setQuantity($quantity)
|
||||||
@@ -122,7 +121,7 @@ class Item extends PayPalModel
|
|||||||
* Item cost. 10 characters max.
|
* Item cost. 10 characters max.
|
||||||
*
|
*
|
||||||
* @param string|double $price
|
* @param string|double $price
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPrice($price)
|
public function setPrice($price)
|
||||||
@@ -147,7 +146,7 @@ class Item extends PayPalModel
|
|||||||
* 3-letter [currency code](https://developer.paypal.com/docs/integration/direct/rest_api_payment_country_currency_support/).
|
* 3-letter [currency code](https://developer.paypal.com/docs/integration/direct/rest_api_payment_country_currency_support/).
|
||||||
*
|
*
|
||||||
* @param string $currency
|
* @param string $currency
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCurrency($currency)
|
public function setCurrency($currency)
|
||||||
@@ -170,7 +169,7 @@ class Item extends PayPalModel
|
|||||||
* Tax of the item. Only supported when the `payment_method` is set to `paypal`.
|
* Tax of the item. Only supported when the `payment_method` is set to `paypal`.
|
||||||
*
|
*
|
||||||
* @param string|double $tax
|
* @param string|double $tax
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setTax($tax)
|
public function setTax($tax)
|
||||||
@@ -218,9 +217,9 @@ class Item extends PayPalModel
|
|||||||
/**
|
/**
|
||||||
* Category type of the item.
|
* Category type of the item.
|
||||||
* Valid Values: ["DIGITAL", "PHYSICAL"]
|
* Valid Values: ["DIGITAL", "PHYSICAL"]
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param string $category
|
* @param string $category
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCategory($category)
|
public function setCategory($category)
|
||||||
@@ -231,7 +230,7 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Category type of the item.
|
* Category type of the item.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getCategory()
|
public function getCategory()
|
||||||
@@ -241,10 +240,9 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Weight of the item.
|
* Weight of the item.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\Measurement $weight
|
* @param \PayPal\Api\Measurement $weight
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setWeight($weight)
|
public function setWeight($weight)
|
||||||
@@ -255,7 +253,6 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Weight of the item.
|
* Weight of the item.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\Measurement
|
* @return \PayPal\Api\Measurement
|
||||||
*/
|
*/
|
||||||
@@ -266,10 +263,9 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Length of the item.
|
* Length of the item.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\Measurement $length
|
* @param \PayPal\Api\Measurement $length
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setLength($length)
|
public function setLength($length)
|
||||||
@@ -280,7 +276,6 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Length of the item.
|
* Length of the item.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\Measurement
|
* @return \PayPal\Api\Measurement
|
||||||
*/
|
*/
|
||||||
@@ -291,10 +286,9 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Height of the item.
|
* Height of the item.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\Measurement $height
|
* @param \PayPal\Api\Measurement $height
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setHeight($height)
|
public function setHeight($height)
|
||||||
@@ -305,7 +299,6 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Height of the item.
|
* Height of the item.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\Measurement
|
* @return \PayPal\Api\Measurement
|
||||||
*/
|
*/
|
||||||
@@ -316,10 +309,9 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Width of the item.
|
* Width of the item.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\Measurement $width
|
* @param \PayPal\Api\Measurement $width
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setWidth($width)
|
public function setWidth($width)
|
||||||
@@ -330,7 +322,6 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Width of the item.
|
* Width of the item.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\Measurement
|
* @return \PayPal\Api\Measurement
|
||||||
*/
|
*/
|
||||||
@@ -341,10 +332,9 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set of optional data used for PayPal risk determination.
|
* Set of optional data used for PayPal risk determination.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\NameValuePair[] $supplementary_data
|
* @param \PayPal\Api\NameValuePair[] $supplementary_data
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setSupplementaryData($supplementary_data)
|
public function setSupplementaryData($supplementary_data)
|
||||||
@@ -355,7 +345,6 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set of optional data used for PayPal risk determination.
|
* Set of optional data used for PayPal risk determination.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\NameValuePair[]
|
* @return \PayPal\Api\NameValuePair[]
|
||||||
*/
|
*/
|
||||||
@@ -366,7 +355,6 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Append SupplementaryData to the list.
|
* Append SupplementaryData to the list.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\NameValuePair $nameValuePair
|
* @param \PayPal\Api\NameValuePair $nameValuePair
|
||||||
* @return $this
|
* @return $this
|
||||||
@@ -384,7 +372,6 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove SupplementaryData from the list.
|
* Remove SupplementaryData from the list.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\NameValuePair $nameValuePair
|
* @param \PayPal\Api\NameValuePair $nameValuePair
|
||||||
* @return $this
|
* @return $this
|
||||||
@@ -398,10 +385,9 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set of optional data used for PayPal post-transaction notifications.
|
* Set of optional data used for PayPal post-transaction notifications.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\NameValuePair[] $postback_data
|
* @param \PayPal\Api\NameValuePair[] $postback_data
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPostbackData($postback_data)
|
public function setPostbackData($postback_data)
|
||||||
@@ -412,7 +398,6 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set of optional data used for PayPal post-transaction notifications.
|
* Set of optional data used for PayPal post-transaction notifications.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\NameValuePair[]
|
* @return \PayPal\Api\NameValuePair[]
|
||||||
*/
|
*/
|
||||||
@@ -423,7 +408,6 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Append PostbackData to the list.
|
* Append PostbackData to the list.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\NameValuePair $nameValuePair
|
* @param \PayPal\Api\NameValuePair $nameValuePair
|
||||||
* @return $this
|
* @return $this
|
||||||
@@ -441,7 +425,6 @@ class Item extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove PostbackData from the list.
|
* Remove PostbackData from the list.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\NameValuePair $nameValuePair
|
* @param \PayPal\Api\NameValuePair $nameValuePair
|
||||||
* @return $this
|
* @return $this
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ use PayPal\Common\PayPalModel;
|
|||||||
/**
|
/**
|
||||||
* Class ItemList
|
* Class ItemList
|
||||||
*
|
*
|
||||||
* Items and related shipping address within a transaction.
|
* List of items being paid for.
|
||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property \PayPal\Api\Item[] items
|
* @property \PayPal\Api\Item[] items
|
||||||
* @property \PayPal\Api\ShippingAddress shipping_address
|
* @property \PayPal\Api\ShippingAddress shipping_address
|
||||||
* @property string shipping_method
|
* @property string shipping_method
|
||||||
* @property string shipping_phone_number
|
* @property string shipping_phone_number
|
||||||
*/
|
*/
|
||||||
class ItemList extends PayPalModel
|
class ItemList extends PayPalModel
|
||||||
{
|
{
|
||||||
@@ -22,7 +22,7 @@ class ItemList extends PayPalModel
|
|||||||
* List of items.
|
* List of items.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Item[] $items
|
* @param \PayPal\Api\Item[] $items
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setItems($items)
|
public function setItems($items)
|
||||||
@@ -72,10 +72,10 @@ class ItemList extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shipping address, if different than the payer address.
|
* Shipping address.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\ShippingAddress $shipping_address
|
* @param \PayPal\Api\ShippingAddress $shipping_address
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setShippingAddress($shipping_address)
|
public function setShippingAddress($shipping_address)
|
||||||
@@ -85,7 +85,7 @@ class ItemList extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shipping address, if different than the payer address.
|
* Shipping address.
|
||||||
*
|
*
|
||||||
* @return \PayPal\Api\ShippingAddress
|
* @return \PayPal\Api\ShippingAddress
|
||||||
*/
|
*/
|
||||||
@@ -98,7 +98,7 @@ class ItemList extends PayPalModel
|
|||||||
* Shipping method used for this payment like USPSParcel etc.
|
* Shipping method used for this payment like USPSParcel etc.
|
||||||
*
|
*
|
||||||
* @param string $shipping_method
|
* @param string $shipping_method
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setShippingMethod($shipping_method)
|
public function setShippingMethod($shipping_method)
|
||||||
@@ -121,7 +121,7 @@ class ItemList extends PayPalModel
|
|||||||
* Allows merchant's to share payer’s contact number with PayPal for the current payment. Final contact number of payer associated with the transaction might be same as shipping_phone_number or different based on Payer’s action on PayPal. The phone number must be represented in its canonical international format, as defined by the E.164 numbering plan
|
* Allows merchant's to share payer’s contact number with PayPal for the current payment. Final contact number of payer associated with the transaction might be same as shipping_phone_number or different based on Payer’s action on PayPal. The phone number must be represented in its canonical international format, as defined by the E.164 numbering plan
|
||||||
*
|
*
|
||||||
* @param string $shipping_phone_number
|
* @param string $shipping_phone_number
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setShippingPhoneNumber($shipping_phone_number)
|
public function setShippingPhoneNumber($shipping_phone_number)
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
use PayPal\Validation\ArgumentValidator;
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
use PayPal\Rest\ApiContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Order
|
* Class Order
|
||||||
@@ -13,20 +13,20 @@ use PayPal\Validation\ArgumentValidator;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string id
|
* @property string id
|
||||||
* @property string purchase_unit_reference_id
|
* @property string reference_id
|
||||||
* @property \PayPal\Api\Amount amount
|
* @property \PayPal\Api\Amount amount
|
||||||
* @property string payment_mode
|
* @property string payment_mode
|
||||||
* @property string state
|
* @property string state
|
||||||
* @property string reason_code
|
* @property string reason_code
|
||||||
* @property string pending_reason
|
* @property string pending_reason
|
||||||
* @property string protection_eligibility
|
* @property string protection_eligibility
|
||||||
* @property string protection_eligibility_type
|
* @property string protection_eligibility_type
|
||||||
* @property string parent_payment
|
* @property string parent_payment
|
||||||
* @property \PayPal\Api\FmfDetails fmf_details
|
* @property \PayPal\Api\FmfDetails fmf_details
|
||||||
* @property string create_time
|
* @property string create_time
|
||||||
* @property string update_time
|
* @property string update_time
|
||||||
* @property \PayPal\Api\Links[] links
|
* @property \PayPal\Api\Links[] links
|
||||||
*/
|
*/
|
||||||
class Order extends PayPalResourceModel
|
class Order extends PayPalResourceModel
|
||||||
{
|
{
|
||||||
@@ -34,7 +34,7 @@ class Order extends PayPalResourceModel
|
|||||||
* Identifier of the order transaction.
|
* Identifier of the order transaction.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setId($id)
|
public function setId($id)
|
||||||
@@ -56,6 +56,8 @@ class Order extends PayPalResourceModel
|
|||||||
/**
|
/**
|
||||||
* Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
|
* Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
|
||||||
*
|
*
|
||||||
|
* @deprecated Use #setReferenceId instead
|
||||||
|
*
|
||||||
* @param string $purchase_unit_reference_id
|
* @param string $purchase_unit_reference_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
@@ -68,6 +70,7 @@ class Order extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
|
* Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
|
||||||
|
* @deprecated Use #getReferenceId instead
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -76,11 +79,34 @@ class Order extends PayPalResourceModel
|
|||||||
return $this->purchase_unit_reference_id;
|
return $this->purchase_unit_reference_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
|
||||||
|
*
|
||||||
|
* @param string $reference_id
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setReferenceId($reference_id)
|
||||||
|
{
|
||||||
|
$this->reference_id = $reference_id;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getReferenceId()
|
||||||
|
{
|
||||||
|
return $this->reference_id;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount being collected.
|
* Amount being collected.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Amount $amount
|
* @param \PayPal\Api\Amount $amount
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAmount($amount)
|
public function setAmount($amount)
|
||||||
@@ -104,7 +130,7 @@ class Order extends PayPalResourceModel
|
|||||||
* Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
|
* Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
|
||||||
*
|
*
|
||||||
* @param string $payment_mode
|
* @param string $payment_mode
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPaymentMode($payment_mode)
|
public function setPaymentMode($payment_mode)
|
||||||
@@ -125,10 +151,10 @@ class Order extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* State of the order transaction.
|
* State of the order transaction.
|
||||||
* Valid Values: ["pending", "completed", "refunded", "partially_refunded", "voided"]
|
* Valid Values: ["pending", "completed", "voided", "authorized", "captured"]
|
||||||
*
|
*
|
||||||
* @param string $state
|
* @param string $state
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setState($state)
|
public function setState($state)
|
||||||
@@ -148,11 +174,11 @@ class Order extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reason code for the transaction state being Pending or Reversed. Only supported when the `payment_method` is set to `paypal`.
|
* Reason code for the transaction state being Pending or Reversed. This field will replace pending_reason field eventually. Only supported when the `payment_method` is set to `paypal`.
|
||||||
* Valid Values: ["PAYER_SHIPPING_UNCONFIRMED", "MULTI_CURRENCY", "RISK_REVIEW", "REGULATORY_REVIEW", "VERIFICATION_REQUIRED", "ORDER", "OTHER"]
|
* Valid Values: ["PAYER_SHIPPING_UNCONFIRMED", "MULTI_CURRENCY", "RISK_REVIEW", "REGULATORY_REVIEW", "VERIFICATION_REQUIRED", "ORDER", "OTHER"]
|
||||||
*
|
*
|
||||||
* @param string $reason_code
|
* @param string $reason_code
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setReasonCode($reason_code)
|
public function setReasonCode($reason_code)
|
||||||
@@ -162,7 +188,7 @@ class Order extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reason code for the transaction state being Pending or Reversed. Only supported when the `payment_method` is set to `paypal`.
|
* Reason code for the transaction state being Pending or Reversed. This field will replace pending_reason field eventually. Only supported when the `payment_method` is set to `paypal`.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -172,11 +198,11 @@ class Order extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [DEPRECATED] Reason the transaction is in pending state. Use reason_code field above instead.
|
* [DEPRECATED] Reason code for the transaction state being Pending. Obsolete. Retained for backward compatability. Use reason_code field above instead.
|
||||||
* Valid Values: ["payer_shipping_unconfirmed", "multi_currency", "risk_review", "regulatory_review", "verification_required", "order", "other"]
|
* Valid Values: ["payer_shipping_unconfirmed", "multi_currency", "risk_review", "regulatory_review", "verification_required", "order", "other"]
|
||||||
*
|
*
|
||||||
* @param string $pending_reason
|
* @param string $pending_reason
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPendingReason($pending_reason)
|
public function setPendingReason($pending_reason)
|
||||||
@@ -186,7 +212,7 @@ class Order extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated [DEPRECATED] Reason the transaction is in pending state. Use reason_code field above instead.
|
* @deprecated [DEPRECATED] Reason code for the transaction state being Pending. Obsolete. Retained for backward compatability. Use reason_code field above instead.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -200,7 +226,7 @@ class Order extends PayPalResourceModel
|
|||||||
* Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
|
* Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
|
||||||
*
|
*
|
||||||
* @param string $protection_eligibility
|
* @param string $protection_eligibility
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setProtectionEligibility($protection_eligibility)
|
public function setProtectionEligibility($protection_eligibility)
|
||||||
@@ -224,7 +250,7 @@ class Order extends PayPalResourceModel
|
|||||||
* Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"]
|
* Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"]
|
||||||
*
|
*
|
||||||
* @param string $protection_eligibility_type
|
* @param string $protection_eligibility_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setProtectionEligibilityType($protection_eligibility_type)
|
public function setProtectionEligibilityType($protection_eligibility_type)
|
||||||
@@ -247,7 +273,7 @@ class Order extends PayPalResourceModel
|
|||||||
* ID of the Payment resource that this transaction is based on.
|
* ID of the Payment resource that this transaction is based on.
|
||||||
*
|
*
|
||||||
* @param string $parent_payment
|
* @param string $parent_payment
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setParentPayment($parent_payment)
|
public function setParentPayment($parent_payment)
|
||||||
@@ -270,7 +296,7 @@ class Order extends PayPalResourceModel
|
|||||||
* Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.
|
* Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\FmfDetails $fmf_details
|
* @param \PayPal\Api\FmfDetails $fmf_details
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFmfDetails($fmf_details)
|
public function setFmfDetails($fmf_details)
|
||||||
@@ -293,7 +319,7 @@ class Order extends PayPalResourceModel
|
|||||||
* Time the resource was created in UTC ISO8601 format.
|
* Time the resource was created in UTC ISO8601 format.
|
||||||
*
|
*
|
||||||
* @param string $create_time
|
* @param string $create_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCreateTime($create_time)
|
public function setCreateTime($create_time)
|
||||||
@@ -316,7 +342,7 @@ class Order extends PayPalResourceModel
|
|||||||
* Time the resource was last updated in UTC ISO8601 format.
|
* Time the resource was last updated in UTC ISO8601 format.
|
||||||
*
|
*
|
||||||
* @param string $update_time
|
* @param string $update_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setUpdateTime($update_time)
|
public function setUpdateTime($update_time)
|
||||||
@@ -336,11 +362,11 @@ class Order extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve details about an order by passing the order_id in the request URI.
|
* Shows details for an order, by ID.
|
||||||
*
|
*
|
||||||
* @param string $orderId
|
* @param string $orderId
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
public static function get($orderId, $apiContext = null, $restCall = null)
|
public static function get($orderId, $apiContext = null, $restCall = null)
|
||||||
@@ -361,11 +387,11 @@ class Order extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Capture a payment. In addition, include the amount of the payment and indicate whether this is a final capture for the given authorization in the body of the request JSON.
|
* Captures a payment for an order, by ID. To use this call, the original payment call must specify an intent of `order`. In the JSON request body, include the payment amount and indicate whether this capture is the final capture for the authorization.
|
||||||
*
|
*
|
||||||
* @param Capture $capture
|
* @param Capture $capture
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Capture
|
* @return Capture
|
||||||
*/
|
*/
|
||||||
public function capture($capture, $apiContext = null, $restCall = null)
|
public function capture($capture, $apiContext = null, $restCall = null)
|
||||||
@@ -387,10 +413,10 @@ class Order extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Void (cancel) an order by passing the order_id in the request URI. Note that an order cannot be voided if payment has already been partially or fully captured.
|
* Voids, or cancels, an order, by ID. You cannot void an order if a payment has already been partially or fully captured.
|
||||||
*
|
*
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
public function void($apiContext = null, $restCall = null)
|
public function void($apiContext = null, $restCall = null)
|
||||||
@@ -410,11 +436,11 @@ class Order extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Authorize an order by passing the order_id in the request URI. In addition, include an amount object in the body of the request JSON.
|
* Authorizes an order, by ID. Include an `amount` object in the JSON request body.
|
||||||
*
|
*
|
||||||
* @param Authorization $authorization Authorization Object with Amount value to be authorized
|
* @param Authorization $authorization Authorization Object with Amount value to be authorized
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Authorization
|
* @return Authorization
|
||||||
*/
|
*/
|
||||||
public function authorize($authorization, $apiContext = null, $restCall = null)
|
public function authorize($authorization, $apiContext = null, $restCall = null)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use PayPal\Common\PayPalModel;
|
|||||||
/**
|
/**
|
||||||
* Class Patch
|
* Class Patch
|
||||||
*
|
*
|
||||||
* A JSON Patch object used for doing partial updates to resources.
|
* A JSON patch object that you can use to apply partial updates to resources.
|
||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
@@ -43,7 +43,7 @@ class Patch extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* string containing a JSON-Pointer value that references a location within the target document (the target location) where the operation is performed.
|
* A JSON pointer that references a location in the target document where the operation is performed. A `string` value.
|
||||||
*
|
*
|
||||||
* @param string $path
|
* @param string $path
|
||||||
*
|
*
|
||||||
@@ -56,7 +56,7 @@ class Patch extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* string containing a JSON-Pointer value that references a location within the target document (the target location) where the operation is performed.
|
* A JSON pointer that references a location in the target document where the operation is performed. A `string` value.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -68,7 +68,7 @@ class Patch extends PayPalModel
|
|||||||
/**
|
/**
|
||||||
* New value to apply based on the operation.
|
* New value to apply based on the operation.
|
||||||
*
|
*
|
||||||
* @param string $value
|
* @param mixed $value
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
@@ -81,7 +81,7 @@ class Patch extends PayPalModel
|
|||||||
/**
|
/**
|
||||||
* New value to apply based on the operation.
|
* New value to apply based on the operation.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function getValue()
|
public function getValue()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use PayPal\Common\PayPalModel;
|
|||||||
/**
|
/**
|
||||||
* Class PatchRequest
|
* Class PatchRequest
|
||||||
*
|
*
|
||||||
* Request object used for a JSON Patch.
|
* A JSON patch request.
|
||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -17,10 +17,10 @@ use PayPal\Common\PayPalModel;
|
|||||||
class Payee extends PayPalModel
|
class Payee extends PayPalModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Email Address associated with the Payee's PayPal Account. If the provided email address is not associated with any PayPal Account, the payee can only receiver PayPal Wallet Payments. Direct Credit Card Payments will be denied due to card compliance requirements.
|
* Email Address associated with the Payee's PayPal Account. If the provided email address is not associated with any PayPal Account, the payee can only receive PayPal Wallet Payments. Direct Credit Card Payments will be denied due to card compliance requirements.
|
||||||
*
|
*
|
||||||
* @param string $email
|
* @param string $email
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setEmail($email)
|
public function setEmail($email)
|
||||||
@@ -30,7 +30,7 @@ class Payee extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Email Address associated with the Payee's PayPal Account. If the provided email address is not associated with any PayPal Account, the payee can only receiver PayPal Wallet Payments. Direct Credit Card Payments will be denied due to card compliance requirements.
|
* Email Address associated with the Payee's PayPal Account. If the provided email address is not associated with any PayPal Account, the payee can only receive PayPal Wallet Payments. Direct Credit Card Payments will be denied due to card compliance requirements.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -43,7 +43,7 @@ class Payee extends PayPalModel
|
|||||||
* Encrypted PayPal account identifier for the Payee.
|
* Encrypted PayPal account identifier for the Payee.
|
||||||
*
|
*
|
||||||
* @param string $merchant_id
|
* @param string $merchant_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setMerchantId($merchant_id)
|
public function setMerchantId($merchant_id)
|
||||||
@@ -64,10 +64,9 @@ class Payee extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* First Name of the Payee.
|
* First Name of the Payee.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param string $first_name
|
* @param string $first_name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFirstName($first_name)
|
public function setFirstName($first_name)
|
||||||
@@ -78,7 +77,6 @@ class Payee extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* First Name of the Payee.
|
* First Name of the Payee.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -89,10 +87,9 @@ class Payee extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Last Name of the Payee.
|
* Last Name of the Payee.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param string $last_name
|
* @param string $last_name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setLastName($last_name)
|
public function setLastName($last_name)
|
||||||
@@ -103,7 +100,6 @@ class Payee extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Last Name of the Payee.
|
* Last Name of the Payee.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -114,10 +110,9 @@ class Payee extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unencrypted PayPal account Number of the Payee
|
* Unencrypted PayPal account Number of the Payee
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param string $account_number
|
* @param string $account_number
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAccountNumber($account_number)
|
public function setAccountNumber($account_number)
|
||||||
@@ -128,7 +123,6 @@ class Payee extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unencrypted PayPal account Number of the Payee
|
* Unencrypted PayPal account Number of the Payee
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -138,11 +132,10 @@ class Payee extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information related to the Payer. In case of PayPal Wallet payment, this information will be filled in by PayPal after the user approves the payment using their PayPal Wallet.
|
* Information related to the Payee.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\Phone $phone
|
* @param \PayPal\Api\Phone $phone
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPhone($phone)
|
public function setPhone($phone)
|
||||||
@@ -152,8 +145,7 @@ class Payee extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information related to the Payer. In case of PayPal Wallet payment, this information will be filled in by PayPal after the user approves the payment using their PayPal Wallet.
|
* Information related to the Payee.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\Phone
|
* @return \PayPal\Api\Phone
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ use PayPal\Common\PayPalModel;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string payment_method
|
* @property string payment_method
|
||||||
* @property string status
|
* @property string status
|
||||||
* @property \PayPal\Api\FundingInstrument[] funding_instruments
|
* @property \PayPal\Api\FundingInstrument[] funding_instruments
|
||||||
* @property string funding_option_id
|
* @property string external_selected_funding_instrument_type
|
||||||
* @property \PayPal\Api\PayerInfo payer_info
|
* @property \PayPal\Api\PayerInfo payer_info
|
||||||
*/
|
*/
|
||||||
class Payer extends PayPalModel
|
class Payer extends PayPalModel
|
||||||
{
|
{
|
||||||
@@ -24,7 +24,7 @@ class Payer extends PayPalModel
|
|||||||
* Valid Values: ["credit_card", "bank", "paypal", "pay_upon_invoice", "carrier", "alternate_payment"]
|
* Valid Values: ["credit_card", "bank", "paypal", "pay_upon_invoice", "carrier", "alternate_payment"]
|
||||||
*
|
*
|
||||||
* @param string $payment_method
|
* @param string $payment_method
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPaymentMethod($payment_method)
|
public function setPaymentMethod($payment_method)
|
||||||
@@ -48,7 +48,7 @@ class Payer extends PayPalModel
|
|||||||
* Valid Values: ["VERIFIED", "UNVERIFIED"]
|
* Valid Values: ["VERIFIED", "UNVERIFIED"]
|
||||||
*
|
*
|
||||||
* @param string $status
|
* @param string $status
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setStatus($status)
|
public function setStatus($status)
|
||||||
@@ -70,10 +70,9 @@ class Payer extends PayPalModel
|
|||||||
/**
|
/**
|
||||||
* Type of account relationship payer has with PayPal.
|
* Type of account relationship payer has with PayPal.
|
||||||
* Valid Values: ["BUSINESS", "PERSONAL", "PREMIER"]
|
* Valid Values: ["BUSINESS", "PERSONAL", "PREMIER"]
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param string $account_type
|
* @param string $account_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAccountType($account_type)
|
public function setAccountType($account_type)
|
||||||
@@ -84,7 +83,6 @@ class Payer extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of account relationship payer has with PayPal.
|
* Type of account relationship payer has with PayPal.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -95,10 +93,9 @@ class Payer extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Duration since the payer established account relationship with PayPal in days.
|
* Duration since the payer established account relationship with PayPal in days.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param string $account_age
|
* @param string $account_age
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAccountAge($account_age)
|
public function setAccountAge($account_age)
|
||||||
@@ -109,7 +106,6 @@ class Payer extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Duration since the payer established account relationship with PayPal in days.
|
* Duration since the payer established account relationship with PayPal in days.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -122,7 +118,7 @@ class Payer extends PayPalModel
|
|||||||
* List of funding instruments to fund the payment. 'OneOf' funding_instruments,funding_option_id to be used to identify the specifics of payment method passed.
|
* List of funding instruments to fund the payment. 'OneOf' funding_instruments,funding_option_id to be used to identify the specifics of payment method passed.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\FundingInstrument[] $funding_instruments
|
* @param \PayPal\Api\FundingInstrument[] $funding_instruments
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFundingInstruments($funding_instruments)
|
public function setFundingInstruments($funding_instruments)
|
||||||
@@ -173,9 +169,9 @@ class Payer extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Id of user selected funding option for the payment.'OneOf' funding_instruments,funding_option_id to be used to identify the specifics of payment method passed.
|
* Id of user selected funding option for the payment.'OneOf' funding_instruments,funding_option_id to be used to identify the specifics of payment method passed.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param string $funding_option_id
|
* @param string $funding_option_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFundingOptionId($funding_option_id)
|
public function setFundingOptionId($funding_option_id)
|
||||||
@@ -186,7 +182,7 @@ class Payer extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Id of user selected funding option for the payment.'OneOf' funding_instruments,funding_option_id to be used to identify the specifics of payment method passed.
|
* Id of user selected funding option for the payment.'OneOf' funding_instruments,funding_option_id to be used to identify the specifics of payment method passed.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getFundingOptionId()
|
public function getFundingOptionId()
|
||||||
@@ -195,11 +191,10 @@ class Payer extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default funding option available for the payment
|
* Default funding option available for the payment
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\FundingOption $funding_option
|
* @param \PayPal\Api\FundingOption $funding_option
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFundingOption($funding_option)
|
public function setFundingOption($funding_option)
|
||||||
@@ -209,8 +204,7 @@ class Payer extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default funding option available for the payment
|
* Default funding option available for the payment
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\FundingOption
|
* @return \PayPal\Api\FundingOption
|
||||||
*/
|
*/
|
||||||
@@ -220,11 +214,34 @@ class Payer extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Funding option related to default funding option.
|
* Instrument type pre-selected by the user outside of PayPal and passed along the payment creation. This param is used in cases such as PayPal Credit Second Button
|
||||||
|
* Valid Values: ["CREDIT", "PAY_UPON_INVOICE"]
|
||||||
*
|
*
|
||||||
|
* @param string $external_selected_funding_instrument_type
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setExternalSelectedFundingInstrumentType($external_selected_funding_instrument_type)
|
||||||
|
{
|
||||||
|
$this->external_selected_funding_instrument_type = $external_selected_funding_instrument_type;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instrument type pre-selected by the user outside of PayPal and passed along the payment creation. This param is used in cases such as PayPal Credit Second Button
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getExternalSelectedFundingInstrumentType()
|
||||||
|
{
|
||||||
|
return $this->external_selected_funding_instrument_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Funding option related to default funding option.
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\FundingOption $related_funding_option
|
* @param \PayPal\Api\FundingOption $related_funding_option
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setRelatedFundingOption($related_funding_option)
|
public function setRelatedFundingOption($related_funding_option)
|
||||||
@@ -235,7 +252,6 @@ class Payer extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Funding option related to default funding option.
|
* Funding option related to default funding option.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\FundingOption
|
* @return \PayPal\Api\FundingOption
|
||||||
*/
|
*/
|
||||||
@@ -245,10 +261,10 @@ class Payer extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information related to the Payer.
|
* Information related to the Payer.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\PayerInfo $payer_info
|
* @param \PayPal\Api\PayerInfo $payer_info
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPayerInfo($payer_info)
|
public function setPayerInfo($payer_info)
|
||||||
@@ -258,7 +274,7 @@ class Payer extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information related to the Payer.
|
* Information related to the Payer.
|
||||||
*
|
*
|
||||||
* @return \PayPal\Api\PayerInfo
|
* @return \PayPal\Api\PayerInfo
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -11,22 +11,22 @@ use PayPal\Common\PayPalModel;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string email
|
* @property string email
|
||||||
* @property string external_remember_me_id
|
* @property string external_remember_me_id
|
||||||
* @property string salutation
|
* @property string buyer_account_number
|
||||||
* @property string first_name
|
* @property string salutation
|
||||||
* @property string middle_name
|
* @property string first_name
|
||||||
* @property string last_name
|
* @property string middle_name
|
||||||
* @property string suffix
|
* @property string last_name
|
||||||
* @property string payer_id
|
* @property string suffix
|
||||||
* @property string phone
|
* @property string payer_id
|
||||||
* @property string phone_type
|
* @property string phone
|
||||||
* @property string birth_date
|
* @property string phone_type
|
||||||
* @property string tax_id
|
* @property string birth_date
|
||||||
* @property string tax_id_type
|
* @property string tax_id
|
||||||
* @property string country_code
|
* @property string tax_id_type
|
||||||
* @property \PayPal\Api\Address billing_address
|
* @property string country_code
|
||||||
* @property \PayPal\Api\ShippingAddress shipping_address
|
* @property \PayPal\Api\Address billing_address
|
||||||
*/
|
*/
|
||||||
class PayerInfo extends PayPalModel
|
class PayerInfo extends PayPalModel
|
||||||
{
|
{
|
||||||
@@ -34,7 +34,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* Email address representing the payer. 127 characters max.
|
* Email address representing the payer. 127 characters max.
|
||||||
*
|
*
|
||||||
* @param string $email
|
* @param string $email
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setEmail($email)
|
public function setEmail($email)
|
||||||
@@ -57,7 +57,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* External Remember Me id representing the payer
|
* External Remember Me id representing the payer
|
||||||
*
|
*
|
||||||
* @param string $external_remember_me_id
|
* @param string $external_remember_me_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setExternalRememberMeId($external_remember_me_id)
|
public function setExternalRememberMeId($external_remember_me_id)
|
||||||
@@ -79,7 +79,7 @@ class PayerInfo extends PayPalModel
|
|||||||
/**
|
/**
|
||||||
* Account Number representing the Payer
|
* Account Number representing the Payer
|
||||||
*
|
*
|
||||||
* @deprecated Not publicly available
|
* @deprecated Use #setBuyerAccountNumberInstead
|
||||||
* @param string $account_number
|
* @param string $account_number
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
@@ -93,6 +93,8 @@ class PayerInfo extends PayPalModel
|
|||||||
/**
|
/**
|
||||||
* Account Number representing the Payer
|
* Account Number representing the Payer
|
||||||
*
|
*
|
||||||
|
* @deprecated Use #getBuyerAccountNumberInstead
|
||||||
|
*
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -101,11 +103,34 @@ class PayerInfo extends PayPalModel
|
|||||||
return $this->account_number;
|
return $this->account_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Account Number representing the Payer
|
||||||
|
*
|
||||||
|
* @param string $buyer_account_number
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setBuyerAccountNumber($buyer_account_number)
|
||||||
|
{
|
||||||
|
$this->buyer_account_number = $buyer_account_number;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Account Number representing the Payer
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getBuyerAccountNumber()
|
||||||
|
{
|
||||||
|
return $this->buyer_account_number;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Salutation of the payer.
|
* Salutation of the payer.
|
||||||
*
|
*
|
||||||
* @param string $salutation
|
* @param string $salutation
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setSalutation($salutation)
|
public function setSalutation($salutation)
|
||||||
@@ -128,7 +153,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* First name of the payer.
|
* First name of the payer.
|
||||||
*
|
*
|
||||||
* @param string $first_name
|
* @param string $first_name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFirstName($first_name)
|
public function setFirstName($first_name)
|
||||||
@@ -151,7 +176,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* Middle name of the payer.
|
* Middle name of the payer.
|
||||||
*
|
*
|
||||||
* @param string $middle_name
|
* @param string $middle_name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setMiddleName($middle_name)
|
public function setMiddleName($middle_name)
|
||||||
@@ -174,7 +199,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* Last name of the payer.
|
* Last name of the payer.
|
||||||
*
|
*
|
||||||
* @param string $last_name
|
* @param string $last_name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setLastName($last_name)
|
public function setLastName($last_name)
|
||||||
@@ -197,7 +222,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* Suffix of the payer.
|
* Suffix of the payer.
|
||||||
*
|
*
|
||||||
* @param string $suffix
|
* @param string $suffix
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setSuffix($suffix)
|
public function setSuffix($suffix)
|
||||||
@@ -220,7 +245,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* PayPal assigned encrypted Payer ID.
|
* PayPal assigned encrypted Payer ID.
|
||||||
*
|
*
|
||||||
* @param string $payer_id
|
* @param string $payer_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPayerId($payer_id)
|
public function setPayerId($payer_id)
|
||||||
@@ -243,7 +268,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* Phone number representing the payer. 20 characters max.
|
* Phone number representing the payer. 20 characters max.
|
||||||
*
|
*
|
||||||
* @param string $phone
|
* @param string $phone
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPhone($phone)
|
public function setPhone($phone)
|
||||||
@@ -267,7 +292,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* Valid Values: ["HOME", "WORK", "MOBILE", "OTHER"]
|
* Valid Values: ["HOME", "WORK", "MOBILE", "OTHER"]
|
||||||
*
|
*
|
||||||
* @param string $phone_type
|
* @param string $phone_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPhoneType($phone_type)
|
public function setPhoneType($phone_type)
|
||||||
@@ -290,7 +315,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* Birth date of the Payer in ISO8601 format (yyyy-mm-dd).
|
* Birth date of the Payer in ISO8601 format (yyyy-mm-dd).
|
||||||
*
|
*
|
||||||
* @param string $birth_date
|
* @param string $birth_date
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setBirthDate($birth_date)
|
public function setBirthDate($birth_date)
|
||||||
@@ -313,7 +338,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* Payer’s tax ID. Only supported when the `payment_method` is set to `paypal`.
|
* Payer’s tax ID. Only supported when the `payment_method` is set to `paypal`.
|
||||||
*
|
*
|
||||||
* @param string $tax_id
|
* @param string $tax_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setTaxId($tax_id)
|
public function setTaxId($tax_id)
|
||||||
@@ -337,7 +362,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* Valid Values: ["BR_CPF", "BR_CNPJ"]
|
* Valid Values: ["BR_CPF", "BR_CNPJ"]
|
||||||
*
|
*
|
||||||
* @param string $tax_id_type
|
* @param string $tax_id_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setTaxIdType($tax_id_type)
|
public function setTaxIdType($tax_id_type)
|
||||||
@@ -360,7 +385,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* Two-letter registered country code of the payer to identify the buyer country.
|
* Two-letter registered country code of the payer to identify the buyer country.
|
||||||
*
|
*
|
||||||
* @param string $country_code
|
* @param string $country_code
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCountryCode($country_code)
|
public function setCountryCode($country_code)
|
||||||
@@ -383,7 +408,7 @@ class PayerInfo extends PayPalModel
|
|||||||
* Billing address of the Payer.
|
* Billing address of the Payer.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Address $billing_address
|
* @param \PayPal\Api\Address $billing_address
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setBillingAddress($billing_address)
|
public function setBillingAddress($billing_address)
|
||||||
@@ -403,10 +428,10 @@ class PayerInfo extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shipping address of payer PayPal account.
|
* @deprecated [DEPRECATED] Use shipping address present in purchase unit or at root level of checkout Session.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\ShippingAddress $shipping_address
|
* @param \PayPal\Api\ShippingAddress $shipping_address
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setShippingAddress($shipping_address)
|
public function setShippingAddress($shipping_address)
|
||||||
@@ -416,7 +441,7 @@ class PayerInfo extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shipping address of payer PayPal account.
|
* @deprecated [DEPRECATED] Use shipping address present in purchase unit or at root level of checkout Session.
|
||||||
*
|
*
|
||||||
* @return \PayPal\Api\ShippingAddress
|
* @return \PayPal\Api\ShippingAddress
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ namespace PayPal\Api;
|
|||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Core\PayPalConstants;
|
use PayPal\Core\PayPalConstants;
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
use PayPal\Transport\PayPalRestCall;
|
|
||||||
use PayPal\Validation\ArgumentValidator;
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
use PayPal\Rest\ApiContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Payment
|
* Class Payment
|
||||||
@@ -15,30 +14,27 @@ use PayPal\Validation\ArgumentValidator;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string id
|
* @property string id
|
||||||
* @property string intent
|
* @property string intent
|
||||||
* @property \PayPal\Api\Payer payer
|
* @property \PayPal\Api\Payer payer
|
||||||
* @property \PayPal\Api\PotentialPayerInfo potential_payer_info
|
* @property \PayPal\Api\Transaction[] transactions
|
||||||
* @property \PayPal\Api\Payee payee
|
* @property string state
|
||||||
* @property \PayPal\Api\Transaction[] transactions
|
* @property string experience_profile_id
|
||||||
* @property string[] billing_agreement_tokens
|
* @property string note_to_payer
|
||||||
* @property \PayPal\Api\PaymentInstruction payment_instruction
|
* @property \PayPal\Api\Payee $payee
|
||||||
* @property string state
|
* @property \PayPal\Api\RedirectUrls redirect_urls
|
||||||
* @property string experience_profile_id
|
* @property string failure_reason
|
||||||
* @property string note_to_payer
|
* @property string create_time
|
||||||
* @property \PayPal\Api\RedirectUrls redirect_urls
|
* @property string update_time
|
||||||
* @property string failure_reason
|
* @property \PayPal\Api\Links[] links
|
||||||
* @property string create_time
|
|
||||||
* @property string update_time
|
|
||||||
* @property \PayPal\Api\Links[] links
|
|
||||||
*/
|
*/
|
||||||
class Payment extends PayPalResourceModel
|
class Payment extends PayPalResourceModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* ID of the created payment, the 'transaction ID'
|
* Identifier of the payment resource created.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setId($id)
|
public function setId($id)
|
||||||
@@ -48,7 +44,7 @@ class Payment extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the created payment, the 'transaction ID'
|
* Identifier of the payment resource created.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -62,7 +58,7 @@ class Payment extends PayPalResourceModel
|
|||||||
* Valid Values: ["sale", "authorize", "order"]
|
* Valid Values: ["sale", "authorize", "order"]
|
||||||
*
|
*
|
||||||
* @param string $intent
|
* @param string $intent
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setIntent($intent)
|
public function setIntent($intent)
|
||||||
@@ -85,7 +81,7 @@ class Payment extends PayPalResourceModel
|
|||||||
* Source of the funds for this payment represented by a PayPal account or a direct credit card.
|
* Source of the funds for this payment represented by a PayPal account or a direct credit card.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Payer $payer
|
* @param \PayPal\Api\Payer $payer
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPayer($payer)
|
public function setPayer($payer)
|
||||||
@@ -106,9 +102,9 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Information that the merchant knows about the payer. This information is not definitive and only serves as a hint to the UI or any pre-processing logic.
|
* Information that the merchant knows about the payer. This information is not definitive and only serves as a hint to the UI or any pre-processing logic.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\PotentialPayerInfo $potential_payer_info
|
* @param \PayPal\Api\PotentialPayerInfo $potential_payer_info
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPotentialPayerInfo($potential_payer_info)
|
public function setPotentialPayerInfo($potential_payer_info)
|
||||||
@@ -119,7 +115,7 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Information that the merchant knows about the payer. This information is not definitive and only serves as a hint to the UI or any pre-processing logic.
|
* Information that the merchant knows about the payer. This information is not definitive and only serves as a hint to the UI or any pre-processing logic.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\PotentialPayerInfo
|
* @return \PayPal\Api\PotentialPayerInfo
|
||||||
*/
|
*/
|
||||||
public function getPotentialPayerInfo()
|
public function getPotentialPayerInfo()
|
||||||
@@ -128,10 +124,9 @@ class Payment extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Receiver of funds for this payment. **Readonly for PayPal external REST payments.**
|
* Receiver of funds for this payment.
|
||||||
*
|
|
||||||
* @param \PayPal\Api\Payee $payee
|
* @param \PayPal\Api\Payee $payee
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPayee($payee)
|
public function setPayee($payee)
|
||||||
@@ -141,8 +136,7 @@ class Payment extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Receiver of funds for this payment. **Readonly for PayPal external REST payments.**
|
* Receiver of funds for this payment.
|
||||||
*
|
|
||||||
* @return \PayPal\Api\Payee
|
* @return \PayPal\Api\Payee
|
||||||
*/
|
*/
|
||||||
public function getPayee()
|
public function getPayee()
|
||||||
@@ -152,10 +146,9 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the cart to execute the payment.
|
* ID of the cart to execute the payment.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param string $cart
|
* @param string $cart
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCart($cart)
|
public function setCart($cart)
|
||||||
@@ -166,7 +159,6 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the cart to execute the payment.
|
* ID of the cart to execute the payment.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -179,7 +171,7 @@ class Payment extends PayPalResourceModel
|
|||||||
* Transactional details including the amount and item details.
|
* Transactional details including the amount and item details.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Transaction[] $transactions
|
* @param \PayPal\Api\Transaction[] $transactions
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setTransactions($transactions)
|
public function setTransactions($transactions)
|
||||||
@@ -230,10 +222,9 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Applicable for advanced payments like multi seller payment (MSP) to support partial failures
|
* Applicable for advanced payments like multi seller payment (MSP) to support partial failures
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\Error[] $failed_transactions
|
* @param \PayPal\Api\Error[] $failed_transactions
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFailedTransactions($failed_transactions)
|
public function setFailedTransactions($failed_transactions)
|
||||||
@@ -244,7 +235,6 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Applicable for advanced payments like multi seller payment (MSP) to support partial failures
|
* Applicable for advanced payments like multi seller payment (MSP) to support partial failures
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\Error[]
|
* @return \PayPal\Api\Error[]
|
||||||
*/
|
*/
|
||||||
@@ -255,7 +245,6 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Append FailedTransactions to the list.
|
* Append FailedTransactions to the list.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\Error $error
|
* @param \PayPal\Api\Error $error
|
||||||
* @return $this
|
* @return $this
|
||||||
@@ -273,7 +262,6 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove FailedTransactions from the list.
|
* Remove FailedTransactions from the list.
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\Error $error
|
* @param \PayPal\Api\Error $error
|
||||||
* @return $this
|
* @return $this
|
||||||
@@ -287,9 +275,9 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Collection of PayPal generated billing agreement tokens.
|
* Collection of PayPal generated billing agreement tokens.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param string[] $billing_agreement_tokens
|
* @param string[] $billing_agreement_tokens
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setBillingAgreementTokens($billing_agreement_tokens)
|
public function setBillingAgreementTokens($billing_agreement_tokens)
|
||||||
@@ -300,7 +288,7 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Collection of PayPal generated billing agreement tokens.
|
* Collection of PayPal generated billing agreement tokens.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @return string[]
|
* @return string[]
|
||||||
*/
|
*/
|
||||||
public function getBillingAgreementTokens()
|
public function getBillingAgreementTokens()
|
||||||
@@ -310,7 +298,7 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Append BillingAgreementTokens to the list.
|
* Append BillingAgreementTokens to the list.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param string $billingAgreementToken
|
* @param string $billingAgreementToken
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
@@ -327,7 +315,7 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove BillingAgreementTokens from the list.
|
* Remove BillingAgreementTokens from the list.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param string $billingAgreementToken
|
* @param string $billingAgreementToken
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
@@ -340,10 +328,9 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Credit financing offered to payer on PayPal side. Returned in payment after payer opts-in
|
* Credit financing offered to payer on PayPal side. Returned in payment after payer opts-in
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\CreditFinancingOffered $credit_financing_offered
|
* @param \PayPal\Api\CreditFinancingOffered $credit_financing_offered
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCreditFinancingOffered($credit_financing_offered)
|
public function setCreditFinancingOffered($credit_financing_offered)
|
||||||
@@ -354,7 +341,6 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Credit financing offered to payer on PayPal side. Returned in payment after payer opts-in
|
* Credit financing offered to payer on PayPal side. Returned in payment after payer opts-in
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\CreditFinancingOffered
|
* @return \PayPal\Api\CreditFinancingOffered
|
||||||
*/
|
*/
|
||||||
@@ -365,9 +351,9 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Instructions for the payer to complete this payment.
|
* Instructions for the payer to complete this payment.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\PaymentInstruction $payment_instruction
|
* @param \PayPal\Api\PaymentInstruction $payment_instruction
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPaymentInstruction($payment_instruction)
|
public function setPaymentInstruction($payment_instruction)
|
||||||
@@ -378,7 +364,7 @@ class Payment extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Instructions for the payer to complete this payment.
|
* Instructions for the payer to complete this payment.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\PaymentInstruction
|
* @return \PayPal\Api\PaymentInstruction
|
||||||
*/
|
*/
|
||||||
public function getPaymentInstruction()
|
public function getPaymentInstruction()
|
||||||
@@ -387,11 +373,11 @@ class Payment extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Payment state.
|
* The state of the payment, authorization, or order transaction. The value is:<ul><li><code>created</code>. The transaction was successfully created.</li><li><code>approved</code>. The buyer approved the transaction.</li><li><code>failed</code>. The transaction request failed.</li></ul>
|
||||||
* Valid Values: ["created", "approved", "failed", "partially_completed", "in_progress"]
|
* Valid Values: ["created", "approved", "failed", "partially_completed", "in_progress"]
|
||||||
*
|
*
|
||||||
* @param string $state
|
* @param string $state
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setState($state)
|
public function setState($state)
|
||||||
@@ -401,7 +387,7 @@ class Payment extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Payment state.
|
* The state of the payment, authorization, or order transaction. The value is:<ul><li><code>created</code>. The transaction was successfully created.</li><li><code>approved</code>. The buyer approved the transaction.</li><li><code>failed</code>. The transaction request failed.</li></ul>
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -411,10 +397,10 @@ class Payment extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PayPal generated identifier for the merchant's payment experience profile. Refer to [this](https://developer.paypal.com/webapps/developer/docs/api/#payment-experience) link to create experience profile ID.
|
* PayPal generated identifier for the merchant's payment experience profile. Refer to [this](https://developer.paypal.com/docs/api/#payment-experience) link to create experience profile ID.
|
||||||
*
|
*
|
||||||
* @param string $experience_profile_id
|
* @param string $experience_profile_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setExperienceProfileId($experience_profile_id)
|
public function setExperienceProfileId($experience_profile_id)
|
||||||
@@ -424,7 +410,7 @@ class Payment extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PayPal generated identifier for the merchant's payment experience profile. Refer to [this](https://developer.paypal.com/webapps/developer/docs/api/#payment-experience) link to create experience profile ID.
|
* PayPal generated identifier for the merchant's payment experience profile. Refer to [this](https://developer.paypal.com/docs/api/#payment-experience) link to create experience profile ID.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -437,7 +423,7 @@ class Payment extends PayPalResourceModel
|
|||||||
* free-form field for the use of clients to pass in a message to the payer
|
* free-form field for the use of clients to pass in a message to the payer
|
||||||
*
|
*
|
||||||
* @param string $note_to_payer
|
* @param string $note_to_payer
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setNoteToPayer($note_to_payer)
|
public function setNoteToPayer($note_to_payer)
|
||||||
@@ -460,7 +446,7 @@ class Payment extends PayPalResourceModel
|
|||||||
* Set of redirect URLs you provide only for PayPal-based payments.
|
* Set of redirect URLs you provide only for PayPal-based payments.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\RedirectUrls $redirect_urls
|
* @param \PayPal\Api\RedirectUrls $redirect_urls
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setRedirectUrls($redirect_urls)
|
public function setRedirectUrls($redirect_urls)
|
||||||
@@ -484,7 +470,7 @@ class Payment extends PayPalResourceModel
|
|||||||
* Valid Values: ["UNABLE_TO_COMPLETE_TRANSACTION", "INVALID_PAYMENT_METHOD", "PAYER_CANNOT_PAY", "CANNOT_PAY_THIS_PAYEE", "REDIRECT_REQUIRED", "PAYEE_FILTER_RESTRICTIONS"]
|
* Valid Values: ["UNABLE_TO_COMPLETE_TRANSACTION", "INVALID_PAYMENT_METHOD", "PAYER_CANNOT_PAY", "CANNOT_PAY_THIS_PAYEE", "REDIRECT_REQUIRED", "PAYEE_FILTER_RESTRICTIONS"]
|
||||||
*
|
*
|
||||||
* @param string $failure_reason
|
* @param string $failure_reason
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFailureReason($failure_reason)
|
public function setFailureReason($failure_reason)
|
||||||
@@ -507,7 +493,7 @@ class Payment extends PayPalResourceModel
|
|||||||
* Payment creation time as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
* Payment creation time as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||||
*
|
*
|
||||||
* @param string $create_time
|
* @param string $create_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCreateTime($create_time)
|
public function setCreateTime($create_time)
|
||||||
@@ -530,7 +516,7 @@ class Payment extends PayPalResourceModel
|
|||||||
* Payment update time as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
* Payment update time as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||||
*
|
*
|
||||||
* @param string $update_time
|
* @param string $update_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setUpdateTime($update_time)
|
public function setUpdateTime($update_time)
|
||||||
@@ -560,10 +546,10 @@ class Payment extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create and process a payment by passing a payment object that includes the intent, payer, and transactions in the body of the request JSON. For PayPal payments, include redirect URLs in the payment object.
|
* Creates and processes a payment. In the JSON request body, include a `payment` object with the intent, payer, and transactions. For PayPal payments, include redirect URLs in the `payment` object.
|
||||||
*
|
*
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Payment
|
* @return Payment
|
||||||
*/
|
*/
|
||||||
public function create($apiContext = null, $restCall = null)
|
public function create($apiContext = null, $restCall = null)
|
||||||
@@ -582,11 +568,11 @@ class Payment extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Look up a particular payment resource by passing the payment_id in the request URI.
|
* Shows details for a payment, by ID.
|
||||||
*
|
*
|
||||||
* @param string $paymentId
|
* @param string $paymentId
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Payment
|
* @return Payment
|
||||||
*/
|
*/
|
||||||
public static function get($paymentId, $apiContext = null, $restCall = null)
|
public static function get($paymentId, $apiContext = null, $restCall = null)
|
||||||
@@ -607,11 +593,11 @@ class Payment extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this call to partially update the payment resource for the given identifier. Allowed objects are amount, shipping_address, invoice_id and custom. Please note that it is not possible to use patch after execute has been called.
|
* Partially updates a payment, by ID. You can update the amount, shipping address, invoice ID, and custom data. You cannot use patch after execute has been called.
|
||||||
*
|
*
|
||||||
* @param PatchRequest $patchRequest
|
* @param PatchRequest $patchRequest
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function update($patchRequest, $apiContext = null, $restCall = null)
|
public function update($patchRequest, $apiContext = null, $restCall = null)
|
||||||
@@ -631,11 +617,11 @@ class Payment extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute (complete) a PayPal payment that has been approved by the payer. Optionally update selective payment information when executing the payment.
|
* Executes, or completes, a PayPal payment that the payer has approved. You can optionally update selective payment information when you execute a payment.
|
||||||
*
|
*
|
||||||
* @param PaymentExecution $paymentExecution
|
* @param PaymentExecution $paymentExecution
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Payment
|
* @return Payment
|
||||||
*/
|
*/
|
||||||
public function execute($paymentExecution, $apiContext = null, $restCall = null)
|
public function execute($paymentExecution, $apiContext = null, $restCall = null)
|
||||||
@@ -656,11 +642,11 @@ class Payment extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List payments in any state (created, approved, failed, etc.). Payments returned are the payments made to the merchant issuing the request.
|
* List payments that were made to the merchant who issues the request. Payments can be in any state.
|
||||||
*
|
*
|
||||||
* @param array $params
|
* @param array $params
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return PaymentHistory
|
* @return PaymentHistory
|
||||||
*/
|
*/
|
||||||
public static function all($params, $apiContext = null, $restCall = null)
|
public static function all($params, $apiContext = null, $restCall = null)
|
||||||
@@ -668,14 +654,14 @@ class Payment extends PayPalResourceModel
|
|||||||
ArgumentValidator::validate($params, 'params');
|
ArgumentValidator::validate($params, 'params');
|
||||||
$payLoad = "";
|
$payLoad = "";
|
||||||
$allowedParams = array(
|
$allowedParams = array(
|
||||||
'count' => 1,
|
'count' => 1,
|
||||||
'start_id' => 1,
|
'start_id' => 1,
|
||||||
'start_index' => 1,
|
'start_index' => 1,
|
||||||
'start_time' => 1,
|
'start_time' => 1,
|
||||||
'end_time' => 1,
|
'end_time' => 1,
|
||||||
'payee_id' => 1,
|
'payee_id' => 1,
|
||||||
'sort_by' => 1,
|
'sort_by' => 1,
|
||||||
'sort_order' => 1,
|
'sort_order' => 1,
|
||||||
);
|
);
|
||||||
$json = self::executeCall(
|
$json = self::executeCall(
|
||||||
"/v1/payments/payment?" . http_build_query(array_intersect_key($params, $allowedParams)),
|
"/v1/payments/payment?" . http_build_query(array_intersect_key($params, $allowedParams)),
|
||||||
|
|||||||
@@ -7,35 +7,36 @@ use PayPal\Common\PayPalModel;
|
|||||||
/**
|
/**
|
||||||
* Class PaymentCard
|
* Class PaymentCard
|
||||||
*
|
*
|
||||||
* A resource representing a payment card that can be used to fund a payment.
|
* A payment card that can fund a payment.
|
||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string id
|
* @property string id
|
||||||
* @property string number
|
* @property string number
|
||||||
* @property string type
|
* @property string type
|
||||||
* @property string expire_month
|
* @property string expire_month
|
||||||
* @property string expire_year
|
* @property string expire_year
|
||||||
* @property string start_month
|
* @property string start_month
|
||||||
* @property string start_year
|
* @property string start_year
|
||||||
* @property string cvv2
|
* @property string cvv2
|
||||||
* @property string first_name
|
* @property string first_name
|
||||||
* @property string last_name
|
* @property string last_name
|
||||||
* @property string billing_country
|
* @property string billing_country
|
||||||
* @property \PayPal\Api\Address billing_address
|
* @property \PayPal\Api\Address billing_address
|
||||||
* @property string external_customer_id
|
* @property string external_customer_id
|
||||||
* @property string status
|
* @property string status
|
||||||
* @property string valid_until
|
* @property string card_product_class
|
||||||
* @property string issue_number
|
* @property string valid_until
|
||||||
|
* @property string issue_number
|
||||||
* @property \PayPal\Api\Links[] links
|
* @property \PayPal\Api\Links[] links
|
||||||
*/
|
*/
|
||||||
class PaymentCard extends PayPalModel
|
class PaymentCard extends PayPalModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* ID of the credit card being saved for later use.
|
* The ID of a credit card to save for later use.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setId($id)
|
public function setId($id)
|
||||||
@@ -45,7 +46,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the credit card being saved for later use.
|
* The ID of a credit card to save for later use.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -55,10 +56,10 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Card number.
|
* The card number.
|
||||||
*
|
*
|
||||||
* @param string $number
|
* @param string $number
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setNumber($number)
|
public function setNumber($number)
|
||||||
@@ -68,7 +69,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Card number.
|
* The card number.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -78,11 +79,11 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of the Card.
|
* The card type.
|
||||||
* Valid Values: ["VISA", "AMEX", "SOLO", "JCB", "STAR", "DELTA", "DISCOVER", "SWITCH", "MAESTRO", "CB_NATIONALE", "CONFINOGA", "COFIDIS", "ELECTRON", "CETELEM", "CHINA_UNION_PAY", "MASTERCARD"]
|
* Valid Values: ["VISA", "AMEX", "SOLO", "JCB", "STAR", "DELTA", "DISCOVER", "SWITCH", "MAESTRO", "CB_NATIONALE", "CONFINOGA", "COFIDIS", "ELECTRON", "CETELEM", "CHINA_UNION_PAY", "MASTERCARD"]
|
||||||
*
|
*
|
||||||
* @param string $type
|
* @param string $type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setType($type)
|
public function setType($type)
|
||||||
@@ -92,7 +93,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of the Card.
|
* The card type.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -102,10 +103,10 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2 digit card expiry month.
|
* The two-digit expiry month for the card.
|
||||||
*
|
*
|
||||||
* @param string $expire_month
|
* @param string $expire_month
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setExpireMonth($expire_month)
|
public function setExpireMonth($expire_month)
|
||||||
@@ -115,7 +116,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2 digit card expiry month.
|
* The two-digit expiry month for the card.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -125,10 +126,10 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 4 digit card expiry year
|
* The four-digit expiry year for the card.
|
||||||
*
|
*
|
||||||
* @param string $expire_year
|
* @param string $expire_year
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setExpireYear($expire_year)
|
public function setExpireYear($expire_year)
|
||||||
@@ -138,7 +139,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 4 digit card expiry year
|
* The four-digit expiry year for the card.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -148,10 +149,10 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2 digit card start month. Needed for UK Maestro Card.
|
* The two-digit start month for the card. Required for UK Maestro cards.
|
||||||
*
|
*
|
||||||
* @param string $start_month
|
* @param string $start_month
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setStartMonth($start_month)
|
public function setStartMonth($start_month)
|
||||||
@@ -161,7 +162,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2 digit card start month. Needed for UK Maestro Card.
|
* The two-digit start month for the card. Required for UK Maestro cards.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -171,10 +172,10 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 4 digit card start year. Needed for UK Maestro Card.
|
* The four-digit start year for the card. Required for UK Maestro cards.
|
||||||
*
|
*
|
||||||
* @param string $start_year
|
* @param string $start_year
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setStartYear($start_year)
|
public function setStartYear($start_year)
|
||||||
@@ -184,7 +185,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 4 digit card start year. Needed for UK Maestro Card.
|
* The four-digit start year for the card. Required for UK Maestro cards.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -194,10 +195,10 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Card validation code. Only supported when making a Payment but not when saving a payment card for future use.
|
* The validation code for the card. Supported for payments but not for saving payment cards for future use.
|
||||||
*
|
*
|
||||||
* @param string $cvv2
|
* @param string $cvv2
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCvv2($cvv2)
|
public function setCvv2($cvv2)
|
||||||
@@ -207,7 +208,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Card validation code. Only supported when making a Payment but not when saving a payment card for future use.
|
* The validation code for the card. Supported for payments but not for saving payment cards for future use.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -217,10 +218,10 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Card holder's first name.
|
* The first name of the card holder.
|
||||||
*
|
*
|
||||||
* @param string $first_name
|
* @param string $first_name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFirstName($first_name)
|
public function setFirstName($first_name)
|
||||||
@@ -230,7 +231,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Card holder's first name.
|
* The first name of the card holder.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -240,10 +241,10 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Card holder's last name.
|
* The last name of the card holder.
|
||||||
*
|
*
|
||||||
* @param string $last_name
|
* @param string $last_name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setLastName($last_name)
|
public function setLastName($last_name)
|
||||||
@@ -253,7 +254,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Card holder's last name.
|
* The last name of the card holder.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -263,10 +264,10 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2 letter country code
|
* The two-letter country code.
|
||||||
*
|
*
|
||||||
* @param string $billing_country
|
* @param string $billing_country
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setBillingCountry($billing_country)
|
public function setBillingCountry($billing_country)
|
||||||
@@ -276,7 +277,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2 letter country code
|
* The two-letter country code.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -286,10 +287,10 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Billing Address associated with this card.
|
* The billing address for the card.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Address $billing_address
|
* @param \PayPal\Api\Address $billing_address
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setBillingAddress($billing_address)
|
public function setBillingAddress($billing_address)
|
||||||
@@ -299,7 +300,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Billing Address associated with this card.
|
* The billing address for the card.
|
||||||
*
|
*
|
||||||
* @return \PayPal\Api\Address
|
* @return \PayPal\Api\Address
|
||||||
*/
|
*/
|
||||||
@@ -309,10 +310,10 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A unique identifier of the customer to whom this card account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
|
* The ID of the customer who owns this card account. The facilitator generates and provides this ID. Required when you create or use a stored funding instrument in the PayPal vault.
|
||||||
*
|
*
|
||||||
* @param string $external_customer_id
|
* @param string $external_customer_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setExternalCustomerId($external_customer_id)
|
public function setExternalCustomerId($external_customer_id)
|
||||||
@@ -322,7 +323,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A unique identifier of the customer to whom this card account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
|
* The ID of the customer who owns this card account. The facilitator generates and provides this ID. Required when you create or use a stored funding instrument in the PayPal vault.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -332,11 +333,11 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* State of the funding instrument.
|
* The state of the funding instrument.
|
||||||
* Valid Values: ["EXPIRED", "ACTIVE"]
|
* Valid Values: ["EXPIRED", "ACTIVE"]
|
||||||
*
|
*
|
||||||
* @param string $status
|
* @param string $status
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setStatus($status)
|
public function setStatus($status)
|
||||||
@@ -346,7 +347,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* State of the funding instrument.
|
* The state of the funding instrument.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -356,10 +357,34 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Date/Time until this resource can be used fund a payment.
|
* The product class of the financial instrument issuer.
|
||||||
|
* Valid Values: ["CREDIT", "DEBIT", "GIFT", "PAYPAL_PREPAID", "PREPAID", "UNKNOWN"]
|
||||||
|
*
|
||||||
|
* @param string $card_product_class
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setCardProductClass($card_product_class)
|
||||||
|
{
|
||||||
|
$this->card_product_class = $card_product_class;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The product class of the financial instrument issuer.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getCardProductClass()
|
||||||
|
{
|
||||||
|
return $this->card_product_class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The date and time until when this instrument can be used fund a payment.
|
||||||
*
|
*
|
||||||
* @param string $valid_until
|
* @param string $valid_until
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setValidUntil($valid_until)
|
public function setValidUntil($valid_until)
|
||||||
@@ -369,7 +394,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Date/Time until this resource can be used fund a payment.
|
* The date and time until when this instrument can be used fund a payment.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -379,10 +404,10 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1-2 digit card issue number. Needed for UK Maestro Card.
|
* The one- to two-digit card issue number. Required for UK Maestro cards.
|
||||||
*
|
*
|
||||||
* @param string $issue_number
|
* @param string $issue_number
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setIssueNumber($issue_number)
|
public function setIssueNumber($issue_number)
|
||||||
@@ -392,7 +417,7 @@ class PaymentCard extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1-2 digit card issue number. Needed for UK Maestro Card.
|
* The one- to two-digit card issue number. Required for UK Maestro cards.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -405,7 +430,7 @@ class PaymentCard extends PayPalModel
|
|||||||
* Sets Links
|
* Sets Links
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Links[] $links
|
* @param \PayPal\Api\Links[] $links
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setLinks($links)
|
public function setLinks($links)
|
||||||
|
|||||||
@@ -11,8 +11,7 @@ use PayPal\Common\PayPalModel;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string payer_id
|
* @property string payer_id
|
||||||
* @property string carrier_account_id
|
|
||||||
* @property \PayPal\Api\Transaction[] transactions
|
* @property \PayPal\Api\Transaction[] transactions
|
||||||
*/
|
*/
|
||||||
class PaymentExecution extends PayPalModel
|
class PaymentExecution extends PayPalModel
|
||||||
@@ -21,7 +20,7 @@ class PaymentExecution extends PayPalModel
|
|||||||
* The ID of the Payer, passed in the `return_url` by PayPal.
|
* The ID of the Payer, passed in the `return_url` by PayPal.
|
||||||
*
|
*
|
||||||
* @param string $payer_id
|
* @param string $payer_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPayerId($payer_id)
|
public function setPayerId($payer_id)
|
||||||
@@ -42,9 +41,9 @@ class PaymentExecution extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Carrier account id for a carrier billing payment. For a carrier billing payment, payer_id is not applicable.
|
* Carrier account id for a carrier billing payment. For a carrier billing payment, payer_id is not applicable.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param string $carrier_account_id
|
* @param string $carrier_account_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCarrierAccountId($carrier_account_id)
|
public function setCarrierAccountId($carrier_account_id)
|
||||||
@@ -55,7 +54,7 @@ class PaymentExecution extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Carrier account id for a carrier billing payment. For a carrier billing payment, payer_id is not applicable.
|
* Carrier account id for a carrier billing payment. For a carrier billing payment, payer_id is not applicable.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getCarrierAccountId()
|
public function getCarrierAccountId()
|
||||||
@@ -67,7 +66,7 @@ class PaymentExecution extends PayPalModel
|
|||||||
* Transactional details including the amount and item details.
|
* Transactional details including the amount and item details.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Transaction[] $transactions
|
* @param \PayPal\Api\Transaction[] $transactions
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setTransactions($transactions)
|
public function setTransactions($transactions)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class PaymentHistory extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
|
* Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items. Maximum value: 20.
|
||||||
*
|
*
|
||||||
* @param int $count
|
* @param int $count
|
||||||
*
|
*
|
||||||
@@ -84,7 +84,7 @@ class PaymentHistory extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
|
* Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items. Maximum value: 20.
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ use PayPal\Common\PayPalModel;
|
|||||||
class PaymentOptions extends PayPalModel
|
class PaymentOptions extends PayPalModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Optional payment method type. If specified, the transaction will go through for only instant payment. Only for use with the paypal payment_method, not relevant for the credit_card payment_method.
|
* Payment method requested for this purchase unit
|
||||||
* Valid Values: ["UNRESTRICTED", "INSTANT_FUNDING_SOURCE", "IMMEDIATE_PAY"]
|
* Valid Values: ["UNRESTRICTED", "INSTANT_FUNDING_SOURCE", "IMMEDIATE_PAY"]
|
||||||
*
|
*
|
||||||
* @param string $allowed_payment_method
|
* @param string $allowed_payment_method
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAllowedPaymentMethod($allowed_payment_method)
|
public function setAllowedPaymentMethod($allowed_payment_method)
|
||||||
@@ -30,7 +30,7 @@ class PaymentOptions extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional payment method type. If specified, the transaction will go through for only instant payment. Only for use with the paypal payment_method, not relevant for the credit_card payment_method.
|
* Payment method requested for this purchase unit
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -41,10 +41,9 @@ class PaymentOptions extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicator if this payment request is a recurring payment. Only supported when the `payment_method` is set to `credit_card`
|
* Indicator if this payment request is a recurring payment. Only supported when the `payment_method` is set to `credit_card`
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param bool $recurring_flag
|
* @param bool $recurring_flag
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setRecurringFlag($recurring_flag)
|
public function setRecurringFlag($recurring_flag)
|
||||||
@@ -55,7 +54,6 @@ class PaymentOptions extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicator if this payment request is a recurring payment. Only supported when the `payment_method` is set to `credit_card`
|
* Indicator if this payment request is a recurring payment. Only supported when the `payment_method` is set to `credit_card`
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
@@ -66,10 +64,9 @@ class PaymentOptions extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicator if fraud management filters (fmf) should be skipped for this transaction. Only supported when the `payment_method` is set to `credit_card`
|
* Indicator if fraud management filters (fmf) should be skipped for this transaction. Only supported when the `payment_method` is set to `credit_card`
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @param bool $skip_fmf
|
* @param bool $skip_fmf
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setSkipFmf($skip_fmf)
|
public function setSkipFmf($skip_fmf)
|
||||||
@@ -80,7 +77,6 @@ class PaymentOptions extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicator if fraud management filters (fmf) should be skipped for this transaction. Only supported when the `payment_method` is set to `credit_card`
|
* Indicator if fraud management filters (fmf) should be skipped for this transaction. Only supported when the `payment_method` is set to `credit_card`
|
||||||
*
|
|
||||||
* @deprecated Not publicly available
|
* @deprecated Not publicly available
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use PayPal\Common\PayPalModel;
|
|||||||
/**
|
/**
|
||||||
* Class Phone
|
* Class Phone
|
||||||
*
|
*
|
||||||
* Representation of a phone number.
|
* Information related to the Payee.
|
||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
@@ -18,7 +18,7 @@ use PayPal\Common\PayPalModel;
|
|||||||
class Phone extends PayPalModel
|
class Phone extends PayPalModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The country calling code (CC) as defined by E.164. The combined length of CC+national cannot be more than 15 digits.
|
* Country code (from in E.164 format)
|
||||||
*
|
*
|
||||||
* @param string $country_code
|
* @param string $country_code
|
||||||
*
|
*
|
||||||
@@ -31,7 +31,7 @@ class Phone extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The country calling code (CC) as defined by E.164. The combined length of CC+national cannot be more than 15 digits.
|
* Country code (from in E.164 format)
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -41,7 +41,7 @@ class Phone extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The national number as defined by E.164. The combined length of CC+national cannot be more than 15 digits. A national number consists of National Destination Code (NDC) and Subscriber Number (SN).
|
* In-country phone number (from in E.164 format)
|
||||||
*
|
*
|
||||||
* @param string $national_number
|
* @param string $national_number
|
||||||
*
|
*
|
||||||
@@ -54,7 +54,7 @@ class Phone extends PayPalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The national number as defined by E.164. The combined length of CC+national cannot be more than 15 digits. A national number consists of National Destination Code (NDC) and Subscriber Number (SN).
|
* In-country phone number (from in E.164 format)
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -67,7 +67,7 @@ class Phone extends PayPalModel
|
|||||||
* Phone extension
|
* Phone extension
|
||||||
*
|
*
|
||||||
* @param string $extension
|
* @param string $extension
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setExtension($extension)
|
public function setExtension($extension)
|
||||||
|
|||||||
@@ -11,15 +11,12 @@ use PayPal\Common\PayPalModel;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string email
|
|
||||||
* @property string external_remember_me_id
|
|
||||||
* @property \PayPal\Api\Address billing_address
|
|
||||||
*/
|
*/
|
||||||
class PotentialPayerInfo extends PayPalModel
|
class PotentialPayerInfo extends PayPalModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Email address representing the potential payer.
|
* Email address representing the potential payer.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param string $email
|
* @param string $email
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
@@ -32,7 +29,7 @@ class PotentialPayerInfo extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Email address representing the potential payer.
|
* Email address representing the potential payer.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getEmail()
|
public function getEmail()
|
||||||
@@ -42,7 +39,7 @@ class PotentialPayerInfo extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* ExternalRememberMe id representing the potential payer
|
* ExternalRememberMe id representing the potential payer
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param string $external_remember_me_id
|
* @param string $external_remember_me_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
@@ -55,7 +52,7 @@ class PotentialPayerInfo extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* ExternalRememberMe id representing the potential payer
|
* ExternalRememberMe id representing the potential payer
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getExternalRememberMeId()
|
public function getExternalRememberMeId()
|
||||||
@@ -88,7 +85,7 @@ class PotentialPayerInfo extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Billing address of the potential payer.
|
* Billing address of the potential payer.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param \PayPal\Api\Address $billing_address
|
* @param \PayPal\Api\Address $billing_address
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
@@ -101,7 +98,7 @@ class PotentialPayerInfo extends PayPalModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Billing address of the potential payer.
|
* Billing address of the potential payer.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @return \PayPal\Api\Address
|
* @return \PayPal\Api\Address
|
||||||
*/
|
*/
|
||||||
public function getBillingAddress()
|
public function getBillingAddress()
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
use PayPal\Validation\ArgumentValidator;
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
use PayPal\Rest\ApiContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Refund
|
* Class Refund
|
||||||
@@ -13,16 +13,18 @@ use PayPal\Validation\ArgumentValidator;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string id
|
* @property string id
|
||||||
* @property \PayPal\Api\Amount amount
|
* @property \PayPal\Api\Amount amount
|
||||||
* @property string state
|
* @property string state
|
||||||
* @property string reason
|
* @property string reason
|
||||||
* @property string sale_id
|
* @property string invoice_number
|
||||||
* @property string capture_id
|
* @property string sale_id
|
||||||
* @property string parent_payment
|
* @property string capture_id
|
||||||
* @property string description
|
* @property string parent_payment
|
||||||
* @property string create_time
|
* @property string description
|
||||||
* @property string update_time
|
* @property string create_time
|
||||||
|
* @property string update_time
|
||||||
|
* @property string reason_code
|
||||||
* @property \PayPal\Api\Links[] links
|
* @property \PayPal\Api\Links[] links
|
||||||
*/
|
*/
|
||||||
class Refund extends PayPalResourceModel
|
class Refund extends PayPalResourceModel
|
||||||
@@ -31,7 +33,7 @@ class Refund extends PayPalResourceModel
|
|||||||
* ID of the refund transaction. 17 characters max.
|
* ID of the refund transaction. 17 characters max.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setId($id)
|
public function setId($id)
|
||||||
@@ -54,7 +56,7 @@ class Refund extends PayPalResourceModel
|
|||||||
* Details including both refunded amount (to payer) and refunded fee (to payee). 10 characters max.
|
* Details including both refunded amount (to payer) and refunded fee (to payee). 10 characters max.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Amount $amount
|
* @param \PayPal\Api\Amount $amount
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAmount($amount)
|
public function setAmount($amount)
|
||||||
@@ -78,7 +80,7 @@ class Refund extends PayPalResourceModel
|
|||||||
* Valid Values: ["pending", "completed", "failed"]
|
* Valid Values: ["pending", "completed", "failed"]
|
||||||
*
|
*
|
||||||
* @param string $state
|
* @param string $state
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setState($state)
|
public function setState($state)
|
||||||
@@ -101,7 +103,7 @@ class Refund extends PayPalResourceModel
|
|||||||
* Reason description for the Sale transaction being refunded.
|
* Reason description for the Sale transaction being refunded.
|
||||||
*
|
*
|
||||||
* @param string $reason
|
* @param string $reason
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setReason($reason)
|
public function setReason($reason)
|
||||||
@@ -121,10 +123,33 @@ class Refund extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the Sale transaction being refunded.
|
* Your own invoice or tracking ID number. Character length and limitations: 127 single-byte alphanumeric characters.
|
||||||
|
*
|
||||||
|
* @param string $invoice_number
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setInvoiceNumber($invoice_number)
|
||||||
|
{
|
||||||
|
$this->invoice_number = $invoice_number;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Your own invoice or tracking ID number. Character length and limitations: 127 single-byte alphanumeric characters.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getInvoiceNumber()
|
||||||
|
{
|
||||||
|
return $this->invoice_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID of the Sale transaction being refunded.
|
||||||
*
|
*
|
||||||
* @param string $sale_id
|
* @param string $sale_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setSaleId($sale_id)
|
public function setSaleId($sale_id)
|
||||||
@@ -134,7 +159,7 @@ class Refund extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the Sale transaction being refunded.
|
* ID of the Sale transaction being refunded.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -147,7 +172,7 @@ class Refund extends PayPalResourceModel
|
|||||||
* ID of the sale transaction being refunded.
|
* ID of the sale transaction being refunded.
|
||||||
*
|
*
|
||||||
* @param string $capture_id
|
* @param string $capture_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCaptureId($capture_id)
|
public function setCaptureId($capture_id)
|
||||||
@@ -170,7 +195,7 @@ class Refund extends PayPalResourceModel
|
|||||||
* ID of the payment resource on which this transaction is based.
|
* ID of the payment resource on which this transaction is based.
|
||||||
*
|
*
|
||||||
* @param string $parent_payment
|
* @param string $parent_payment
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setParentPayment($parent_payment)
|
public function setParentPayment($parent_payment)
|
||||||
@@ -193,7 +218,7 @@ class Refund extends PayPalResourceModel
|
|||||||
* Description of what is being refunded for.
|
* Description of what is being refunded for.
|
||||||
*
|
*
|
||||||
* @param string $description
|
* @param string $description
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setDescription($description)
|
public function setDescription($description)
|
||||||
@@ -216,7 +241,7 @@ class Refund extends PayPalResourceModel
|
|||||||
* Time of refund as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
* Time of refund as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||||
*
|
*
|
||||||
* @param string $create_time
|
* @param string $create_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCreateTime($create_time)
|
public function setCreateTime($create_time)
|
||||||
@@ -239,7 +264,7 @@ class Refund extends PayPalResourceModel
|
|||||||
* Time that the resource was last updated.
|
* Time that the resource was last updated.
|
||||||
*
|
*
|
||||||
* @param string $update_time
|
* @param string $update_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setUpdateTime($update_time)
|
public function setUpdateTime($update_time)
|
||||||
@@ -259,11 +284,35 @@ class Refund extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve details about a specific refund by passing the refund_id in the request URI.
|
* The reason code for the refund state being pending
|
||||||
|
* Valid Values: ["ECHECK"]
|
||||||
*
|
*
|
||||||
* @param string $refundId
|
* @param string $reason_code
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
*
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setReasonCode($reason_code)
|
||||||
|
{
|
||||||
|
$this->reason_code = $reason_code;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reason code for the refund state being pending
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getReasonCode()
|
||||||
|
{
|
||||||
|
return $this->reason_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shows details for a refund, by ID.
|
||||||
|
*
|
||||||
|
* @param string $refundId
|
||||||
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Refund
|
* @return Refund
|
||||||
*/
|
*/
|
||||||
public static function get($refundId, $apiContext = null, $restCall = null)
|
public static function get($refundId, $apiContext = null, $restCall = null)
|
||||||
|
|||||||
162
lib/PayPal/Api/RefundRequest.php
Normal file
162
lib/PayPal/Api/RefundRequest.php
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PayPal\Api;
|
||||||
|
|
||||||
|
use PayPal\Common\PayPalModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class RefundRequest
|
||||||
|
*
|
||||||
|
* A refund transaction.
|
||||||
|
*
|
||||||
|
* @package PayPal\Api
|
||||||
|
*
|
||||||
|
* @property \PayPal\Api\Amount amount
|
||||||
|
* @property string description
|
||||||
|
* @property string refund_source
|
||||||
|
* @property string reason
|
||||||
|
* @property string invoice_number
|
||||||
|
* @property bool refund_advice
|
||||||
|
*/
|
||||||
|
class RefundRequest extends PayPalModel
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Details including both refunded amount (to payer) and refunded fee (to payee).
|
||||||
|
*
|
||||||
|
* @param \PayPal\Api\Amount $amount
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setAmount($amount)
|
||||||
|
{
|
||||||
|
$this->amount = $amount;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Details including both refunded amount (to payer) and refunded fee (to payee).
|
||||||
|
*
|
||||||
|
* @return \PayPal\Api\Amount
|
||||||
|
*/
|
||||||
|
public function getAmount()
|
||||||
|
{
|
||||||
|
return $this->amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description of what is being refunded for. Character length and limitations: 255 single-byte alphanumeric characters.
|
||||||
|
*
|
||||||
|
* @param string $description
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setDescription($description)
|
||||||
|
{
|
||||||
|
$this->description = $description;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description of what is being refunded for. Character length and limitations: 255 single-byte alphanumeric characters.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getDescription()
|
||||||
|
{
|
||||||
|
return $this->description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of PayPal funding source (balance or eCheck) that can be used for auto refund.
|
||||||
|
* Valid Values: ["INSTANT_FUNDING_SOURCE", "ECHECK", "UNRESTRICTED"]
|
||||||
|
*
|
||||||
|
* @param string $refund_source
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setRefundSource($refund_source)
|
||||||
|
{
|
||||||
|
$this->refund_source = $refund_source;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of PayPal funding source (balance or eCheck) that can be used for auto refund.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getRefundSource()
|
||||||
|
{
|
||||||
|
return $this->refund_source;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reason description for the Sale transaction being refunded.
|
||||||
|
*
|
||||||
|
* @param string $reason
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setReason($reason)
|
||||||
|
{
|
||||||
|
$this->reason = $reason;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reason description for the Sale transaction being refunded.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getReason()
|
||||||
|
{
|
||||||
|
return $this->reason;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The invoice number that is used to track this payment. Character length and limitations: 127 single-byte alphanumeric characters.
|
||||||
|
*
|
||||||
|
* @param string $invoice_number
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setInvoiceNumber($invoice_number)
|
||||||
|
{
|
||||||
|
$this->invoice_number = $invoice_number;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The invoice number that is used to track this payment. Character length and limitations: 127 single-byte alphanumeric characters.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getInvoiceNumber()
|
||||||
|
{
|
||||||
|
return $this->invoice_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag to indicate that the buyer was already given store credit for a given transaction.
|
||||||
|
*
|
||||||
|
* @param bool $refund_advice
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setRefundAdvice($refund_advice)
|
||||||
|
{
|
||||||
|
$this->refund_advice = $refund_advice;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag to indicate that the buyer was already given store credit for a given transaction.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function getRefundAdvice()
|
||||||
|
{
|
||||||
|
return $this->refund_advice;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -11,11 +11,11 @@ use PayPal\Common\PayPalModel;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property \PayPal\Api\Sale sale
|
* @property \PayPal\Api\Sale sale
|
||||||
* @property \PayPal\Api\Authorization authorization
|
* @property \PayPal\Api\Authorization authorization
|
||||||
* @property \PayPal\Api\Order order
|
* @property \PayPal\Api\Order order
|
||||||
* @property \PayPal\Api\Capture capture
|
* @property \PayPal\Api\Capture capture
|
||||||
* @property \PayPal\Api\Refund refund
|
* @property \PayPal\Api\Refund refund
|
||||||
*/
|
*/
|
||||||
class RelatedResources extends PayPalModel
|
class RelatedResources extends PayPalModel
|
||||||
{
|
{
|
||||||
@@ -23,7 +23,7 @@ class RelatedResources extends PayPalModel
|
|||||||
* Sale transaction
|
* Sale transaction
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Sale $sale
|
* @param \PayPal\Api\Sale $sale
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setSale($sale)
|
public function setSale($sale)
|
||||||
@@ -46,7 +46,7 @@ class RelatedResources extends PayPalModel
|
|||||||
* Authorization transaction
|
* Authorization transaction
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Authorization $authorization
|
* @param \PayPal\Api\Authorization $authorization
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAuthorization($authorization)
|
public function setAuthorization($authorization)
|
||||||
@@ -69,7 +69,7 @@ class RelatedResources extends PayPalModel
|
|||||||
* Order transaction
|
* Order transaction
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Order $order
|
* @param \PayPal\Api\Order $order
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setOrder($order)
|
public function setOrder($order)
|
||||||
@@ -92,7 +92,7 @@ class RelatedResources extends PayPalModel
|
|||||||
* Capture transaction
|
* Capture transaction
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Capture $capture
|
* @param \PayPal\Api\Capture $capture
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCapture($capture)
|
public function setCapture($capture)
|
||||||
@@ -115,7 +115,7 @@ class RelatedResources extends PayPalModel
|
|||||||
* Refund transaction
|
* Refund transaction
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Refund $refund
|
* @param \PayPal\Api\Refund $refund
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setRefund($refund)
|
public function setRefund($refund)
|
||||||
|
|||||||
@@ -3,46 +3,46 @@
|
|||||||
namespace PayPal\Api;
|
namespace PayPal\Api;
|
||||||
|
|
||||||
use PayPal\Common\PayPalResourceModel;
|
use PayPal\Common\PayPalResourceModel;
|
||||||
use PayPal\Rest\ApiContext;
|
|
||||||
use PayPal\Validation\ArgumentValidator;
|
use PayPal\Validation\ArgumentValidator;
|
||||||
|
use PayPal\Rest\ApiContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Sale
|
* Class Sale
|
||||||
*
|
*
|
||||||
* A sale transaction.
|
* A sale transaction. This is the resource that is returned as a part related resources in Payment
|
||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string id
|
* @property string id
|
||||||
* @property string purchase_unit_reference_id
|
* @property string purchase_unit_reference_id
|
||||||
* @property \PayPal\Api\Amount amount
|
* @property \PayPal\Api\Amount amount
|
||||||
* @property string payment_mode
|
* @property string payment_mode
|
||||||
* @property string state
|
* @property string state
|
||||||
* @property string reason_code
|
* @property string reason_code
|
||||||
* @property string protection_eligibility
|
* @property string protection_eligibility
|
||||||
* @property string protection_eligibility_type
|
* @property string protection_eligibility_type
|
||||||
* @property string clearing_time
|
* @property string clearing_time
|
||||||
* @property string payment_hold_status
|
* @property string payment_hold_status
|
||||||
* @property string[] payment_hold_reasons
|
* @property string[] payment_hold_reasons
|
||||||
* @property \PayPal\Api\Currency transaction_fee
|
* @property \PayPal\Api\Currency transaction_fee
|
||||||
* @property \PayPal\Api\Currency receivable_amount
|
* @property \PayPal\Api\Currency receivable_amount
|
||||||
* @property string exchange_rate
|
* @property string exchange_rate
|
||||||
* @property \PayPal\Api\FmfDetails fmf_details
|
* @property \PayPal\Api\FmfDetails fmf_details
|
||||||
* @property string receipt_id
|
* @property string receipt_id
|
||||||
* @property string parent_payment
|
* @property string parent_payment
|
||||||
* @property \PayPal\Api\ProcessorResponse processor_response
|
* @property \PayPal\Api\ProcessorResponse processor_response
|
||||||
* @property string billing_agreement_id
|
* @property string billing_agreement_id
|
||||||
* @property string create_time
|
* @property string create_time
|
||||||
* @property string update_time
|
* @property string update_time
|
||||||
* @property \PayPal\Api\Links[] links
|
* @property \PayPal\Api\Links[] links
|
||||||
*/
|
*/
|
||||||
class Sale extends PayPalResourceModel
|
class Sale extends PayPalResourceModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* ID of the sale transaction.
|
* Identifier of the sale transaction.
|
||||||
*
|
*
|
||||||
* @param string $id
|
* @param string $id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setId($id)
|
public function setId($id)
|
||||||
@@ -52,7 +52,7 @@ class Sale extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the sale transaction.
|
* Identifier of the sale transaction.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -62,10 +62,10 @@ class Sale extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identifier of the purchased unit associated with this object.
|
* Identifier to the purchase or transaction unit corresponding to this sale transaction.
|
||||||
*
|
*
|
||||||
* @param string $purchase_unit_reference_id
|
* @param string $purchase_unit_reference_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPurchaseUnitReferenceId($purchase_unit_reference_id)
|
public function setPurchaseUnitReferenceId($purchase_unit_reference_id)
|
||||||
@@ -75,7 +75,7 @@ class Sale extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identifier of the purchased unit associated with this object.
|
* Identifier to the purchase or transaction unit corresponding to this sale transaction.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -88,7 +88,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* Amount being collected.
|
* Amount being collected.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Amount $amount
|
* @param \PayPal\Api\Amount $amount
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setAmount($amount)
|
public function setAmount($amount)
|
||||||
@@ -112,7 +112,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
|
* Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
|
||||||
*
|
*
|
||||||
* @param string $payment_mode
|
* @param string $payment_mode
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPaymentMode($payment_mode)
|
public function setPaymentMode($payment_mode)
|
||||||
@@ -132,11 +132,11 @@ class Sale extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* State of the sale.
|
* State of the sale transaction.
|
||||||
* Valid Values: ["completed", "partially_refunded", "pending", "refunded"]
|
* Valid Values: ["completed", "partially_refunded", "pending", "refunded", "denied"]
|
||||||
*
|
*
|
||||||
* @param string $state
|
* @param string $state
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setState($state)
|
public function setState($state)
|
||||||
@@ -146,7 +146,7 @@ class Sale extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* State of the sale.
|
* State of the sale transaction.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -157,10 +157,10 @@ class Sale extends PayPalResourceModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reason code for the transaction state being Pending or Reversed. Only supported when the `payment_method` is set to `paypal`.
|
* Reason code for the transaction state being Pending or Reversed. Only supported when the `payment_method` is set to `paypal`.
|
||||||
* Valid Values: ["CHARGEBACK", "GUARANTEE", "BUYER_COMPLAINT", "REFUND", "UNCONFIRMED_SHIPPING_ADDRESS", "ECHECK", "INTERNATIONAL_WITHDRAWAL", "RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION", "PAYMENT_REVIEW", "REGULATORY_REVIEW", "UNILATERAL", "VERIFICATION_REQUIRED"]
|
* Valid Values: ["CHARGEBACK", "GUARANTEE", "BUYER_COMPLAINT", "REFUND", "UNCONFIRMED_SHIPPING_ADDRESS", "ECHECK", "INTERNATIONAL_WITHDRAWAL", "RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION", "PAYMENT_REVIEW", "REGULATORY_REVIEW", "UNILATERAL", "VERIFICATION_REQUIRED", "TRANSACTION_APPROVED_AWAITING_FUNDING"]
|
||||||
*
|
*
|
||||||
* @param string $reason_code
|
* @param string $reason_code
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setReasonCode($reason_code)
|
public function setReasonCode($reason_code)
|
||||||
@@ -180,11 +180,11 @@ class Sale extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The level of seller protection in force for the transaction. Only supported when the `payment_method` is set to `paypal`.
|
* The level of seller protection in force for the transaction. Only supported when the `payment_method` is set to `paypal`.
|
||||||
* Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
|
* Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
|
||||||
*
|
*
|
||||||
* @param string $protection_eligibility
|
* @param string $protection_eligibility
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setProtectionEligibility($protection_eligibility)
|
public function setProtectionEligibility($protection_eligibility)
|
||||||
@@ -194,7 +194,7 @@ class Sale extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The level of seller protection in force for the transaction. Only supported when the `payment_method` is set to `paypal`.
|
* The level of seller protection in force for the transaction. Only supported when the `payment_method` is set to `paypal`.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -208,7 +208,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"]
|
* Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"]
|
||||||
*
|
*
|
||||||
* @param string $protection_eligibility_type
|
* @param string $protection_eligibility_type
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setProtectionEligibilityType($protection_eligibility_type)
|
public function setProtectionEligibilityType($protection_eligibility_type)
|
||||||
@@ -228,10 +228,10 @@ class Sale extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expected clearing time for eCheck transactions. Only supported when the `payment_method` is set to `paypal`.
|
* Expected clearing time for eCheck Transactions. Returned when payment is made with eCheck. Only supported when the `payment_method` is set to `paypal`.
|
||||||
*
|
*
|
||||||
* @param string $clearing_time
|
* @param string $clearing_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setClearingTime($clearing_time)
|
public function setClearingTime($clearing_time)
|
||||||
@@ -241,7 +241,7 @@ class Sale extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expected clearing time for eCheck transactions. Only supported when the `payment_method` is set to `paypal`.
|
* Expected clearing time for eCheck Transactions. Returned when payment is made with eCheck. Only supported when the `payment_method` is set to `paypal`.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -255,7 +255,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* Valid Values: ["HELD"]
|
* Valid Values: ["HELD"]
|
||||||
*
|
*
|
||||||
* @param string $payment_hold_status
|
* @param string $payment_hold_status
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPaymentHoldStatus($payment_hold_status)
|
public function setPaymentHoldStatus($payment_hold_status)
|
||||||
@@ -278,7 +278,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* Reasons for PayPal holding recipient fund. It is set only if payment hold status is held
|
* Reasons for PayPal holding recipient fund. It is set only if payment hold status is held
|
||||||
*
|
*
|
||||||
* @param string[] $payment_hold_reasons
|
* @param string[] $payment_hold_reasons
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPaymentHoldReasons($payment_hold_reasons)
|
public function setPaymentHoldReasons($payment_hold_reasons)
|
||||||
@@ -328,10 +328,10 @@ class Sale extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transaction fee charged by PayPal for this transaction.
|
* Transaction fee applicable for this payment.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Currency $transaction_fee
|
* @param \PayPal\Api\Currency $transaction_fee
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setTransactionFee($transaction_fee)
|
public function setTransactionFee($transaction_fee)
|
||||||
@@ -341,7 +341,7 @@ class Sale extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transaction fee charged by PayPal for this transaction.
|
* Transaction fee applicable for this payment.
|
||||||
*
|
*
|
||||||
* @return \PayPal\Api\Currency
|
* @return \PayPal\Api\Currency
|
||||||
*/
|
*/
|
||||||
@@ -354,7 +354,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* Net amount the merchant receives for this transaction in their receivable currency. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer.
|
* Net amount the merchant receives for this transaction in their receivable currency. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\Currency $receivable_amount
|
* @param \PayPal\Api\Currency $receivable_amount
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setReceivableAmount($receivable_amount)
|
public function setReceivableAmount($receivable_amount)
|
||||||
@@ -377,7 +377,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* Exchange rate applied for this transaction. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer.
|
* Exchange rate applied for this transaction. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer.
|
||||||
*
|
*
|
||||||
* @param string $exchange_rate
|
* @param string $exchange_rate
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setExchangeRate($exchange_rate)
|
public function setExchangeRate($exchange_rate)
|
||||||
@@ -400,7 +400,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, or pending action. Returned in a payment response only if the merchant has enabled FMF in the profile settings and one of the fraud filters was triggered based on those settings. See [Fraud Management Filters Summary](/docs/classic/fmf/integration-guide/FMFSummary/) for more information.
|
* Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, or pending action. Returned in a payment response only if the merchant has enabled FMF in the profile settings and one of the fraud filters was triggered based on those settings. See [Fraud Management Filters Summary](/docs/classic/fmf/integration-guide/FMFSummary/) for more information.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\FmfDetails $fmf_details
|
* @param \PayPal\Api\FmfDetails $fmf_details
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setFmfDetails($fmf_details)
|
public function setFmfDetails($fmf_details)
|
||||||
@@ -423,7 +423,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* Receipt id is a payment identification number returned for guest users to identify the payment.
|
* Receipt id is a payment identification number returned for guest users to identify the payment.
|
||||||
*
|
*
|
||||||
* @param string $receipt_id
|
* @param string $receipt_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setReceiptId($receipt_id)
|
public function setReceiptId($receipt_id)
|
||||||
@@ -446,7 +446,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* ID of the payment resource on which this transaction is based.
|
* ID of the payment resource on which this transaction is based.
|
||||||
*
|
*
|
||||||
* @param string $parent_payment
|
* @param string $parent_payment
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setParentPayment($parent_payment)
|
public function setParentPayment($parent_payment)
|
||||||
@@ -469,7 +469,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* Response codes returned by the processor concerning the submitted payment. Only supported when the `payment_method` is set to `credit_card`.
|
* Response codes returned by the processor concerning the submitted payment. Only supported when the `payment_method` is set to `credit_card`.
|
||||||
*
|
*
|
||||||
* @param \PayPal\Api\ProcessorResponse $processor_response
|
* @param \PayPal\Api\ProcessorResponse $processor_response
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setProcessorResponse($processor_response)
|
public function setProcessorResponse($processor_response)
|
||||||
@@ -492,7 +492,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* ID of the billing agreement used as reference to execute this transaction.
|
* ID of the billing agreement used as reference to execute this transaction.
|
||||||
*
|
*
|
||||||
* @param string $billing_agreement_id
|
* @param string $billing_agreement_id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setBillingAgreementId($billing_agreement_id)
|
public function setBillingAgreementId($billing_agreement_id)
|
||||||
@@ -515,7 +515,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* Time of sale as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6)
|
* Time of sale as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6)
|
||||||
*
|
*
|
||||||
* @param string $create_time
|
* @param string $create_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setCreateTime($create_time)
|
public function setCreateTime($create_time)
|
||||||
@@ -538,7 +538,7 @@ class Sale extends PayPalResourceModel
|
|||||||
* Time the resource was last updated in UTC ISO8601 format.
|
* Time the resource was last updated in UTC ISO8601 format.
|
||||||
*
|
*
|
||||||
* @param string $update_time
|
* @param string $update_time
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setUpdateTime($update_time)
|
public function setUpdateTime($update_time)
|
||||||
@@ -558,11 +558,11 @@ class Sale extends PayPalResourceModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve details about a sale transaction by passing the sale_id in the request URI. This request returns only the sales that were created via the REST API.
|
* Shows details for a sale, by ID. Returns only sales that were created through the REST API.
|
||||||
*
|
*
|
||||||
* @param string $saleId
|
* @param string $saleId
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
* @return Sale
|
* @return Sale
|
||||||
*/
|
*/
|
||||||
public static function get($saleId, $apiContext = null, $restCall = null)
|
public static function get($saleId, $apiContext = null, $restCall = null)
|
||||||
@@ -585,6 +585,7 @@ class Sale extends PayPalResourceModel
|
|||||||
/**
|
/**
|
||||||
* Refund a completed payment by passing the sale_id in the request URI. In addition, include an empty JSON payload in the request body for a full refund. For a partial refund, include an amount object in the request body.
|
* Refund a completed payment by passing the sale_id in the request URI. In addition, include an empty JSON payload in the request body for a full refund. For a partial refund, include an amount object in the request body.
|
||||||
*
|
*
|
||||||
|
* @deprecated Please use #refundSale instead.
|
||||||
* @param Refund $refund
|
* @param Refund $refund
|
||||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
@@ -608,4 +609,29 @@ class Sale extends PayPalResourceModel
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refunds a sale, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an `amount` object in the JSON request body.
|
||||||
|
*
|
||||||
|
* @param RefundRequest $refundRequest
|
||||||
|
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||||
|
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||||
|
* @return DetailedRefund
|
||||||
|
*/
|
||||||
|
public function refundSale($refundRequest, $apiContext = null, $restCall = null)
|
||||||
|
{
|
||||||
|
ArgumentValidator::validate($this->getId(), "Id");
|
||||||
|
ArgumentValidator::validate($refundRequest, 'refundRequest');
|
||||||
|
$payLoad = $refundRequest->toJSON();
|
||||||
|
$json = self::executeCall(
|
||||||
|
"/v1/payments/sale/{$this->getId()}/refund",
|
||||||
|
"POST",
|
||||||
|
$payLoad,
|
||||||
|
null,
|
||||||
|
$apiContext,
|
||||||
|
$restCall
|
||||||
|
);
|
||||||
|
$ret = new DetailedRefund();
|
||||||
|
$ret->fromJson($json);
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,18 +9,15 @@ namespace PayPal\Api;
|
|||||||
*
|
*
|
||||||
* @package PayPal\Api
|
* @package PayPal\Api
|
||||||
*
|
*
|
||||||
* @property string id
|
|
||||||
* @property string recipient_name
|
* @property string recipient_name
|
||||||
* @property bool default_address
|
|
||||||
* @property bool preferred_address
|
|
||||||
*/
|
*/
|
||||||
class ShippingAddress extends Address
|
class ShippingAddress extends Address
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Address ID assigned in PayPal system.
|
* Address ID assigned in PayPal system.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param string $id
|
* @param string $id
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setId($id)
|
public function setId($id)
|
||||||
@@ -31,7 +28,7 @@ class ShippingAddress extends Address
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Address ID assigned in PayPal system.
|
* Address ID assigned in PayPal system.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getId()
|
public function getId()
|
||||||
@@ -43,7 +40,7 @@ class ShippingAddress extends Address
|
|||||||
* Name of the recipient at this address.
|
* Name of the recipient at this address.
|
||||||
*
|
*
|
||||||
* @param string $recipient_name
|
* @param string $recipient_name
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setRecipientName($recipient_name)
|
public function setRecipientName($recipient_name)
|
||||||
@@ -64,9 +61,9 @@ class ShippingAddress extends Address
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Default shipping address of the Payer.
|
* Default shipping address of the Payer.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param bool $default_address
|
* @param bool $default_address
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setDefaultAddress($default_address)
|
public function setDefaultAddress($default_address)
|
||||||
@@ -77,7 +74,7 @@ class ShippingAddress extends Address
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Default shipping address of the Payer.
|
* Default shipping address of the Payer.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function getDefaultAddress()
|
public function getDefaultAddress()
|
||||||
@@ -87,9 +84,9 @@ class ShippingAddress extends Address
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Shipping Address marked as preferred by Payer.
|
* Shipping Address marked as preferred by Payer.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @param bool $preferred_address
|
* @param bool $preferred_address
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPreferredAddress($preferred_address)
|
public function setPreferredAddress($preferred_address)
|
||||||
@@ -100,7 +97,7 @@ class ShippingAddress extends Address
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Shipping Address marked as preferred by Payer.
|
* Shipping Address marked as preferred by Payer.
|
||||||
*
|
* @deprecated Not publicly available
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function getPreferredAddress()
|
public function getPreferredAddress()
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class Transaction extends TransactionBase
|
|||||||
* Identifier to the purchase unit corresponding to this sale transaction
|
* Identifier to the purchase unit corresponding to this sale transaction
|
||||||
*
|
*
|
||||||
* @param string $purchase_unit_reference_id
|
* @param string $purchase_unit_reference_id
|
||||||
*
|
* @deprecated Use #setReferenceId instead
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setPurchaseUnitReferenceId($purchase_unit_reference_id)
|
public function setPurchaseUnitReferenceId($purchase_unit_reference_id)
|
||||||
@@ -52,6 +52,7 @@ class Transaction extends TransactionBase
|
|||||||
/**
|
/**
|
||||||
* Identifier to the purchase unit corresponding to this sale transaction
|
* Identifier to the purchase unit corresponding to this sale transaction
|
||||||
*
|
*
|
||||||
|
* @deprecated Use #getReferenceId instead
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getPurchaseUnitReferenceId()
|
public function getPurchaseUnitReferenceId()
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # CreatePaymentSample
|
// # CreatePaymentSample
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can process
|
// This sample code demonstrate how you can process
|
||||||
// a direct credit card payment. Please note that direct
|
// a direct credit card payment. Please note that direct
|
||||||
// credit card payment and related features using the
|
// credit card payment and related features using the
|
||||||
// REST API is restricted in some countries.
|
// REST API is restricted in some countries.
|
||||||
// API used: /v1/payments/payment
|
// API used: /v1/payments/payment
|
||||||
|
|
||||||
@@ -29,8 +29,8 @@ $card->setType("visa")
|
|||||||
->setExpireYear("2019")
|
->setExpireYear("2019")
|
||||||
->setCvv2("012")
|
->setCvv2("012")
|
||||||
->setFirstName("Joe")
|
->setFirstName("Joe")
|
||||||
->setLastName("Shopper")
|
->setBillingCountry("US")
|
||||||
->setBillingCountry("US");
|
->setLastName("Shopper");
|
||||||
|
|
||||||
// ### FundingInstrument
|
// ### FundingInstrument
|
||||||
// A resource representing a Payer's funding instrument.
|
// A resource representing a Payer's funding instrument.
|
||||||
@@ -89,7 +89,7 @@ $amount->setCurrency("USD")
|
|||||||
// ### Transaction
|
// ### Transaction
|
||||||
// A transaction defines the contract of a
|
// A transaction defines the contract of a
|
||||||
// payment - what is the payment for and who
|
// payment - what is the payment for and who
|
||||||
// is fulfilling it.
|
// is fulfilling it.
|
||||||
$transaction = new Transaction();
|
$transaction = new Transaction();
|
||||||
$transaction->setAmount($amount)
|
$transaction->setAmount($amount)
|
||||||
->setItemList($itemList)
|
->setItemList($itemList)
|
||||||
|
|||||||
@@ -13,17 +13,15 @@ class AddressTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Address
|
* Gets Json String of Object Address
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
{
|
{
|
||||||
return '{"line1":"TestSample","line2":"TestSample","city":"TestSample","country_code":"TestSample","postal_code":"TestSample","state":"TestSample","phone":"TestSample","normalization_status":"TestSample","status":"TestSample"}';
|
return '{"line1":"TestSample","line2":"TestSample","city":"TestSample","country_code":"TestSample","postal_code":"TestSample","state":"TestSample","phone":"TestSample","normalization_status":"TestSample","status":"TestSample","type":"TestSample"}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Address
|
* @return Address
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class AddressTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Address
|
* @return Address
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
@@ -50,6 +47,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertNotNull($obj->getPhone());
|
$this->assertNotNull($obj->getPhone());
|
||||||
$this->assertNotNull($obj->getNormalizationStatus());
|
$this->assertNotNull($obj->getNormalizationStatus());
|
||||||
$this->assertNotNull($obj->getStatus());
|
$this->assertNotNull($obj->getStatus());
|
||||||
|
$this->assertNotNull($obj->getType());
|
||||||
$this->assertEquals(self::getJson(), $obj->toJson());
|
$this->assertEquals(self::getJson(), $obj->toJson());
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
@@ -69,5 +67,6 @@ class AddressTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($obj->getPhone(), "TestSample");
|
$this->assertEquals($obj->getPhone(), "TestSample");
|
||||||
$this->assertEquals($obj->getNormalizationStatus(), "TestSample");
|
$this->assertEquals($obj->getNormalizationStatus(), "TestSample");
|
||||||
$this->assertEquals($obj->getStatus(), "TestSample");
|
$this->assertEquals($obj->getStatus(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getType(), "TestSample");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class AmountTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Amount
|
* Gets Json String of Object Amount
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class AmountTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Amount
|
* @return Amount
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class AmountTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Amount
|
* @return Amount
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -14,17 +14,15 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Authorization
|
* Gets Json String of Object Authorization
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
{
|
{
|
||||||
return '{"id":"TestSample","amount":' . AmountTest::getJson() . ',"payment_mode":"TestSample","state":"TestSample","reason_code":"TestSample","pending_reason":"TestSample","protection_eligibility":"TestSample","protection_eligibility_type":"TestSample","fmf_details":' . FmfDetailsTest::getJson() . ',"parent_payment":"TestSample","valid_until":"TestSample","create_time":"TestSample","update_time":"TestSample","links":' . LinksTest::getJson() . '}';
|
return '{"id":"TestSample","amount":' .AmountTest::getJson() . ',"payment_mode":"TestSample","state":"TestSample","reason_code":"TestSample","pending_reason":"TestSample","protection_eligibility":"TestSample","protection_eligibility_type":"TestSample","fmf_details":' .FmfDetailsTest::getJson() . ',"parent_payment":"TestSample","valid_until":"TestSample","create_time":"TestSample","update_time":"TestSample","reference_id":"TestSample","receipt_id":"TestSample","links":' .LinksTest::getJson() . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Authorization
|
* @return Authorization
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -35,7 +33,6 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Authorization
|
* @return Authorization
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
@@ -55,6 +52,8 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertNotNull($obj->getValidUntil());
|
$this->assertNotNull($obj->getValidUntil());
|
||||||
$this->assertNotNull($obj->getCreateTime());
|
$this->assertNotNull($obj->getCreateTime());
|
||||||
$this->assertNotNull($obj->getUpdateTime());
|
$this->assertNotNull($obj->getUpdateTime());
|
||||||
|
$this->assertNotNull($obj->getReferenceId());
|
||||||
|
$this->assertNotNull($obj->getReceiptId());
|
||||||
$this->assertNotNull($obj->getLinks());
|
$this->assertNotNull($obj->getLinks());
|
||||||
$this->assertEquals(self::getJson(), $obj->toJson());
|
$this->assertEquals(self::getJson(), $obj->toJson());
|
||||||
return $obj;
|
return $obj;
|
||||||
@@ -79,6 +78,8 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($obj->getValidUntil(), "TestSample");
|
$this->assertEquals($obj->getValidUntil(), "TestSample");
|
||||||
$this->assertEquals($obj->getCreateTime(), "TestSample");
|
$this->assertEquals($obj->getCreateTime(), "TestSample");
|
||||||
$this->assertEquals($obj->getUpdateTime(), "TestSample");
|
$this->assertEquals($obj->getUpdateTime(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getReferenceId(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getReceiptId(), "TestSample");
|
||||||
$this->assertEquals($obj->getLinks(), LinksTest::getObject());
|
$this->assertEquals($obj->getLinks(), LinksTest::getObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,13 +96,12 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
AuthorizationTest::getJson()
|
AuthorizationTest::getJson()
|
||||||
));
|
));
|
||||||
|
|
||||||
$result = $obj->get("authorizationId", $mockApiContext, $mockPPRestCall);
|
$result = $obj->get("authorizationId", $mockApiContext, $mockPPRestCall);
|
||||||
$this->assertNotNull($result);
|
$this->assertNotNull($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider mockProvider
|
* @dataProvider mockProvider
|
||||||
* @param Authorization $obj
|
* @param Authorization $obj
|
||||||
@@ -115,14 +115,13 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
CaptureTest::getJson()
|
CaptureTest::getJson()
|
||||||
));
|
));
|
||||||
$capture = CaptureTest::getObject();
|
$capture = CaptureTest::getObject();
|
||||||
|
|
||||||
$result = $obj->capture($capture, $mockApiContext, $mockPPRestCall);
|
$result = $obj->capture($capture, $mockApiContext, $mockPPRestCall);
|
||||||
$this->assertNotNull($result);
|
$this->assertNotNull($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider mockProvider
|
* @dataProvider mockProvider
|
||||||
* @param Authorization $obj
|
* @param Authorization $obj
|
||||||
@@ -136,13 +135,12 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
self::getJson()
|
self::getJson()
|
||||||
));
|
));
|
||||||
|
|
||||||
$result = $obj->void($mockApiContext, $mockPPRestCall);
|
$result = $obj->void($mockApiContext, $mockPPRestCall);
|
||||||
$this->assertNotNull($result);
|
$this->assertNotNull($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider mockProvider
|
* @dataProvider mockProvider
|
||||||
* @param Authorization $obj
|
* @param Authorization $obj
|
||||||
@@ -156,7 +154,7 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
self::getJson()
|
self::getJson()
|
||||||
));
|
));
|
||||||
|
|
||||||
$result = $obj->reauthorize($mockApiContext, $mockPPRestCall);
|
$result = $obj->reauthorize($mockApiContext, $mockPPRestCall);
|
||||||
@@ -167,8 +165,8 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$obj = self::getObject();
|
$obj = self::getObject();
|
||||||
$mockApiContext = $this->getMockBuilder('ApiContext')
|
$mockApiContext = $this->getMockBuilder('ApiContext')
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
return array(
|
return array(
|
||||||
array($obj, $mockApiContext),
|
array($obj, $mockApiContext),
|
||||||
array($obj, null)
|
array($obj, null)
|
||||||
|
|||||||
@@ -13,17 +13,15 @@ class BankAccountTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object BankAccount
|
* Gets Json String of Object BankAccount
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
{
|
{
|
||||||
return '{"id":"TestSample","account_number":"TestSample","account_number_type":"TestSample","routing_number":"TestSample","account_type":"TestSample","account_name":"TestSample","check_type":"TestSample","auth_type":"TestSample","auth_capture_timestamp":"TestSample","bank_name":"TestSample","country_code":"TestSample","first_name":"TestSample","last_name":"TestSample","birth_date":"TestSample","billing_address":' . AddressTest::getJson() . ',"state":"TestSample","confirmation_status":"TestSample","payer_id":"TestSample","external_customer_id":"TestSample","merchant_id":"TestSample","create_time":"TestSample","update_time":"TestSample","valid_until":"TestSample","links":' . LinksTest::getJson() . '}';
|
return '{"id":"TestSample","account_number":"TestSample","account_number_type":"TestSample","routing_number":"TestSample","account_type":"TestSample","account_name":"TestSample","check_type":"TestSample","auth_type":"TestSample","auth_capture_timestamp":"TestSample","bank_name":"TestSample","country_code":"TestSample","first_name":"TestSample","last_name":"TestSample","birth_date":"TestSample","billing_address":' .AddressTest::getJson() . ',"state":"TestSample","confirmation_status":"TestSample","payer_id":"TestSample","external_customer_id":"TestSample","merchant_id":"TestSample","create_time":"TestSample","update_time":"TestSample","valid_until":"TestSample","links":' .LinksTest::getJson() . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return BankAccount
|
* @return BankAccount
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class BankAccountTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return BankAccount
|
* @return BankAccount
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class BankTokenTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object BankToken
|
* Gets Json String of Object BankToken
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class BankTokenTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return BankToken
|
* @return BankToken
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class BankTokenTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return BankToken
|
* @return BankToken
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -14,17 +14,15 @@ class CaptureTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Capture
|
* Gets Json String of Object Capture
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
{
|
{
|
||||||
return '{"id":"TestSample","amount":' . AmountTest::getJson() . ',"is_final_capture":true,"state":"TestSample","parent_payment":"TestSample","transaction_fee":' . CurrencyTest::getJson() . ',"create_time":"TestSample","update_time":"TestSample","links":' . LinksTest::getJson() . '}';
|
return '{"id":"TestSample","amount":' .AmountTest::getJson() . ',"is_final_capture":true,"state":"TestSample","reason_code":"TestSample","parent_payment":"TestSample","invoice_number":"TestSample","transaction_fee":' .CurrencyTest::getJson() . ',"create_time":"TestSample","update_time":"TestSample","links":' .LinksTest::getJson() . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Capture
|
* @return Capture
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -35,7 +33,6 @@ class CaptureTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Capture
|
* @return Capture
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
@@ -46,7 +43,9 @@ class CaptureTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertNotNull($obj->getAmount());
|
$this->assertNotNull($obj->getAmount());
|
||||||
$this->assertNotNull($obj->getIsFinalCapture());
|
$this->assertNotNull($obj->getIsFinalCapture());
|
||||||
$this->assertNotNull($obj->getState());
|
$this->assertNotNull($obj->getState());
|
||||||
|
$this->assertNotNull($obj->getReasonCode());
|
||||||
$this->assertNotNull($obj->getParentPayment());
|
$this->assertNotNull($obj->getParentPayment());
|
||||||
|
$this->assertNotNull($obj->getInvoiceNumber());
|
||||||
$this->assertNotNull($obj->getTransactionFee());
|
$this->assertNotNull($obj->getTransactionFee());
|
||||||
$this->assertNotNull($obj->getCreateTime());
|
$this->assertNotNull($obj->getCreateTime());
|
||||||
$this->assertNotNull($obj->getUpdateTime());
|
$this->assertNotNull($obj->getUpdateTime());
|
||||||
@@ -65,7 +64,9 @@ class CaptureTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($obj->getAmount(), AmountTest::getObject());
|
$this->assertEquals($obj->getAmount(), AmountTest::getObject());
|
||||||
$this->assertEquals($obj->getIsFinalCapture(), true);
|
$this->assertEquals($obj->getIsFinalCapture(), true);
|
||||||
$this->assertEquals($obj->getState(), "TestSample");
|
$this->assertEquals($obj->getState(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getReasonCode(), "TestSample");
|
||||||
$this->assertEquals($obj->getParentPayment(), "TestSample");
|
$this->assertEquals($obj->getParentPayment(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getInvoiceNumber(), "TestSample");
|
||||||
$this->assertEquals($obj->getTransactionFee(), CurrencyTest::getObject());
|
$this->assertEquals($obj->getTransactionFee(), CurrencyTest::getObject());
|
||||||
$this->assertEquals($obj->getCreateTime(), "TestSample");
|
$this->assertEquals($obj->getCreateTime(), "TestSample");
|
||||||
$this->assertEquals($obj->getUpdateTime(), "TestSample");
|
$this->assertEquals($obj->getUpdateTime(), "TestSample");
|
||||||
@@ -85,13 +86,12 @@ class CaptureTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
CaptureTest::getJson()
|
CaptureTest::getJson()
|
||||||
));
|
));
|
||||||
|
|
||||||
$result = $obj->get("captureId", $mockApiContext, $mockPPRestCall);
|
$result = $obj->get("captureId", $mockApiContext, $mockPPRestCall);
|
||||||
$this->assertNotNull($result);
|
$this->assertNotNull($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider mockProvider
|
* @dataProvider mockProvider
|
||||||
* @param Capture $obj
|
* @param Capture $obj
|
||||||
@@ -117,8 +117,8 @@ class CaptureTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$obj = self::getObject();
|
$obj = self::getObject();
|
||||||
$mockApiContext = $this->getMockBuilder('ApiContext')
|
$mockApiContext = $this->getMockBuilder('ApiContext')
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
return array(
|
return array(
|
||||||
array($obj, $mockApiContext),
|
array($obj, $mockApiContext),
|
||||||
array($obj, null)
|
array($obj, null)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
|
use PayPal\Common\PayPalModel;
|
||||||
use PayPal\Api\CartBase;
|
use PayPal\Api\CartBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -13,17 +14,15 @@ class CartBaseTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object CartBase
|
* Gets Json String of Object CartBase
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
{
|
{
|
||||||
return '{"reference_id":"TestSample","amount":' . AmountTest::getJson() . ',"payee":' . PayeeTest::getJson() . ',"description":"TestSample","note_to_payee":"TestSample","custom":"TestSample","invoice_number":"TestSample","soft_descriptor":"TestSample","soft_descriptor_city":"TestSample","payment_options":' . PaymentOptionsTest::getJson() . ',"item_list":' . ItemListTest::getJson() . ',"notify_url":"http://www.google.com","order_url":"http://www.google.com","external_funding":' . ExternalFundingTest::getJson() . '}';
|
return '{"reference_id":"TestSample","amount":' .AmountTest::getJson() . ',"payee":' .PayeeTest::getJson() . ',"description":"TestSample","note_to_payee":"TestSample","custom":"TestSample","invoice_number":"TestSample","soft_descriptor":"TestSample","soft_descriptor_city":"TestSample","payment_options":' .PaymentOptionsTest::getJson() . ',"item_list":' .ItemListTest::getJson() . ',"notify_url":"http://www.google.com","order_url":"http://www.google.com","external_funding":' .ExternalFundingTest::getJson() . ',"type":"TestSample"}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return CartBase
|
* @return CartBase
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +33,6 @@ class CartBaseTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return CartBase
|
* @return CartBase
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ class CreditCardTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return CreditCard
|
* @return CreditCard
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
|
|||||||
68
tests/PayPal/Test/Api/DetailedRefundTest.php
Normal file
68
tests/PayPal/Test/Api/DetailedRefundTest.php
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
|
use PayPal\Api\DetailedRefund;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class DetailedRefund
|
||||||
|
*
|
||||||
|
* @package PayPal\Test\Api
|
||||||
|
*/
|
||||||
|
class DetailedRefundTest extends \PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Gets Json String of Object DetailedRefund
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getJson()
|
||||||
|
{
|
||||||
|
return '{"custom":"TestSample","invoice_number":"TestSample","refund_to_payer":' .CurrencyTest::getJson() . ',"refund_to_external_funding":' .ExternalFundingTest::getJson() . ',"refund_from_transaction_fee":' .CurrencyTest::getJson() . ',"refund_from_received_amount":' .CurrencyTest::getJson() . ',"total_refunded_amount":' .CurrencyTest::getJson() . '}';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets Object Instance with Json data filled in
|
||||||
|
* @return DetailedRefund
|
||||||
|
*/
|
||||||
|
public static function getObject()
|
||||||
|
{
|
||||||
|
return new DetailedRefund(self::getJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests for Serialization and Deserialization Issues
|
||||||
|
* @return DetailedRefund
|
||||||
|
*/
|
||||||
|
public function testSerializationDeserialization()
|
||||||
|
{
|
||||||
|
$obj = new DetailedRefund(self::getJson());
|
||||||
|
$this->assertNotNull($obj);
|
||||||
|
$this->assertNotNull($obj->getCustom());
|
||||||
|
$this->assertNotNull($obj->getInvoiceNumber());
|
||||||
|
$this->assertNotNull($obj->getRefundToPayer());
|
||||||
|
$this->assertNotNull($obj->getRefundToExternalFunding());
|
||||||
|
$this->assertNotNull($obj->getRefundFromTransactionFee());
|
||||||
|
$this->assertNotNull($obj->getRefundFromReceivedAmount());
|
||||||
|
$this->assertNotNull($obj->getTotalRefundedAmount());
|
||||||
|
$this->assertEquals(self::getJson(), $obj->toJson());
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @depends testSerializationDeserialization
|
||||||
|
* @param DetailedRefund $obj
|
||||||
|
*/
|
||||||
|
public function testGetters($obj)
|
||||||
|
{
|
||||||
|
$this->assertEquals($obj->getCustom(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getInvoiceNumber(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getRefundToPayer(), CurrencyTest::getObject());
|
||||||
|
$this->assertEquals($obj->getRefundToExternalFunding(), ExternalFundingTest::getObject());
|
||||||
|
$this->assertEquals($obj->getRefundFromTransactionFee(), CurrencyTest::getObject());
|
||||||
|
$this->assertEquals($obj->getRefundFromReceivedAmount(), CurrencyTest::getObject());
|
||||||
|
$this->assertEquals($obj->getTotalRefundedAmount(), CurrencyTest::getObject());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -23,7 +23,6 @@ class ErrorTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Error
|
* @return Error
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +33,6 @@ class ErrorTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Error
|
* @return Error
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class ExtendedBankAccountTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object ExtendedBankAccount
|
* Gets Json String of Object ExtendedBankAccount
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class ExtendedBankAccountTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return ExtendedBankAccount
|
* @return ExtendedBankAccount
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class ExtendedBankAccountTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return ExtendedBankAccount
|
* @return ExtendedBankAccount
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class FmfDetailsTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object FmfDetails
|
* Gets Json String of Object FmfDetails
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class FmfDetailsTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return FmfDetails
|
* @return FmfDetails
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class FmfDetailsTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return FmfDetails
|
* @return FmfDetails
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class FundingDetailTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object FundingDetail
|
* Gets Json String of Object FundingDetail
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class FundingDetailTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return FundingDetail
|
* @return FundingDetail
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class FundingDetailTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return FundingDetail
|
* @return FundingDetail
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class FundingInstrumentTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object FundingInstrument
|
* Gets Json String of Object FundingInstrument
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class FundingInstrumentTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return FundingInstrument
|
* @return FundingInstrument
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class FundingInstrumentTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return FundingInstrument
|
* @return FundingInstrument
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
@@ -53,7 +50,6 @@ class FundingInstrumentTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertNotNull($obj->getCarrierAccount());
|
$this->assertNotNull($obj->getCarrierAccount());
|
||||||
$this->assertNotNull($obj->getPrivateLabelCard());
|
$this->assertNotNull($obj->getPrivateLabelCard());
|
||||||
$this->assertNotNull($obj->getBilling());
|
$this->assertNotNull($obj->getBilling());
|
||||||
$this->assertNotNull($obj->getAlternatePayment());
|
|
||||||
$this->assertEquals(self::getJson(), $obj->toJson());
|
$this->assertEquals(self::getJson(), $obj->toJson());
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
@@ -76,6 +72,5 @@ class FundingInstrumentTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($obj->getCarrierAccount(), CarrierAccountTest::getObject());
|
$this->assertEquals($obj->getCarrierAccount(), CarrierAccountTest::getObject());
|
||||||
$this->assertEquals($obj->getPrivateLabelCard(), PrivateLabelCardTest::getObject());
|
$this->assertEquals($obj->getPrivateLabelCard(), PrivateLabelCardTest::getObject());
|
||||||
$this->assertEquals($obj->getBilling(), BillingTest::getObject());
|
$this->assertEquals($obj->getBilling(), BillingTest::getObject());
|
||||||
$this->assertEquals($obj->getAlternatePayment(), AlternatePaymentTest::getObject());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class FundingOptionTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object FundingOption
|
* Gets Json String of Object FundingOption
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class FundingOptionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return FundingOption
|
* @return FundingOption
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class FundingOptionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return FundingOption
|
* @return FundingOption
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,17 +13,15 @@ class FundingSourceTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object FundingSource
|
* Gets Json String of Object FundingSource
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
{
|
{
|
||||||
return '{"funding_mode":"TestSample","funding_instrument_type":"TestSample","soft_descriptor":"TestSample","amount":' . CurrencyTest::getJson() . ',"legal_text":"TestSample","funding_detail":' . FundingDetailTest::getJson() . ',"additional_text":"TestSample","extends":' . FundingInstrumentTest::getJson() . ',"links":' . LinksTest::getJson() . '}';
|
return '{"funding_mode":"TestSample","funding_instrument_type":"TestSample","soft_descriptor":"TestSample","amount":' .CurrencyTest::getJson() . ',"negative_balance_amount":' .CurrencyTest::getJson() . ',"legal_text":"TestSample","terms":"TestSample","funding_detail":' .FundingDetailTest::getJson() . ',"additional_text":"TestSample","links":' .LinksTest::getJson() . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return FundingSource
|
* @return FundingSource
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class FundingSourceTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return FundingSource
|
* @return FundingSource
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
@@ -45,10 +42,10 @@ class FundingSourceTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertNotNull($obj->getFundingInstrumentType());
|
$this->assertNotNull($obj->getFundingInstrumentType());
|
||||||
$this->assertNotNull($obj->getSoftDescriptor());
|
$this->assertNotNull($obj->getSoftDescriptor());
|
||||||
$this->assertNotNull($obj->getAmount());
|
$this->assertNotNull($obj->getAmount());
|
||||||
|
$this->assertNotNull($obj->getNegativeBalanceAmount());
|
||||||
$this->assertNotNull($obj->getLegalText());
|
$this->assertNotNull($obj->getLegalText());
|
||||||
$this->assertNotNull($obj->getFundingDetail());
|
$this->assertNotNull($obj->getFundingDetail());
|
||||||
$this->assertNotNull($obj->getAdditionalText());
|
$this->assertNotNull($obj->getAdditionalText());
|
||||||
$this->assertNotNull($obj->getExtends());
|
|
||||||
$this->assertNotNull($obj->getLinks());
|
$this->assertNotNull($obj->getLinks());
|
||||||
$this->assertEquals(self::getJson(), $obj->toJson());
|
$this->assertEquals(self::getJson(), $obj->toJson());
|
||||||
return $obj;
|
return $obj;
|
||||||
@@ -64,10 +61,10 @@ class FundingSourceTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($obj->getFundingInstrumentType(), "TestSample");
|
$this->assertEquals($obj->getFundingInstrumentType(), "TestSample");
|
||||||
$this->assertEquals($obj->getSoftDescriptor(), "TestSample");
|
$this->assertEquals($obj->getSoftDescriptor(), "TestSample");
|
||||||
$this->assertEquals($obj->getAmount(), CurrencyTest::getObject());
|
$this->assertEquals($obj->getAmount(), CurrencyTest::getObject());
|
||||||
|
$this->assertEquals($obj->getNegativeBalanceAmount(), CurrencyTest::getObject());
|
||||||
$this->assertEquals($obj->getLegalText(), "TestSample");
|
$this->assertEquals($obj->getLegalText(), "TestSample");
|
||||||
$this->assertEquals($obj->getFundingDetail(), FundingDetailTest::getObject());
|
$this->assertEquals($obj->getFundingDetail(), FundingDetailTest::getObject());
|
||||||
$this->assertEquals($obj->getAdditionalText(), "TestSample");
|
$this->assertEquals($obj->getAdditionalText(), "TestSample");
|
||||||
$this->assertEquals($obj->getExtends(), FundingInstrumentTest::getObject());
|
|
||||||
$this->assertEquals($obj->getLinks(), LinksTest::getObject());
|
$this->assertEquals($obj->getLinks(), LinksTest::getObject());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class IncentiveTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Incentive
|
* Gets Json String of Object Incentive
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class IncentiveTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Incentive
|
* @return Incentive
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class IncentiveTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Incentive
|
* @return Incentive
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class InstallmentInfoTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object InstallmentInfo
|
* Gets Json String of Object InstallmentInfo
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class InstallmentInfoTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return InstallmentInfo
|
* @return InstallmentInfo
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class InstallmentInfoTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return InstallmentInfo
|
* @return InstallmentInfo
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class InstallmentOptionTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object InstallmentOption
|
* Gets Json String of Object InstallmentOption
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class InstallmentOptionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return InstallmentOption
|
* @return InstallmentOption
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class InstallmentOptionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return InstallmentOption
|
* @return InstallmentOption
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class ItemListTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object ItemList
|
* Gets Json String of Object ItemList
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class ItemListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return ItemList
|
* @return ItemList
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class ItemListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return ItemList
|
* @return ItemList
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class ItemTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Item
|
* Gets Json String of Object Item
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class ItemTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Item
|
* @return Item
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class ItemTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Item
|
* @return Item
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class MeasurementTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Measurement
|
* Gets Json String of Object Measurement
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class MeasurementTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Measurement
|
* @return Measurement
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class MeasurementTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Measurement
|
* @return Measurement
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class NameValuePairTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object NameValuePair
|
* Gets Json String of Object NameValuePair
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class NameValuePairTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return NameValuePair
|
* @return NameValuePair
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class NameValuePairTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return NameValuePair
|
* @return NameValuePair
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -14,17 +14,15 @@ class OrderTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Order
|
* Gets Json String of Object Order
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
{
|
{
|
||||||
return '{"id":"TestSample","purchase_unit_reference_id":"TestSample","amount":' . AmountTest::getJson() . ',"payment_mode":"TestSample","state":"TestSample","reason_code":"TestSample","pending_reason":"TestSample","protection_eligibility":"TestSample","protection_eligibility_type":"TestSample","parent_payment":"TestSample","fmf_details":' . FmfDetailsTest::getJson() . ',"create_time":"TestSample","update_time":"TestSample","links":' . LinksTest::getJson() . '}';
|
return '{"id":"TestSample","reference_id":"TestSample","amount":' .AmountTest::getJson() . ',"payment_mode":"TestSample","state":"TestSample","reason_code":"TestSample","pending_reason":"TestSample","protection_eligibility":"TestSample","protection_eligibility_type":"TestSample","parent_payment":"TestSample","fmf_details":' .FmfDetailsTest::getJson() . ',"create_time":"TestSample","update_time":"TestSample","links":' .LinksTest::getJson() . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -35,7 +33,6 @@ class OrderTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
@@ -43,7 +40,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase
|
|||||||
$obj = new Order(self::getJson());
|
$obj = new Order(self::getJson());
|
||||||
$this->assertNotNull($obj);
|
$this->assertNotNull($obj);
|
||||||
$this->assertNotNull($obj->getId());
|
$this->assertNotNull($obj->getId());
|
||||||
$this->assertNotNull($obj->getPurchaseUnitReferenceId());
|
$this->assertNotNull($obj->getReferenceId());
|
||||||
$this->assertNotNull($obj->getAmount());
|
$this->assertNotNull($obj->getAmount());
|
||||||
$this->assertNotNull($obj->getPaymentMode());
|
$this->assertNotNull($obj->getPaymentMode());
|
||||||
$this->assertNotNull($obj->getState());
|
$this->assertNotNull($obj->getState());
|
||||||
@@ -67,7 +64,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testGetters($obj)
|
public function testGetters($obj)
|
||||||
{
|
{
|
||||||
$this->assertEquals($obj->getId(), "TestSample");
|
$this->assertEquals($obj->getId(), "TestSample");
|
||||||
$this->assertEquals($obj->getPurchaseUnitReferenceId(), "TestSample");
|
$this->assertEquals($obj->getReferenceId(), "TestSample");
|
||||||
$this->assertEquals($obj->getAmount(), AmountTest::getObject());
|
$this->assertEquals($obj->getAmount(), AmountTest::getObject());
|
||||||
$this->assertEquals($obj->getPaymentMode(), "TestSample");
|
$this->assertEquals($obj->getPaymentMode(), "TestSample");
|
||||||
$this->assertEquals($obj->getState(), "TestSample");
|
$this->assertEquals($obj->getState(), "TestSample");
|
||||||
@@ -95,13 +92,12 @@ class OrderTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
OrderTest::getJson()
|
OrderTest::getJson()
|
||||||
));
|
));
|
||||||
|
|
||||||
$result = $obj->get("orderId", $mockApiContext, $mockPPRestCall);
|
$result = $obj->get("orderId", $mockApiContext, $mockPPRestCall);
|
||||||
$this->assertNotNull($result);
|
$this->assertNotNull($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider mockProvider
|
* @dataProvider mockProvider
|
||||||
* @param Order $obj
|
* @param Order $obj
|
||||||
@@ -115,14 +111,13 @@ class OrderTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
CaptureTest::getJson()
|
CaptureTest::getJson()
|
||||||
));
|
));
|
||||||
$capture = CaptureTest::getObject();
|
$capture = CaptureTest::getObject();
|
||||||
|
|
||||||
$result = $obj->capture($capture, $mockApiContext, $mockPPRestCall);
|
$result = $obj->capture($capture, $mockApiContext, $mockPPRestCall);
|
||||||
$this->assertNotNull($result);
|
$this->assertNotNull($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider mockProvider
|
* @dataProvider mockProvider
|
||||||
* @param Order $obj
|
* @param Order $obj
|
||||||
@@ -136,13 +131,12 @@ class OrderTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
self::getJson()
|
self::getJson()
|
||||||
));
|
));
|
||||||
|
|
||||||
$result = $obj->void($mockApiContext, $mockPPRestCall);
|
$result = $obj->void($mockApiContext, $mockPPRestCall);
|
||||||
$this->assertNotNull($result);
|
$this->assertNotNull($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider mockProvider
|
* @dataProvider mockProvider
|
||||||
* @param Order $obj
|
* @param Order $obj
|
||||||
@@ -156,7 +150,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
AuthorizationTest::getJson()
|
AuthorizationTest::getJson()
|
||||||
));
|
));
|
||||||
|
|
||||||
$authorization = new Authorization();
|
$authorization = new Authorization();
|
||||||
@@ -168,8 +162,8 @@ class OrderTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$obj = self::getObject();
|
$obj = self::getObject();
|
||||||
$mockApiContext = $this->getMockBuilder('ApiContext')
|
$mockApiContext = $this->getMockBuilder('ApiContext')
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
return array(
|
return array(
|
||||||
array($obj, $mockApiContext),
|
array($obj, $mockApiContext),
|
||||||
array($obj, null)
|
array($obj, null)
|
||||||
|
|||||||
@@ -13,17 +13,15 @@ class PayeeTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Payee
|
* Gets Json String of Object Payee
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
{
|
{
|
||||||
return '{"email":"TestSample","merchant_id":"TestSample","first_name":"TestSample","last_name":"TestSample","account_number":"TestSample","phone":' . PhoneTest::getJson() . '}';
|
return '{"email":"TestSample","merchant_id":"TestSample","first_name":"TestSample","last_name":"TestSample","account_number":"TestSample","phone":' .PhoneTest::getJson() . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Payee
|
* @return Payee
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class PayeeTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Payee
|
* @return Payee
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,17 +13,15 @@ class PayerInfoTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object PayerInfo
|
* Gets Json String of Object PayerInfo
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
{
|
{
|
||||||
return '{"email":"TestSample","external_remember_me_id":"TestSample","account_number":"TestSample","salutation":"TestSample","first_name":"TestSample","middle_name":"TestSample","last_name":"TestSample","suffix":"TestSample","payer_id":"TestSample","phone":"TestSample","phone_type":"TestSample","birth_date":"TestSample","tax_id":"TestSample","tax_id_type":"TestSample","country_code":"TestSample","billing_address":' . AddressTest::getJson() . ',"shipping_address":' . ShippingAddressTest::getJson() . '}';
|
return '{"email":"TestSample","external_remember_me_id":"TestSample","buyer_account_number":"TestSample","salutation":"TestSample","first_name":"TestSample","middle_name":"TestSample","last_name":"TestSample","suffix":"TestSample","payer_id":"TestSample","phone":"TestSample","phone_type":"TestSample","birth_date":"TestSample","tax_id":"TestSample","tax_id_type":"TestSample","country_code":"TestSample","billing_address":' .AddressTest::getJson() . ',"shipping_address":' .ShippingAddressTest::getJson() . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return PayerInfo
|
* @return PayerInfo
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class PayerInfoTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return PayerInfo
|
* @return PayerInfo
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
@@ -43,7 +40,7 @@ class PayerInfoTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertNotNull($obj);
|
$this->assertNotNull($obj);
|
||||||
$this->assertNotNull($obj->getEmail());
|
$this->assertNotNull($obj->getEmail());
|
||||||
$this->assertNotNull($obj->getExternalRememberMeId());
|
$this->assertNotNull($obj->getExternalRememberMeId());
|
||||||
$this->assertNotNull($obj->getAccountNumber());
|
$this->assertNotNull($obj->getBuyerAccountNumber());
|
||||||
$this->assertNotNull($obj->getSalutation());
|
$this->assertNotNull($obj->getSalutation());
|
||||||
$this->assertNotNull($obj->getFirstName());
|
$this->assertNotNull($obj->getFirstName());
|
||||||
$this->assertNotNull($obj->getMiddleName());
|
$this->assertNotNull($obj->getMiddleName());
|
||||||
@@ -70,7 +67,7 @@ class PayerInfoTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$this->assertEquals($obj->getEmail(), "TestSample");
|
$this->assertEquals($obj->getEmail(), "TestSample");
|
||||||
$this->assertEquals($obj->getExternalRememberMeId(), "TestSample");
|
$this->assertEquals($obj->getExternalRememberMeId(), "TestSample");
|
||||||
$this->assertEquals($obj->getAccountNumber(), "TestSample");
|
$this->assertEquals($obj->getBuyerAccountNumber(), "TestSample");
|
||||||
$this->assertEquals($obj->getSalutation(), "TestSample");
|
$this->assertEquals($obj->getSalutation(), "TestSample");
|
||||||
$this->assertEquals($obj->getFirstName(), "TestSample");
|
$this->assertEquals($obj->getFirstName(), "TestSample");
|
||||||
$this->assertEquals($obj->getMiddleName(), "TestSample");
|
$this->assertEquals($obj->getMiddleName(), "TestSample");
|
||||||
|
|||||||
@@ -13,17 +13,15 @@ class PayerTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Payer
|
* Gets Json String of Object Payer
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
{
|
{
|
||||||
return '{"payment_method":"TestSample","status":"TestSample","account_type":"TestSample","account_age":"TestSample","funding_instruments":' . FundingInstrumentTest::getJson() . ',"funding_option_id":"TestSample","funding_option":' . FundingOptionTest::getJson() . ',"related_funding_option":' . FundingOptionTest::getJson() . ',"payer_info":' . PayerInfoTest::getJson() . '}';
|
return '{"payment_method":"TestSample","status":"TestSample","account_type":"TestSample","account_age":"TestSample","funding_instruments":' .FundingInstrumentTest::getJson() . ',"funding_option_id":"TestSample","funding_option":' .FundingOptionTest::getJson() . ',"external_selected_funding_instrument_type":"TestSample","related_funding_option":' .FundingOptionTest::getJson() . ',"payer_info":' .PayerInfoTest::getJson() . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Payer
|
* @return Payer
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class PayerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Payer
|
* @return Payer
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
@@ -48,6 +45,7 @@ class PayerTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertNotNull($obj->getFundingInstruments());
|
$this->assertNotNull($obj->getFundingInstruments());
|
||||||
$this->assertNotNull($obj->getFundingOptionId());
|
$this->assertNotNull($obj->getFundingOptionId());
|
||||||
$this->assertNotNull($obj->getFundingOption());
|
$this->assertNotNull($obj->getFundingOption());
|
||||||
|
$this->assertNotNull($obj->getExternalSelectedFundingInstrumentType());
|
||||||
$this->assertNotNull($obj->getRelatedFundingOption());
|
$this->assertNotNull($obj->getRelatedFundingOption());
|
||||||
$this->assertNotNull($obj->getPayerInfo());
|
$this->assertNotNull($obj->getPayerInfo());
|
||||||
$this->assertEquals(self::getJson(), $obj->toJson());
|
$this->assertEquals(self::getJson(), $obj->toJson());
|
||||||
@@ -67,6 +65,7 @@ class PayerTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($obj->getFundingInstruments(), FundingInstrumentTest::getObject());
|
$this->assertEquals($obj->getFundingInstruments(), FundingInstrumentTest::getObject());
|
||||||
$this->assertEquals($obj->getFundingOptionId(), "TestSample");
|
$this->assertEquals($obj->getFundingOptionId(), "TestSample");
|
||||||
$this->assertEquals($obj->getFundingOption(), FundingOptionTest::getObject());
|
$this->assertEquals($obj->getFundingOption(), FundingOptionTest::getObject());
|
||||||
|
$this->assertEquals($obj->getExternalSelectedFundingInstrumentType(), "TestSample");
|
||||||
$this->assertEquals($obj->getRelatedFundingOption(), FundingOptionTest::getObject());
|
$this->assertEquals($obj->getRelatedFundingOption(), FundingOptionTest::getObject());
|
||||||
$this->assertEquals($obj->getPayerInfo(), PayerInfoTest::getObject());
|
$this->assertEquals($obj->getPayerInfo(), PayerInfoTest::getObject());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,17 +13,15 @@ class PaymentCardTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object PaymentCard
|
* Gets Json String of Object PaymentCard
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
{
|
{
|
||||||
return '{"id":"TestSample","number":"TestSample","type":"TestSample","expire_month":123,"expire_year":123,"start_month":"TestSample","start_year":"TestSample","cvv2":"TestSample","first_name":"TestSample","last_name":"TestSample","billing_country":"TestSample","billing_address":' . AddressTest::getJson() . ',"external_customer_id":"TestSample","status":"TestSample","valid_until":"TestSample","issue_number":"TestSample","links":' . LinksTest::getJson() . '}';
|
return '{"id":"TestSample","number":"TestSample","type":"TestSample","expire_month":"123","expire_year":"123","start_month":"TestSample","start_year":"TestSample","cvv2":"TestSample","first_name":"TestSample","last_name":"TestSample","billing_country":"TestSample","billing_address":' .AddressTest::getJson() . ',"external_customer_id":"TestSample","status":"TestSample","card_product_class":"TestSample","valid_until":"TestSample","issue_number":"TestSample","links":' .LinksTest::getJson() . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return PaymentCard
|
* @return PaymentCard
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class PaymentCardTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return PaymentCard
|
* @return PaymentCard
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
@@ -55,6 +52,7 @@ class PaymentCardTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertNotNull($obj->getBillingAddress());
|
$this->assertNotNull($obj->getBillingAddress());
|
||||||
$this->assertNotNull($obj->getExternalCustomerId());
|
$this->assertNotNull($obj->getExternalCustomerId());
|
||||||
$this->assertNotNull($obj->getStatus());
|
$this->assertNotNull($obj->getStatus());
|
||||||
|
$this->assertNotNull($obj->getCardProductClass());
|
||||||
$this->assertNotNull($obj->getValidUntil());
|
$this->assertNotNull($obj->getValidUntil());
|
||||||
$this->assertNotNull($obj->getIssueNumber());
|
$this->assertNotNull($obj->getIssueNumber());
|
||||||
$this->assertNotNull($obj->getLinks());
|
$this->assertNotNull($obj->getLinks());
|
||||||
@@ -71,8 +69,8 @@ class PaymentCardTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($obj->getId(), "TestSample");
|
$this->assertEquals($obj->getId(), "TestSample");
|
||||||
$this->assertEquals($obj->getNumber(), "TestSample");
|
$this->assertEquals($obj->getNumber(), "TestSample");
|
||||||
$this->assertEquals($obj->getType(), "TestSample");
|
$this->assertEquals($obj->getType(), "TestSample");
|
||||||
$this->assertEquals($obj->getExpireMonth(), 123);
|
$this->assertEquals($obj->getExpireMonth(), "TestSample");
|
||||||
$this->assertEquals($obj->getExpireYear(), 123);
|
$this->assertEquals($obj->getExpireYear(), "TestSample");
|
||||||
$this->assertEquals($obj->getStartMonth(), "TestSample");
|
$this->assertEquals($obj->getStartMonth(), "TestSample");
|
||||||
$this->assertEquals($obj->getStartYear(), "TestSample");
|
$this->assertEquals($obj->getStartYear(), "TestSample");
|
||||||
$this->assertEquals($obj->getCvv2(), "TestSample");
|
$this->assertEquals($obj->getCvv2(), "TestSample");
|
||||||
@@ -82,6 +80,7 @@ class PaymentCardTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($obj->getBillingAddress(), AddressTest::getObject());
|
$this->assertEquals($obj->getBillingAddress(), AddressTest::getObject());
|
||||||
$this->assertEquals($obj->getExternalCustomerId(), "TestSample");
|
$this->assertEquals($obj->getExternalCustomerId(), "TestSample");
|
||||||
$this->assertEquals($obj->getStatus(), "TestSample");
|
$this->assertEquals($obj->getStatus(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getCardProductClass(), "TestSample");
|
||||||
$this->assertEquals($obj->getValidUntil(), "TestSample");
|
$this->assertEquals($obj->getValidUntil(), "TestSample");
|
||||||
$this->assertEquals($obj->getIssueNumber(), "TestSample");
|
$this->assertEquals($obj->getIssueNumber(), "TestSample");
|
||||||
$this->assertEquals($obj->getLinks(), LinksTest::getObject());
|
$this->assertEquals($obj->getLinks(), LinksTest::getObject());
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class PaymentExecutionTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object PaymentExecution
|
* Gets Json String of Object PaymentExecution
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class PaymentExecutionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return PaymentExecution
|
* @return PaymentExecution
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class PaymentExecutionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return PaymentExecution
|
* @return PaymentExecution
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class PaymentHistoryTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object PaymentHistory
|
* Gets Json String of Object PaymentHistory
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class PaymentHistoryTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return PaymentHistory
|
* @return PaymentHistory
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class PaymentHistoryTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return PaymentHistory
|
* @return PaymentHistory
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class PaymentOptionsTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object PaymentOptions
|
* Gets Json String of Object PaymentOptions
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class PaymentOptionsTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return PaymentOptions
|
* @return PaymentOptions
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class PaymentOptionsTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return PaymentOptions
|
* @return PaymentOptions
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace PayPal\Test\Api;
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
use PayPal\Api\object;
|
|
||||||
use PayPal\Api\Payment;
|
use PayPal\Api\Payment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,7 +13,6 @@ class PaymentTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Payment
|
* Gets Json String of Object Payment
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -24,7 +22,6 @@ class PaymentTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Payment
|
* @return Payment
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -35,7 +32,6 @@ class PaymentTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Payment
|
* @return Payment
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
@@ -105,13 +101,12 @@ class PaymentTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
self::getJson()
|
self::getJson()
|
||||||
));
|
));
|
||||||
|
|
||||||
$result = $obj->create($mockApiContext, $mockPPRestCall);
|
$result = $obj->create($mockApiContext, $mockPPRestCall);
|
||||||
$this->assertNotNull($result);
|
$this->assertNotNull($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider mockProvider
|
* @dataProvider mockProvider
|
||||||
* @param Payment $obj
|
* @param Payment $obj
|
||||||
@@ -125,13 +120,12 @@ class PaymentTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
PaymentTest::getJson()
|
PaymentTest::getJson()
|
||||||
));
|
));
|
||||||
|
|
||||||
$result = $obj->get("paymentId", $mockApiContext, $mockPPRestCall);
|
$result = $obj->get("paymentId", $mockApiContext, $mockPPRestCall);
|
||||||
$this->assertNotNull($result);
|
$this->assertNotNull($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider mockProvider
|
* @dataProvider mockProvider
|
||||||
* @param Payment $obj
|
* @param Payment $obj
|
||||||
@@ -152,7 +146,6 @@ class PaymentTest extends \PHPUnit_Framework_TestCase
|
|||||||
$result = $obj->update($patchRequest, $mockApiContext, $mockPPRestCall);
|
$result = $obj->update($patchRequest, $mockApiContext, $mockPPRestCall);
|
||||||
$this->assertNotNull($result);
|
$this->assertNotNull($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider mockProvider
|
* @dataProvider mockProvider
|
||||||
* @param Payment $obj
|
* @param Payment $obj
|
||||||
@@ -166,14 +159,13 @@ class PaymentTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
self::getJson()
|
self::getJson()
|
||||||
));
|
));
|
||||||
$paymentExecution = PaymentExecutionTest::getObject();
|
$paymentExecution = PaymentExecutionTest::getObject();
|
||||||
|
|
||||||
$result = $obj->execute($paymentExecution, $mockApiContext, $mockPPRestCall);
|
$result = $obj->execute($paymentExecution, $mockApiContext, $mockPPRestCall);
|
||||||
$this->assertNotNull($result);
|
$this->assertNotNull($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider mockProvider
|
* @dataProvider mockProvider
|
||||||
* @param Payment $obj
|
* @param Payment $obj
|
||||||
@@ -187,7 +179,7 @@ class PaymentTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
PaymentHistoryTest::getJson()
|
PaymentHistoryTest::getJson()
|
||||||
));
|
));
|
||||||
$params = array();
|
$params = array();
|
||||||
|
|
||||||
@@ -199,8 +191,8 @@ class PaymentTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$obj = self::getObject();
|
$obj = self::getObject();
|
||||||
$mockApiContext = $this->getMockBuilder('ApiContext')
|
$mockApiContext = $this->getMockBuilder('ApiContext')
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
return array(
|
return array(
|
||||||
array($obj, $mockApiContext),
|
array($obj, $mockApiContext),
|
||||||
array($obj, null)
|
array($obj, null)
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class PhoneTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Phone
|
* Gets Json String of Object Phone
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class PhoneTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Phone
|
* @return Phone
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class PhoneTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Phone
|
* @return Phone
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class RecipientBankingInstructionTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object RecipientBankingInstruction
|
* Gets Json String of Object RecipientBankingInstruction
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class RecipientBankingInstructionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return RecipientBankingInstruction
|
* @return RecipientBankingInstruction
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class RecipientBankingInstructionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return RecipientBankingInstruction
|
* @return RecipientBankingInstruction
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class RedirectUrlsTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object RedirectUrls
|
* Gets Json String of Object RedirectUrls
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class RedirectUrlsTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return RedirectUrls
|
* @return RedirectUrls
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class RedirectUrlsTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return RedirectUrls
|
* @return RedirectUrls
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
@@ -66,7 +63,6 @@ class RedirectUrlsTest extends \PHPUnit_Framework_TestCase
|
|||||||
$obj = new RedirectUrls();
|
$obj = new RedirectUrls();
|
||||||
$obj->setReturnUrl(null);
|
$obj->setReturnUrl(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \InvalidArgumentException
|
* @expectedException \InvalidArgumentException
|
||||||
* @expectedExceptionMessage CancelUrl is not a fully qualified URL
|
* @expectedExceptionMessage CancelUrl is not a fully qualified URL
|
||||||
|
|||||||
66
tests/PayPal/Test/Api/RefundRequestTest.php
Normal file
66
tests/PayPal/Test/Api/RefundRequestTest.php
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PayPal\Test\Api;
|
||||||
|
|
||||||
|
use PayPal\Api\RefundRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class RefundRequest
|
||||||
|
*
|
||||||
|
* @package PayPal\Test\Api
|
||||||
|
*/
|
||||||
|
class RefundRequestTest extends \PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Gets Json String of Object RefundRequest
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getJson()
|
||||||
|
{
|
||||||
|
return '{"amount":' .AmountTest::getJson() . ',"description":"TestSample","refund_type":"TestSample","refund_source":"TestSample","reason":"TestSample","invoice_number":"TestSample","refund_advice":true,"is_non_platform_transaction":"TestSample"}';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets Object Instance with Json data filled in
|
||||||
|
* @return RefundRequest
|
||||||
|
*/
|
||||||
|
public static function getObject()
|
||||||
|
{
|
||||||
|
return new RefundRequest(self::getJson());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests for Serialization and Deserialization Issues
|
||||||
|
* @return RefundRequest
|
||||||
|
*/
|
||||||
|
public function testSerializationDeserialization()
|
||||||
|
{
|
||||||
|
$obj = new RefundRequest(self::getJson());
|
||||||
|
$this->assertNotNull($obj);
|
||||||
|
$this->assertNotNull($obj->getAmount());
|
||||||
|
$this->assertNotNull($obj->getDescription());
|
||||||
|
$this->assertNotNull($obj->getRefundSource());
|
||||||
|
$this->assertNotNull($obj->getReason());
|
||||||
|
$this->assertNotNull($obj->getInvoiceNumber());
|
||||||
|
$this->assertNotNull($obj->getRefundAdvice());
|
||||||
|
$this->assertEquals(self::getJson(), $obj->toJson());
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @depends testSerializationDeserialization
|
||||||
|
* @param RefundRequest $obj
|
||||||
|
*/
|
||||||
|
public function testGetters($obj)
|
||||||
|
{
|
||||||
|
$this->assertEquals($obj->getAmount(), AmountTest::getObject());
|
||||||
|
$this->assertEquals($obj->getDescription(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getRefundSource(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getReason(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getInvoiceNumber(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getRefundAdvice(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -13,17 +13,15 @@ class RefundTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Refund
|
* Gets Json String of Object Refund
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
{
|
{
|
||||||
return '{"id":"TestSample","amount":' . AmountTest::getJson() . ',"state":"TestSample","reason":"TestSample","sale_id":"TestSample","capture_id":"TestSample","parent_payment":"TestSample","description":"TestSample","create_time":"TestSample","update_time":"TestSample","links":' . LinksTest::getJson() . '}';
|
return '{"id":"TestSample","amount":' .AmountTest::getJson() . ',"state":"TestSample","reason":"TestSample","invoice_number":"TestSample","sale_id":"TestSample","capture_id":"TestSample","parent_payment":"TestSample","description":"TestSample","create_time":"TestSample","update_time":"TestSample","reason_code":"TestSample","links":' .LinksTest::getJson() . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Refund
|
* @return Refund
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class RefundTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Refund
|
* @return Refund
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
@@ -45,12 +42,14 @@ class RefundTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertNotNull($obj->getAmount());
|
$this->assertNotNull($obj->getAmount());
|
||||||
$this->assertNotNull($obj->getState());
|
$this->assertNotNull($obj->getState());
|
||||||
$this->assertNotNull($obj->getReason());
|
$this->assertNotNull($obj->getReason());
|
||||||
|
$this->assertNotNull($obj->getInvoiceNumber());
|
||||||
$this->assertNotNull($obj->getSaleId());
|
$this->assertNotNull($obj->getSaleId());
|
||||||
$this->assertNotNull($obj->getCaptureId());
|
$this->assertNotNull($obj->getCaptureId());
|
||||||
$this->assertNotNull($obj->getParentPayment());
|
$this->assertNotNull($obj->getParentPayment());
|
||||||
$this->assertNotNull($obj->getDescription());
|
$this->assertNotNull($obj->getDescription());
|
||||||
$this->assertNotNull($obj->getCreateTime());
|
$this->assertNotNull($obj->getCreateTime());
|
||||||
$this->assertNotNull($obj->getUpdateTime());
|
$this->assertNotNull($obj->getUpdateTime());
|
||||||
|
$this->assertNotNull($obj->getReasonCode());
|
||||||
$this->assertNotNull($obj->getLinks());
|
$this->assertNotNull($obj->getLinks());
|
||||||
$this->assertEquals(self::getJson(), $obj->toJson());
|
$this->assertEquals(self::getJson(), $obj->toJson());
|
||||||
return $obj;
|
return $obj;
|
||||||
@@ -66,12 +65,14 @@ class RefundTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($obj->getAmount(), AmountTest::getObject());
|
$this->assertEquals($obj->getAmount(), AmountTest::getObject());
|
||||||
$this->assertEquals($obj->getState(), "TestSample");
|
$this->assertEquals($obj->getState(), "TestSample");
|
||||||
$this->assertEquals($obj->getReason(), "TestSample");
|
$this->assertEquals($obj->getReason(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getInvoiceNumber(), "TestSample");
|
||||||
$this->assertEquals($obj->getSaleId(), "TestSample");
|
$this->assertEquals($obj->getSaleId(), "TestSample");
|
||||||
$this->assertEquals($obj->getCaptureId(), "TestSample");
|
$this->assertEquals($obj->getCaptureId(), "TestSample");
|
||||||
$this->assertEquals($obj->getParentPayment(), "TestSample");
|
$this->assertEquals($obj->getParentPayment(), "TestSample");
|
||||||
$this->assertEquals($obj->getDescription(), "TestSample");
|
$this->assertEquals($obj->getDescription(), "TestSample");
|
||||||
$this->assertEquals($obj->getCreateTime(), "TestSample");
|
$this->assertEquals($obj->getCreateTime(), "TestSample");
|
||||||
$this->assertEquals($obj->getUpdateTime(), "TestSample");
|
$this->assertEquals($obj->getUpdateTime(), "TestSample");
|
||||||
|
$this->assertEquals($obj->getReasonCode(), "TestSample");
|
||||||
$this->assertEquals($obj->getLinks(), LinksTest::getObject());
|
$this->assertEquals($obj->getLinks(), LinksTest::getObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,7 +89,7 @@ class RefundTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
RefundTest::getJson()
|
RefundTest::getJson()
|
||||||
));
|
));
|
||||||
|
|
||||||
$result = $obj->get("refundId", $mockApiContext, $mockPPRestCall);
|
$result = $obj->get("refundId", $mockApiContext, $mockPPRestCall);
|
||||||
@@ -99,8 +100,8 @@ class RefundTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$obj = self::getObject();
|
$obj = self::getObject();
|
||||||
$mockApiContext = $this->getMockBuilder('ApiContext')
|
$mockApiContext = $this->getMockBuilder('ApiContext')
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
return array(
|
return array(
|
||||||
array($obj, $mockApiContext),
|
array($obj, $mockApiContext),
|
||||||
array($obj, null)
|
array($obj, null)
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class RelatedResourcesTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object RelatedResources
|
* Gets Json String of Object RelatedResources
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class RelatedResourcesTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return RelatedResources
|
* @return RelatedResources
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class RelatedResourcesTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return RelatedResources
|
* @return RelatedResources
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class SaleTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object Sale
|
* Gets Json String of Object Sale
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class SaleTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Sale
|
* @return Sale
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class SaleTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Sale
|
* @return Sale
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
@@ -110,13 +107,12 @@ class SaleTest extends \PHPUnit_Framework_TestCase
|
|||||||
$mockPPRestCall->expects($this->any())
|
$mockPPRestCall->expects($this->any())
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
SaleTest::getJson()
|
SaleTest::getJson()
|
||||||
));
|
));
|
||||||
|
|
||||||
$result = $obj->get("saleId", $mockApiContext, $mockPPRestCall);
|
$result = $obj->get("saleId", $mockApiContext, $mockPPRestCall);
|
||||||
$this->assertNotNull($result);
|
$this->assertNotNull($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider mockProvider
|
* @dataProvider mockProvider
|
||||||
* @param Sale $obj
|
* @param Sale $obj
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class ShippingAddressTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets Json String of Object ShippingAddress
|
* Gets Json String of Object ShippingAddress
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getJson()
|
public static function getJson()
|
||||||
@@ -23,7 +22,6 @@ class ShippingAddressTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return ShippingAddress
|
* @return ShippingAddress
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +32,6 @@ class ShippingAddressTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return ShippingAddress
|
* @return ShippingAddress
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ class TransactionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets Object Instance with Json data filled in
|
* Gets Object Instance with Json data filled in
|
||||||
*
|
|
||||||
* @return Transaction
|
* @return Transaction
|
||||||
*/
|
*/
|
||||||
public static function getObject()
|
public static function getObject()
|
||||||
@@ -34,7 +33,6 @@ class TransactionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for Serialization and Deserialization Issues
|
* Tests for Serialization and Deserialization Issues
|
||||||
*
|
|
||||||
* @return Transaction
|
* @return Transaction
|
||||||
*/
|
*/
|
||||||
public function testSerializationDeserialization()
|
public function testSerializationDeserialization()
|
||||||
|
|||||||
@@ -23,8 +23,9 @@
|
|||||||
"payment_method": "credit_card",
|
"payment_method": "credit_card",
|
||||||
"funding_instruments": [
|
"funding_instruments": [
|
||||||
{
|
{
|
||||||
"credit_card": {
|
"payment_card": {
|
||||||
"number": "4160285494148633",
|
"number": "4160285494148633",
|
||||||
|
"billing_country": "US",
|
||||||
"type": "visa",
|
"type": "visa",
|
||||||
"expire_month": 11,
|
"expire_month": 11,
|
||||||
"expire_year": 2018,
|
"expire_year": 2018,
|
||||||
|
|||||||
Reference in New Issue
Block a user