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
|
||||
*
|
||||
* @property string phone
|
||||
* @property string type
|
||||
*/
|
||||
class Address extends BaseAddress
|
||||
{
|
||||
/**
|
||||
* Phone number in E.123 format.
|
||||
* Phone number in E.123 format. 50 characters max.
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
@@ -36,4 +37,26 @@ class Address extends BaseAddress
|
||||
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
|
||||
*
|
||||
* @deprecated Used for limited release only.
|
||||
*
|
||||
* @property string alternate_payment_account_id
|
||||
* @property string external_customer_id
|
||||
* @property string alternate_payment_provider_id
|
||||
|
||||
@@ -13,8 +13,8 @@ use PayPal\Validation\NumericValidator;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string currency
|
||||
* @property string total
|
||||
* @property string currency
|
||||
* @property string total
|
||||
* @property \PayPal\Api\Details details
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string $currency
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string|double $total
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTotal($total)
|
||||
@@ -71,7 +71,7 @@ class Amount extends PayPalModel
|
||||
* Additional details of the payment amount.
|
||||
*
|
||||
* @param \PayPal\Api\Details $details
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDetails($details)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* Class Authorization
|
||||
@@ -13,21 +13,23 @@ use PayPal\Validation\ArgumentValidator;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string id
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property string payment_mode
|
||||
* @property string state
|
||||
* @property string reason_code
|
||||
* @property string pending_reason
|
||||
* @property string protection_eligibility
|
||||
* @property string protection_eligibility_type
|
||||
* @property string id
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property string payment_mode
|
||||
* @property string state
|
||||
* @property string reason_code
|
||||
* @property string pending_reason
|
||||
* @property string protection_eligibility
|
||||
* @property string protection_eligibility_type
|
||||
* @property \PayPal\Api\FmfDetails fmf_details
|
||||
* @property string parent_payment
|
||||
* @property string parent_payment
|
||||
* @property \PayPal\Api\ProcessorResponse processor_response
|
||||
* @property string valid_until
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property \PayPal\Api\Links[] links
|
||||
* @property string valid_until
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property string reference_id
|
||||
* @property string receipt_id
|
||||
* @property \PayPal\Api\Links[] links
|
||||
*/
|
||||
class Authorization extends PayPalResourceModel
|
||||
{
|
||||
@@ -35,7 +37,7 @@ class Authorization extends PayPalResourceModel
|
||||
* ID of the authorization transaction.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
@@ -58,7 +60,7 @@ class Authorization extends PayPalResourceModel
|
||||
* Amount being authorized.
|
||||
*
|
||||
* @param \PayPal\Api\Amount $amount
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAmount($amount)
|
||||
@@ -82,7 +84,7 @@ class Authorization extends PayPalResourceModel
|
||||
* Valid Values: ["INSTANT_TRANSFER"]
|
||||
*
|
||||
* @param string $payment_mode
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPaymentMode($payment_mode)
|
||||
@@ -106,7 +108,7 @@ class Authorization extends PayPalResourceModel
|
||||
* Valid Values: ["pending", "authorized", "partially_captured", "captured", "expired", "voided"]
|
||||
*
|
||||
* @param string $state
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setState($state)
|
||||
@@ -130,7 +132,7 @@ class Authorization extends PayPalResourceModel
|
||||
* Valid Values: ["AUTHORIZATION"]
|
||||
*
|
||||
* @param string $reason_code
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setReasonCode($reason_code)
|
||||
@@ -154,7 +156,7 @@ class Authorization extends PayPalResourceModel
|
||||
* Valid Values: ["AUTHORIZATION"]
|
||||
*
|
||||
* @param string $pending_reason
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPendingReason($pending_reason)
|
||||
@@ -178,7 +180,7 @@ class Authorization extends PayPalResourceModel
|
||||
* Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
|
||||
*
|
||||
* @param string $protection_eligibility
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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"]
|
||||
*
|
||||
* @param string $protection_eligibility_type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param \PayPal\Api\FmfDetails $fmf_details
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFmfDetails($fmf_details)
|
||||
@@ -248,7 +250,7 @@ class Authorization extends PayPalResourceModel
|
||||
* ID of the Payment resource that this transaction is based on.
|
||||
*
|
||||
* @param string $parent_payment
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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).
|
||||
*
|
||||
* @param string $valid_until
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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).
|
||||
*
|
||||
* @param string $create_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreateTime($create_time)
|
||||
@@ -340,7 +342,7 @@ class Authorization extends PayPalResourceModel
|
||||
* Time that the resource was last updated.
|
||||
*
|
||||
* @param string $update_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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 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 string $reference_id
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
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 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 Capture $capture
|
||||
* @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 Capture
|
||||
*/
|
||||
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 PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||
* @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
|
||||
*/
|
||||
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 PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||
* @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
|
||||
*/
|
||||
public function reauthorize($apiContext = null, $restCall = null)
|
||||
|
||||
@@ -11,38 +11,37 @@ use PayPal\Common\PayPalModel;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string account_number
|
||||
* @property string account_number_type
|
||||
* @property string routing_number
|
||||
* @property string account_type
|
||||
* @property string account_name
|
||||
* @property string check_type
|
||||
* @property string auth_type
|
||||
* @property string auth_capture_timestamp
|
||||
* @property string bank_name
|
||||
* @property string country_code
|
||||
* @property string first_name
|
||||
* @property string last_name
|
||||
* @property string birth_date
|
||||
* @property string account_number
|
||||
* @property string account_number_type
|
||||
* @property string routing_number
|
||||
* @property string account_type
|
||||
* @property string account_name
|
||||
* @property string check_type
|
||||
* @property string auth_type
|
||||
* @property string auth_capture_timestamp
|
||||
* @property string bank_name
|
||||
* @property string country_code
|
||||
* @property string first_name
|
||||
* @property string last_name
|
||||
* @property string birth_date
|
||||
* @property \PayPal\Api\Address billing_address
|
||||
* @property string state
|
||||
* @property string confirmation_status
|
||||
* @property string payer_id
|
||||
* @property string external_customer_id
|
||||
* @property string merchant_id
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property string valid_until
|
||||
* @property string state
|
||||
* @property string confirmation_status
|
||||
* @property string payer_id
|
||||
* @property string external_customer_id
|
||||
* @property string merchant_id
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property string valid_until
|
||||
* @property \PayPal\Api\Links[] links
|
||||
*/
|
||||
class BankAccount extends PayPalModel
|
||||
{
|
||||
/**
|
||||
* ID of the bank account being saved for later use.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
@@ -53,7 +52,6 @@ class BankAccount extends PayPalModel
|
||||
|
||||
/**
|
||||
* ID of the bank account being saved for later use.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
@@ -66,7 +64,7 @@ class BankAccount extends PayPalModel
|
||||
* Account number in either IBAN (max length 34) or BBAN (max length 17) format.
|
||||
*
|
||||
* @param string $account_number
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAccountNumber($account_number)
|
||||
@@ -90,7 +88,7 @@ class BankAccount extends PayPalModel
|
||||
* Valid Values: ["BBAN", "IBAN"]
|
||||
*
|
||||
* @param string $account_number_type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string $routing_number
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRoutingNumber($routing_number)
|
||||
@@ -137,7 +135,7 @@ class BankAccount extends PayPalModel
|
||||
* Valid Values: ["CHECKING", "SAVINGS"]
|
||||
*
|
||||
* @param string $account_type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAccountType($account_type)
|
||||
@@ -160,7 +158,7 @@ class BankAccount extends PayPalModel
|
||||
* A customer designated name.
|
||||
*
|
||||
* @param string $account_name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAccountName($account_name)
|
||||
@@ -184,7 +182,7 @@ class BankAccount extends PayPalModel
|
||||
* Valid Values: ["PERSONAL", "COMPANY"]
|
||||
*
|
||||
* @param string $check_type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCheckType($check_type)
|
||||
@@ -208,7 +206,7 @@ class BankAccount extends PayPalModel
|
||||
* Valid Values: ["CCD", "PPD", "TEL", "POP", "ARC", "RCK", "WEB"]
|
||||
*
|
||||
* @param string $auth_type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string $auth_capture_timestamp
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAuthCaptureTimestamp($auth_capture_timestamp)
|
||||
@@ -254,7 +252,7 @@ class BankAccount extends PayPalModel
|
||||
* Name of the bank.
|
||||
*
|
||||
* @param string $bank_name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBankName($bank_name)
|
||||
@@ -277,7 +275,7 @@ class BankAccount extends PayPalModel
|
||||
* 2 letter country code of the Bank.
|
||||
*
|
||||
* @param string $country_code
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCountryCode($country_code)
|
||||
@@ -300,7 +298,7 @@ class BankAccount extends PayPalModel
|
||||
* Account holder's first name.
|
||||
*
|
||||
* @param string $first_name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFirstName($first_name)
|
||||
@@ -323,7 +321,7 @@ class BankAccount extends PayPalModel
|
||||
* Account holder's last name.
|
||||
*
|
||||
* @param string $last_name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLastName($last_name)
|
||||
@@ -346,7 +344,7 @@ class BankAccount extends PayPalModel
|
||||
* Birth date of the bank account holder.
|
||||
*
|
||||
* @param string $birth_date
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBirthDate($birth_date)
|
||||
@@ -369,7 +367,7 @@ class BankAccount extends PayPalModel
|
||||
* Billing address.
|
||||
*
|
||||
* @param \PayPal\Api\Address $billing_address
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBillingAddress($billing_address)
|
||||
@@ -393,7 +391,7 @@ class BankAccount extends PayPalModel
|
||||
* Valid Values: ["ACTIVE", "INACTIVE", "DELETED"]
|
||||
*
|
||||
* @param string $state
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setState($state)
|
||||
@@ -417,7 +415,7 @@ class BankAccount extends PayPalModel
|
||||
* Valid Values: ["UNCONFIRMED", "CONFIRMED"]
|
||||
*
|
||||
* @param string $confirmation_status
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setConfirmationStatus($confirmation_status)
|
||||
@@ -440,7 +438,7 @@ class BankAccount extends PayPalModel
|
||||
* [DEPRECATED] Use external_customer_id instead.
|
||||
*
|
||||
* @param string $payer_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string $external_customer_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -509,7 +507,7 @@ class BankAccount extends PayPalModel
|
||||
* Time the resource was created.
|
||||
*
|
||||
* @param string $create_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreateTime($create_time)
|
||||
@@ -532,7 +530,7 @@ class BankAccount extends PayPalModel
|
||||
* Time the resource was last updated.
|
||||
*
|
||||
* @param string $update_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string $valid_until
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setValidUntil($valid_until)
|
||||
@@ -578,7 +576,7 @@ class BankAccount extends PayPalModel
|
||||
* Sets Links
|
||||
*
|
||||
* @param \PayPal\Api\Links[] $links
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
|
||||
@@ -11,6 +11,8 @@ use PayPal\Common\PayPalModel;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @deprecated Used internally only.
|
||||
*
|
||||
* @property string billing_agreement_id
|
||||
*/
|
||||
class Billing extends PayPalModel
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* Class Capture
|
||||
@@ -13,23 +14,25 @@ use PayPal\Validation\ArgumentValidator;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string id
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property bool is_final_capture
|
||||
* @property string state
|
||||
* @property string parent_payment
|
||||
* @property string id
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property bool is_final_capture
|
||||
* @property string state
|
||||
* @property string reason_code
|
||||
* @property string parent_payment
|
||||
* @property string invoice_number
|
||||
* @property \PayPal\Api\Currency transaction_fee
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property \PayPal\Api\Links[] links
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property \PayPal\Api\Links[] links
|
||||
*/
|
||||
class Capture extends PayPalResourceModel
|
||||
{
|
||||
/**
|
||||
* ID of the capture transaction.
|
||||
* The ID of the capture transaction.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -95,11 +98,11 @@ class Capture extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* State of the capture.
|
||||
* The state of the capture.
|
||||
* Valid Values: ["pending", "completed", "refunded", "partially_refunded"]
|
||||
*
|
||||
* @param string $state
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setState($state)
|
||||
@@ -109,7 +112,7 @@ class Capture extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* State of the capture.
|
||||
* The state of the capture.
|
||||
*
|
||||
* @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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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 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 string $captureId
|
||||
* @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 Capture
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @deprecated Please use #refundCapturedPayment instead.
|
||||
* @param Refund $refund
|
||||
* @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
|
||||
@@ -261,4 +312,30 @@ class Capture extends PayPalResourceModel
|
||||
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
|
||||
*
|
||||
* Payment Instrument that facilitates carrier billing
|
||||
* Payment instrument that enables carrier billing.
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
@@ -20,7 +20,7 @@ use PayPal\Common\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
|
||||
*
|
||||
@@ -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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
@@ -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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
@@ -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
|
||||
*/
|
||||
@@ -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"]
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ class CarrierAccountToken extends PayPalModel
|
||||
* ID of a previously saved carrier account resource.
|
||||
*
|
||||
* @param string $carrier_account_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string $external_customer_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setExternalCustomerId($external_customer_id)
|
||||
|
||||
@@ -12,17 +12,18 @@ use PayPal\Validation\UrlValidator;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string reference_id
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property string description
|
||||
* @property string note_to_payee
|
||||
* @property string custom
|
||||
* @property string invoice_number
|
||||
* @property string soft_descriptor
|
||||
* @property string reference_id
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property \PayPal\Api\Payee payee
|
||||
* @property string description
|
||||
* @property string note_to_payee
|
||||
* @property string custom
|
||||
* @property string invoice_number
|
||||
* @property string soft_descriptor
|
||||
* @property \PayPal\Api\PaymentOptions payment_options
|
||||
* @property \PayPal\Api\ItemList item_list
|
||||
* @property string notify_url
|
||||
* @property string order_url
|
||||
* @property \PayPal\Api\ItemList item_list
|
||||
* @property string notify_url
|
||||
* @property string order_url
|
||||
*/
|
||||
class CartBase extends PayPalModel
|
||||
{
|
||||
@@ -30,7 +31,7 @@ class CartBase extends PayPalModel
|
||||
* Merchant identifier to the purchase unit. Optional parameter
|
||||
*
|
||||
* @param string $reference_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setReferenceId($reference_id)
|
||||
@@ -53,7 +54,7 @@ class CartBase extends PayPalModel
|
||||
* Amount being collected.
|
||||
*
|
||||
* @param \PayPal\Api\Amount $amount
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAmount($amount)
|
||||
@@ -75,9 +76,8 @@ class CartBase extends PayPalModel
|
||||
/**
|
||||
* Recipient of the funds in this transaction.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\Payee $payee
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPayee($payee)
|
||||
@@ -89,7 +89,6 @@ class CartBase extends PayPalModel
|
||||
/**
|
||||
* Recipient of the funds in this transaction.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\Payee
|
||||
*/
|
||||
public function getPayee()
|
||||
@@ -98,10 +97,10 @@ class CartBase extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Description of transaction.
|
||||
* Description of what is being paid for.
|
||||
*
|
||||
* @param string $description
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDescription($description)
|
||||
@@ -111,7 +110,7 @@ class CartBase extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Description of transaction.
|
||||
* Description of what is being paid for.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -124,7 +123,7 @@ class CartBase extends PayPalModel
|
||||
* Note to the recipient of the funds in this transaction.
|
||||
*
|
||||
* @param string $note_to_payee
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
* @param string $soft_descriptor
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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`
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $soft_descriptor_city
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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`
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
@@ -241,7 +238,7 @@ class CartBase extends PayPalModel
|
||||
* Payment options requested for this purchase unit
|
||||
*
|
||||
* @param \PayPal\Api\PaymentOptions $payment_options
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @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
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\ExternalFunding[]
|
||||
*/
|
||||
@@ -358,7 +353,6 @@ class CartBase extends PayPalModel
|
||||
|
||||
/**
|
||||
* Append ExternalFunding to the list.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\ExternalFunding $externalFunding
|
||||
* @return $this
|
||||
@@ -376,7 +370,6 @@ class CartBase extends PayPalModel
|
||||
|
||||
/**
|
||||
* Remove ExternalFunding from the list.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\ExternalFunding $externalFunding
|
||||
* @return $this
|
||||
|
||||
@@ -7,7 +7,7 @@ use PayPal\Common\PayPalModel;
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
@@ -19,7 +19,7 @@ class CountryCode extends PayPalModel
|
||||
* ISO country code based on 2-character IS0-3166-1 codes.
|
||||
*
|
||||
* @param string $country_code
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCountryCode($country_code)
|
||||
|
||||
@@ -20,7 +20,7 @@ class Credit extends PayPalModel
|
||||
* Unique identifier of credit resource.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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"]
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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"]
|
||||
*
|
||||
* @param string $state
|
||||
|
||||
@@ -15,8 +15,8 @@ use PayPal\Common\PayPalModel;
|
||||
* @property string payer_id
|
||||
* @property string last4
|
||||
* @property string type
|
||||
* @property int expire_month
|
||||
* @property int expire_year
|
||||
* @property int expire_month
|
||||
* @property int expire_year
|
||||
*/
|
||||
class CreditCardToken extends PayPalModel
|
||||
{
|
||||
@@ -24,7 +24,7 @@ class CreditCardToken extends PayPalModel
|
||||
* ID of credit card previously stored using `/vault/credit-card`.
|
||||
*
|
||||
* @param string $credit_card_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.**
|
||||
*
|
||||
* @param string $payer_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPayerId($payer_id)
|
||||
@@ -70,7 +70,7 @@ class CreditCardToken extends PayPalModel
|
||||
* Last four digits of the stored credit card number.
|
||||
*
|
||||
* @param string $last4
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
@@ -116,7 +116,7 @@ class CreditCardToken extends PayPalModel
|
||||
* Expiration month with no leading zero. Acceptable values are 1 through 12.
|
||||
*
|
||||
* @param int $expire_month
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setExpireMonth($expire_month)
|
||||
@@ -139,7 +139,7 @@ class CreditCardToken extends PayPalModel
|
||||
* 4-digit expiration year.
|
||||
*
|
||||
* @param int $expire_year
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setExpireYear($expire_year)
|
||||
|
||||
@@ -19,7 +19,7 @@ use PayPal\Validation\NumericValidator;
|
||||
class Currency extends PayPalModel
|
||||
{
|
||||
/**
|
||||
* 3 letter currency code
|
||||
* 3 letter currency code as defined by ISO 4217.
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -12,13 +12,13 @@ use PayPal\Validation\UrlValidator;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string conversion_date
|
||||
* @property string from_currency
|
||||
* @property string from_amount
|
||||
* @property string to_currency
|
||||
* @property string to_amount
|
||||
* @property string conversion_type
|
||||
* @property bool conversion_type_changeable
|
||||
* @property string conversion_date
|
||||
* @property string from_currency
|
||||
* @property string from_amount
|
||||
* @property string to_currency
|
||||
* @property string to_amount
|
||||
* @property string conversion_type
|
||||
* @property bool conversion_type_changeable
|
||||
* @property \PayPal\Api\Links[] links
|
||||
*/
|
||||
class CurrencyConversion extends PayPalModel
|
||||
@@ -27,7 +27,7 @@ class CurrencyConversion extends PayPalModel
|
||||
* Date of validity for the conversion rate.
|
||||
*
|
||||
* @param string $conversion_date
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setConversionDate($conversion_date)
|
||||
@@ -50,7 +50,7 @@ class CurrencyConversion extends PayPalModel
|
||||
* 3 letter currency code
|
||||
*
|
||||
* @param string $from_currency
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -96,7 +96,7 @@ class CurrencyConversion extends PayPalModel
|
||||
* 3 letter currency code
|
||||
*
|
||||
* @param string $to_currency
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setToCurrency($to_currency)
|
||||
@@ -119,7 +119,7 @@ class CurrencyConversion extends PayPalModel
|
||||
* Amount resulting from currency conversion.
|
||||
*
|
||||
* @param string $to_amount
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setToAmount($to_amount)
|
||||
@@ -143,7 +143,7 @@ class CurrencyConversion extends PayPalModel
|
||||
* Valid Values: ["PAYPAL", "VENDOR"]
|
||||
*
|
||||
* @param string $conversion_type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setConversionType($conversion_type)
|
||||
@@ -166,7 +166,7 @@ class CurrencyConversion extends PayPalModel
|
||||
* Allow Payer to change conversion type.
|
||||
*
|
||||
* @param bool $conversion_type_changeable
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setConversionTypeChangeable($conversion_type_changeable)
|
||||
@@ -188,7 +188,6 @@ class CurrencyConversion extends PayPalModel
|
||||
/**
|
||||
* 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"]
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $web_url
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -203,7 +202,6 @@ class CurrencyConversion extends PayPalModel
|
||||
|
||||
/**
|
||||
* Base URL to web applications endpoint
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
@@ -216,7 +214,7 @@ class CurrencyConversion extends PayPalModel
|
||||
* Sets Links
|
||||
*
|
||||
* @param \PayPal\Api\Links[] $links
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string|double $subtotal
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string|double $shipping
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string|double $tax
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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`.
|
||||
*
|
||||
* @param string|double $handling_fee
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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`.
|
||||
*
|
||||
* @param string|double $shipping_discount
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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`.
|
||||
*
|
||||
* @param string|double $insurance
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setInsurance($insurance)
|
||||
@@ -178,7 +178,7 @@ class Details extends PayPalModel
|
||||
* Amount being charged as gift wrap fee.
|
||||
*
|
||||
* @param string|double $gift_wrap
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string|double $fee
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFee($fee)
|
||||
|
||||
@@ -24,7 +24,7 @@ class Error extends PayPalModel
|
||||
* Human readable, unique name of the error.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
@@ -97,7 +97,7 @@ class Error extends PayPalModel
|
||||
* PayPal internal identifier used for correlation purposes.
|
||||
*
|
||||
* @param string $debug_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDebugId($debug_id)
|
||||
@@ -120,7 +120,7 @@ class Error extends PayPalModel
|
||||
* Message describing the error.
|
||||
*
|
||||
* @param string $message
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMessage($message)
|
||||
@@ -143,7 +143,7 @@ class Error extends PayPalModel
|
||||
* URI for detailed information related to this error for the developer.
|
||||
*
|
||||
* @param string $information_link
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setInformationLink($information_link)
|
||||
@@ -166,7 +166,7 @@ class Error extends PayPalModel
|
||||
* Additional details of the error
|
||||
*
|
||||
* @param \PayPal\Api\ErrorDetails[] $details
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDetails($details)
|
||||
|
||||
@@ -64,10 +64,9 @@ class ErrorDetails extends PayPalModel
|
||||
|
||||
/**
|
||||
* Reference ID of the purchase_unit associated with this error
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $purchase_unit_reference_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
@@ -89,10 +87,9 @@ class ErrorDetails extends PayPalModel
|
||||
|
||||
/**
|
||||
* PayPal internal error code.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $code
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
@@ -103,7 +100,6 @@ class ErrorDetails extends PayPalModel
|
||||
|
||||
/**
|
||||
* PayPal internal error code.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @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).
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $mandate_reference_number
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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).
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
|
||||
@@ -16,6 +16,7 @@ use PayPal\Common\PayPalModel;
|
||||
* @property string funding_account_id
|
||||
* @property string display_text
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property string funding_instruction
|
||||
*/
|
||||
class ExternalFunding extends PayPalModel
|
||||
{
|
||||
@@ -134,4 +135,27 @@ class ExternalFunding extends PayPalModel
|
||||
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"]
|
||||
*
|
||||
* @param string $filter_type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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"]
|
||||
*
|
||||
* @param string $filter_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFilterId($filter_id)
|
||||
@@ -70,7 +70,7 @@ class FmfDetails extends PayPalModel
|
||||
* Name of the filter
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
@@ -93,7 +93,7 @@ class FmfDetails extends PayPalModel
|
||||
* Description of the filter.
|
||||
*
|
||||
* @param string $description
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDescription($description)
|
||||
|
||||
@@ -22,7 +22,7 @@ class FundingDetail extends PayPalModel
|
||||
* Expected clearing time
|
||||
*
|
||||
* @param string $clearing_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string $payment_hold_date
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @param string $payment_debit_date
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPaymentDebitDate($payment_debit_date)
|
||||
@@ -89,10 +89,10 @@ class FundingDetail extends PayPalModel
|
||||
|
||||
/**
|
||||
* Processing type of the payment card
|
||||
* Valid Values: ["PINLESS_DEBIT"]
|
||||
* Valid Values: ["CUP_SECURE", "PINLESS_DEBIT"]
|
||||
*
|
||||
* @param string $processing_type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setProcessingType($processing_type)
|
||||
|
||||
@@ -11,9 +11,9 @@ use PayPal\Common\PayPalModel;
|
||||
*
|
||||
* @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\Billing billing
|
||||
* @property \PayPal\Api\Billing billing
|
||||
*/
|
||||
class FundingInstrument extends PayPalModel
|
||||
{
|
||||
@@ -34,7 +34,6 @@ class FundingInstrument extends PayPalModel
|
||||
* Credit Card instrument.
|
||||
*
|
||||
* @return \PayPal\Api\CreditCard
|
||||
*
|
||||
*/
|
||||
public function getCreditCard()
|
||||
{
|
||||
@@ -89,7 +88,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* Bank Account information.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\ExtendedBankAccount $bank_account
|
||||
*
|
||||
@@ -103,7 +101,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* Bank Account information.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\ExtendedBankAccount
|
||||
*/
|
||||
@@ -114,7 +111,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* Vaulted bank account instrument.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\BankToken $bank_account_token
|
||||
*
|
||||
@@ -128,7 +124,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* Vaulted bank account instrument.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\BankToken
|
||||
*/
|
||||
@@ -139,7 +134,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* PayPal credit funding instrument.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\Credit $credit
|
||||
*
|
||||
@@ -153,7 +147,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* PayPal credit funding instrument.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\Credit
|
||||
*/
|
||||
@@ -164,7 +157,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* Incentive funding instrument.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\Incentive $incentive
|
||||
*
|
||||
@@ -178,7 +170,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* Incentive funding instrument.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\Incentive
|
||||
*/
|
||||
@@ -189,7 +180,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* External funding instrument.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\ExternalFunding $external_funding
|
||||
*
|
||||
@@ -203,7 +193,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* External funding instrument.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\ExternalFunding
|
||||
*/
|
||||
@@ -214,7 +203,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* Carrier account token instrument.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\CarrierAccountToken $carrier_account_token
|
||||
*
|
||||
@@ -228,7 +216,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* Carrier account token instrument.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\CarrierAccountToken
|
||||
*/
|
||||
@@ -239,7 +226,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* Carrier account instrument
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\CarrierAccount $carrier_account
|
||||
*
|
||||
@@ -253,7 +239,6 @@ class FundingInstrument extends PayPalModel
|
||||
|
||||
/**
|
||||
* Carrier account instrument
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @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.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @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.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\PrivateLabelCard
|
||||
*/
|
||||
|
||||
@@ -11,25 +11,24 @@ use PayPal\Common\PayPalModel;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string funding_mode
|
||||
* @property string funding_instrument_type
|
||||
* @property string soft_descriptor
|
||||
* @property \PayPal\Api\Currency amount
|
||||
* @property \PayPal\Api\Currency negative_balance_amount
|
||||
* @property string legal_text
|
||||
* @property \PayPal\Api\FundingDetail funding_detail
|
||||
* @property string additional_text
|
||||
* @property \PayPal\Api\FundingInstrument extends
|
||||
* @property \PayPal\Api\Links[] links
|
||||
* @property string funding_mode
|
||||
* @property string funding_instrument_type
|
||||
* @property string soft_descriptor
|
||||
* @property \PayPal\Api\Currency amount
|
||||
* @property \PayPal\Api\Currency negative_balance_amount
|
||||
* @property string legal_text
|
||||
* @property \PayPal\Api\FundingDetail funding_detail
|
||||
* @property string additional_text
|
||||
* @property \PayPal\Api\Links[] links
|
||||
*/
|
||||
class FundingSource extends PayPalModel
|
||||
class FundingSource extends FundingInstrument
|
||||
{
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFundingMode($funding_mode)
|
||||
@@ -50,10 +49,10 @@ class FundingSource extends PayPalModel
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFundingInstrumentType($funding_instrument_type)
|
||||
@@ -76,7 +75,7 @@ class FundingSource extends PayPalModel
|
||||
* Soft descriptor used when charging this funding source.
|
||||
*
|
||||
* @param string $soft_descriptor
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSoftDescriptor($soft_descriptor)
|
||||
@@ -99,7 +98,7 @@ class FundingSource extends PayPalModel
|
||||
* Total anticipated amount of money to be pulled from instrument.
|
||||
*
|
||||
* @param \PayPal\Api\Currency $amount
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @param \PayPal\Api\Currency $amount
|
||||
* 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 $negative_balance_amount
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setNegativeBalanceAmount($amount)
|
||||
public function setNegativeBalanceAmount($negative_balance_amount)
|
||||
{
|
||||
$this->amount = $amount;
|
||||
$this->negative_balance_amount = $negative_balance_amount;
|
||||
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
|
||||
*/
|
||||
public function getNegativeBalanceAmount()
|
||||
{
|
||||
return $this->amount;
|
||||
return $this->negative_balance_amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Localized legal text relevant to funding source.
|
||||
*
|
||||
* @param string $legal_text
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLegalText($legal_text)
|
||||
@@ -168,7 +167,7 @@ class FundingSource extends PayPalModel
|
||||
* Additional detail of the funding.
|
||||
*
|
||||
* @param \PayPal\Api\FundingDetail $funding_detail
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFundingDetail($funding_detail)
|
||||
@@ -191,7 +190,7 @@ class FundingSource extends PayPalModel
|
||||
* Additional text relevant to funding source.
|
||||
*
|
||||
* @param string $additional_text
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAdditionalText($additional_text)
|
||||
@@ -215,6 +214,8 @@ class FundingSource extends PayPalModel
|
||||
*
|
||||
* @param \PayPal\Api\FundingInstrument $extends
|
||||
*
|
||||
* @deprecated Unused
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setExtends($extends)
|
||||
@@ -226,6 +227,8 @@ class FundingSource extends PayPalModel
|
||||
/**
|
||||
* Gets Extends
|
||||
*
|
||||
* @deprecated Unused
|
||||
*
|
||||
* @return \PayPal\Api\FundingInstrument
|
||||
*/
|
||||
public function getExtends()
|
||||
@@ -237,7 +240,7 @@ class FundingSource extends PayPalModel
|
||||
* Sets Links
|
||||
*
|
||||
* @param \PayPal\Api\Links[] $links
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
|
||||
@@ -12,15 +12,15 @@ use PayPal\Validation\UrlValidator;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string id
|
||||
* @property string code
|
||||
* @property string name
|
||||
* @property string description
|
||||
* @property string id
|
||||
* @property string code
|
||||
* @property string name
|
||||
* @property string description
|
||||
* @property \PayPal\Api\Currency minimum_purchase_amount
|
||||
* @property string logo_image_url
|
||||
* @property string expiry_date
|
||||
* @property string type
|
||||
* @property string terms
|
||||
* @property string logo_image_url
|
||||
* @property string expiry_date
|
||||
* @property string type
|
||||
* @property string terms
|
||||
*/
|
||||
class Incentive extends PayPalModel
|
||||
{
|
||||
@@ -28,7 +28,7 @@ class Incentive extends PayPalModel
|
||||
* Identifier of the instrument in PayPal Wallet
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
@@ -51,7 +51,7 @@ class Incentive extends PayPalModel
|
||||
* Code that identifies the incentive.
|
||||
*
|
||||
* @param string $code
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
@@ -74,7 +74,7 @@ class Incentive extends PayPalModel
|
||||
* Name of the incentive.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
@@ -97,7 +97,7 @@ class Incentive extends PayPalModel
|
||||
* Description of the incentive.
|
||||
*
|
||||
* @param string $description
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDescription($description)
|
||||
@@ -120,7 +120,7 @@ class Incentive extends PayPalModel
|
||||
* Indicates incentive is applicable for this minimum purchase amount.
|
||||
*
|
||||
* @param \PayPal\Api\Currency $minimum_purchase_amount
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMinimumPurchaseAmount($minimum_purchase_amount)
|
||||
@@ -167,7 +167,7 @@ class Incentive extends PayPalModel
|
||||
* expiry date of the incentive.
|
||||
*
|
||||
* @param string $expiry_date
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setExpiryDate($expiry_date)
|
||||
@@ -191,7 +191,7 @@ class Incentive extends PayPalModel
|
||||
* Valid Values: ["COUPON", "GIFT_CARD", "MERCHANT_SPECIFIC_BALANCE", "VOUCHER"]
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
@@ -214,7 +214,7 @@ class Incentive extends PayPalModel
|
||||
* URI to the associated terms
|
||||
*
|
||||
* @param string $terms
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTerms($terms)
|
||||
|
||||
@@ -11,9 +11,9 @@ use PayPal\Common\PayPalModel;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property int term
|
||||
* @property \PayPal\Api\Currency monthly_payment
|
||||
* @property \PayPal\Api\Currency discount_amount
|
||||
* @property int term
|
||||
* @property \PayPal\Api\Currency monthly_payment
|
||||
* @property \PayPal\Api\Currency discount_amount
|
||||
* @property string discount_percentage
|
||||
*/
|
||||
class InstallmentOption extends PayPalModel
|
||||
@@ -22,7 +22,7 @@ class InstallmentOption extends PayPalModel
|
||||
* Number of installments
|
||||
*
|
||||
* @param int $term
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTerm($term)
|
||||
@@ -45,7 +45,7 @@ class InstallmentOption extends PayPalModel
|
||||
* Monthly payment
|
||||
*
|
||||
* @param \PayPal\Api\Currency $monthly_payment
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMonthlyPayment($monthly_payment)
|
||||
@@ -68,7 +68,7 @@ class InstallmentOption extends PayPalModel
|
||||
* Discount amount applied to the payment, if any
|
||||
*
|
||||
* @param \PayPal\Api\Currency $discount_amount
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDiscountAmount($discount_amount)
|
||||
@@ -91,7 +91,7 @@ class InstallmentOption extends PayPalModel
|
||||
* Discount percentage applied to the payment, if any
|
||||
*
|
||||
* @param string $discount_percentage
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDiscountPercentage($discount_percentage)
|
||||
|
||||
@@ -22,7 +22,6 @@ use PayPal\Validation\UrlValidator;
|
||||
* @property string currency
|
||||
* @property string tax
|
||||
* @property string url
|
||||
* @property string category
|
||||
*/
|
||||
class Item extends PayPalModel
|
||||
{
|
||||
@@ -30,7 +29,7 @@ class Item extends PayPalModel
|
||||
* Stock keeping unit corresponding (SKU) to item.
|
||||
*
|
||||
* @param string $sku
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSku($sku)
|
||||
@@ -53,7 +52,7 @@ class Item extends PayPalModel
|
||||
* Item name. 127 characters max.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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`.
|
||||
*
|
||||
* @param string $description
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDescription($description)
|
||||
@@ -99,7 +98,7 @@ class Item extends PayPalModel
|
||||
* Number of a particular item. 10 characters max.
|
||||
*
|
||||
* @param string $quantity
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setQuantity($quantity)
|
||||
@@ -122,7 +121,7 @@ class Item extends PayPalModel
|
||||
* Item cost. 10 characters max.
|
||||
*
|
||||
* @param string|double $price
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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/).
|
||||
*
|
||||
* @param string $currency
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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`.
|
||||
*
|
||||
* @param string|double $tax
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTax($tax)
|
||||
@@ -218,9 +217,9 @@ class Item extends PayPalModel
|
||||
/**
|
||||
* Category type of the item.
|
||||
* Valid Values: ["DIGITAL", "PHYSICAL"]
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $category
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCategory($category)
|
||||
@@ -231,7 +230,7 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Category type of the item.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
public function getCategory()
|
||||
@@ -241,10 +240,9 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Weight of the item.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\Measurement $weight
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setWeight($weight)
|
||||
@@ -255,7 +253,6 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Weight of the item.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\Measurement
|
||||
*/
|
||||
@@ -266,10 +263,9 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Length of the item.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\Measurement $length
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLength($length)
|
||||
@@ -280,7 +276,6 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Length of the item.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\Measurement
|
||||
*/
|
||||
@@ -291,10 +286,9 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Height of the item.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\Measurement $height
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setHeight($height)
|
||||
@@ -305,7 +299,6 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Height of the item.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\Measurement
|
||||
*/
|
||||
@@ -316,10 +309,9 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Width of the item.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\Measurement $width
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setWidth($width)
|
||||
@@ -330,7 +322,6 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Width of the item.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\Measurement
|
||||
*/
|
||||
@@ -341,10 +332,9 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Set of optional data used for PayPal risk determination.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\NameValuePair[] $supplementary_data
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSupplementaryData($supplementary_data)
|
||||
@@ -355,7 +345,6 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Set of optional data used for PayPal risk determination.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\NameValuePair[]
|
||||
*/
|
||||
@@ -366,7 +355,6 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Append SupplementaryData to the list.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\NameValuePair $nameValuePair
|
||||
* @return $this
|
||||
@@ -384,7 +372,6 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Remove SupplementaryData from the list.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\NameValuePair $nameValuePair
|
||||
* @return $this
|
||||
@@ -398,10 +385,9 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Set of optional data used for PayPal post-transaction notifications.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\NameValuePair[] $postback_data
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPostbackData($postback_data)
|
||||
@@ -412,7 +398,6 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Set of optional data used for PayPal post-transaction notifications.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\NameValuePair[]
|
||||
*/
|
||||
@@ -423,7 +408,6 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Append PostbackData to the list.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\NameValuePair $nameValuePair
|
||||
* @return $this
|
||||
@@ -441,7 +425,6 @@ class Item extends PayPalModel
|
||||
|
||||
/**
|
||||
* Remove PostbackData from the list.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\NameValuePair $nameValuePair
|
||||
* @return $this
|
||||
|
||||
@@ -7,14 +7,14 @@ use PayPal\Common\PayPalModel;
|
||||
/**
|
||||
* Class ItemList
|
||||
*
|
||||
* Items and related shipping address within a transaction.
|
||||
* List of items being paid for.
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property \PayPal\Api\Item[] items
|
||||
* @property \PayPal\Api\Item[] items
|
||||
* @property \PayPal\Api\ShippingAddress shipping_address
|
||||
* @property string shipping_method
|
||||
* @property string shipping_phone_number
|
||||
* @property string shipping_method
|
||||
* @property string shipping_phone_number
|
||||
*/
|
||||
class ItemList extends PayPalModel
|
||||
{
|
||||
@@ -22,7 +22,7 @@ class ItemList extends PayPalModel
|
||||
* List of items.
|
||||
*
|
||||
* @param \PayPal\Api\Item[] $items
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -98,7 +98,7 @@ class ItemList extends PayPalModel
|
||||
* Shipping method used for this payment like USPSParcel etc.
|
||||
*
|
||||
* @param string $shipping_method
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @param string $shipping_phone_number
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setShippingPhoneNumber($shipping_phone_number)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* Class Order
|
||||
@@ -13,20 +13,20 @@ use PayPal\Validation\ArgumentValidator;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string id
|
||||
* @property string purchase_unit_reference_id
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property string payment_mode
|
||||
* @property string state
|
||||
* @property string reason_code
|
||||
* @property string pending_reason
|
||||
* @property string protection_eligibility
|
||||
* @property string protection_eligibility_type
|
||||
* @property string parent_payment
|
||||
* @property string id
|
||||
* @property string reference_id
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property string payment_mode
|
||||
* @property string state
|
||||
* @property string reason_code
|
||||
* @property string pending_reason
|
||||
* @property string protection_eligibility
|
||||
* @property string protection_eligibility_type
|
||||
* @property string parent_payment
|
||||
* @property \PayPal\Api\FmfDetails fmf_details
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property \PayPal\Api\Links[] links
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property \PayPal\Api\Links[] links
|
||||
*/
|
||||
class Order extends PayPalResourceModel
|
||||
{
|
||||
@@ -34,7 +34,7 @@ class Order extends PayPalResourceModel
|
||||
* Identifier of the order transaction.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @deprecated Use #setReferenceId instead
|
||||
*
|
||||
* @param string $purchase_unit_reference_id
|
||||
*
|
||||
* @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.
|
||||
* @deprecated Use #getReferenceId instead
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -76,11 +79,34 @@ class Order extends PayPalResourceModel
|
||||
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.
|
||||
*
|
||||
* @param \PayPal\Api\Amount $amount
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAmount($amount)
|
||||
@@ -104,7 +130,7 @@ class Order extends PayPalResourceModel
|
||||
* Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
|
||||
*
|
||||
* @param string $payment_mode
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPaymentMode($payment_mode)
|
||||
@@ -125,10 +151,10 @@ class Order extends PayPalResourceModel
|
||||
|
||||
/**
|
||||
* State of the order transaction.
|
||||
* Valid Values: ["pending", "completed", "refunded", "partially_refunded", "voided"]
|
||||
* Valid Values: ["pending", "completed", "voided", "authorized", "captured"]
|
||||
*
|
||||
* @param string $state
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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"]
|
||||
*
|
||||
* @param string $reason_code
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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"]
|
||||
*
|
||||
* @param string $pending_reason
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -200,7 +226,7 @@ class Order extends PayPalResourceModel
|
||||
* Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
|
||||
*
|
||||
* @param string $protection_eligibility
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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"]
|
||||
*
|
||||
* @param string $protection_eligibility_type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string $parent_payment
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param \PayPal\Api\FmfDetails $fmf_details
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFmfDetails($fmf_details)
|
||||
@@ -293,7 +319,7 @@ class Order extends PayPalResourceModel
|
||||
* Time the resource was created in UTC ISO8601 format.
|
||||
*
|
||||
* @param string $create_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreateTime($create_time)
|
||||
@@ -316,7 +342,7 @@ class Order extends PayPalResourceModel
|
||||
* Time the resource was last updated in UTC ISO8601 format.
|
||||
*
|
||||
* @param string $update_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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 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 string $orderId
|
||||
* @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 Order
|
||||
*/
|
||||
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 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 Capture $capture
|
||||
* @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 Capture
|
||||
*/
|
||||
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 PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||
* @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 Order
|
||||
*/
|
||||
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 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 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
|
||||
*/
|
||||
public function authorize($authorization, $apiContext = null, $restCall = null)
|
||||
|
||||
@@ -7,7 +7,7 @@ use PayPal\Common\PayPalModel;
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
@@ -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
|
||||
*
|
||||
@@ -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
|
||||
*/
|
||||
@@ -68,7 +68,7 @@ class Patch extends PayPalModel
|
||||
/**
|
||||
* New value to apply based on the operation.
|
||||
*
|
||||
* @param string $value
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@@ -81,7 +81,7 @@ class Patch extends PayPalModel
|
||||
/**
|
||||
* New value to apply based on the operation.
|
||||
*
|
||||
* @return string
|
||||
* @return mixed
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ use PayPal\Common\PayPalModel;
|
||||
/**
|
||||
* Class PatchRequest
|
||||
*
|
||||
* Request object used for a JSON Patch.
|
||||
* A JSON patch request.
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
|
||||
@@ -17,10 +17,10 @@ use PayPal\Common\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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -43,7 +43,7 @@ class Payee extends PayPalModel
|
||||
* Encrypted PayPal account identifier for the Payee.
|
||||
*
|
||||
* @param string $merchant_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMerchantId($merchant_id)
|
||||
@@ -64,10 +64,9 @@ class Payee extends PayPalModel
|
||||
|
||||
/**
|
||||
* First Name of the Payee.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $first_name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFirstName($first_name)
|
||||
@@ -78,7 +77,6 @@ class Payee extends PayPalModel
|
||||
|
||||
/**
|
||||
* First Name of the Payee.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
@@ -89,10 +87,9 @@ class Payee extends PayPalModel
|
||||
|
||||
/**
|
||||
* Last Name of the Payee.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $last_name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLastName($last_name)
|
||||
@@ -103,7 +100,6 @@ class Payee extends PayPalModel
|
||||
|
||||
/**
|
||||
* Last Name of the Payee.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
@@ -114,10 +110,9 @@ class Payee extends PayPalModel
|
||||
|
||||
/**
|
||||
* Unencrypted PayPal account Number of the Payee
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $account_number
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAccountNumber($account_number)
|
||||
@@ -128,7 +123,6 @@ class Payee extends PayPalModel
|
||||
|
||||
/**
|
||||
* Unencrypted PayPal account Number of the Payee
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @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
|
||||
* @param \PayPal\Api\Phone $phone
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
* @return \PayPal\Api\Phone
|
||||
*/
|
||||
|
||||
@@ -11,11 +11,11 @@ use PayPal\Common\PayPalModel;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string payment_method
|
||||
* @property string status
|
||||
* @property string payment_method
|
||||
* @property string status
|
||||
* @property \PayPal\Api\FundingInstrument[] funding_instruments
|
||||
* @property string funding_option_id
|
||||
* @property \PayPal\Api\PayerInfo payer_info
|
||||
* @property string external_selected_funding_instrument_type
|
||||
* @property \PayPal\Api\PayerInfo payer_info
|
||||
*/
|
||||
class Payer extends PayPalModel
|
||||
{
|
||||
@@ -24,7 +24,7 @@ class Payer extends PayPalModel
|
||||
* Valid Values: ["credit_card", "bank", "paypal", "pay_upon_invoice", "carrier", "alternate_payment"]
|
||||
*
|
||||
* @param string $payment_method
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPaymentMethod($payment_method)
|
||||
@@ -48,7 +48,7 @@ class Payer extends PayPalModel
|
||||
* Valid Values: ["VERIFIED", "UNVERIFIED"]
|
||||
*
|
||||
* @param string $status
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
@@ -70,10 +70,9 @@ class Payer extends PayPalModel
|
||||
/**
|
||||
* Type of account relationship payer has with PayPal.
|
||||
* Valid Values: ["BUSINESS", "PERSONAL", "PREMIER"]
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $account_type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAccountType($account_type)
|
||||
@@ -84,7 +83,6 @@ class Payer extends PayPalModel
|
||||
|
||||
/**
|
||||
* Type of account relationship payer has with PayPal.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
@@ -95,10 +93,9 @@ class Payer extends PayPalModel
|
||||
|
||||
/**
|
||||
* Duration since the payer established account relationship with PayPal in days.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $account_age
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAccountAge($account_age)
|
||||
@@ -109,7 +106,6 @@ class Payer extends PayPalModel
|
||||
|
||||
/**
|
||||
* Duration since the payer established account relationship with PayPal in days.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @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.
|
||||
*
|
||||
* @param \PayPal\Api\FundingInstrument[] $funding_instruments
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $funding_option_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
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
|
||||
* @param \PayPal\Api\FundingOption $funding_option
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
* @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
|
||||
* @param \PayPal\Api\FundingOption $related_funding_option
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRelatedFundingOption($related_funding_option)
|
||||
@@ -235,7 +252,6 @@ class Payer extends PayPalModel
|
||||
|
||||
/**
|
||||
* Funding option related to default funding option.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
|
||||
@@ -11,22 +11,22 @@ use PayPal\Common\PayPalModel;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string email
|
||||
* @property string external_remember_me_id
|
||||
* @property string salutation
|
||||
* @property string first_name
|
||||
* @property string middle_name
|
||||
* @property string last_name
|
||||
* @property string suffix
|
||||
* @property string payer_id
|
||||
* @property string phone
|
||||
* @property string phone_type
|
||||
* @property string birth_date
|
||||
* @property string tax_id
|
||||
* @property string tax_id_type
|
||||
* @property string country_code
|
||||
* @property \PayPal\Api\Address billing_address
|
||||
* @property \PayPal\Api\ShippingAddress shipping_address
|
||||
* @property string email
|
||||
* @property string external_remember_me_id
|
||||
* @property string buyer_account_number
|
||||
* @property string salutation
|
||||
* @property string first_name
|
||||
* @property string middle_name
|
||||
* @property string last_name
|
||||
* @property string suffix
|
||||
* @property string payer_id
|
||||
* @property string phone
|
||||
* @property string phone_type
|
||||
* @property string birth_date
|
||||
* @property string tax_id
|
||||
* @property string tax_id_type
|
||||
* @property string country_code
|
||||
* @property \PayPal\Api\Address billing_address
|
||||
*/
|
||||
class PayerInfo extends PayPalModel
|
||||
{
|
||||
@@ -34,7 +34,7 @@ class PayerInfo extends PayPalModel
|
||||
* Email address representing the payer. 127 characters max.
|
||||
*
|
||||
* @param string $email
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setEmail($email)
|
||||
@@ -57,7 +57,7 @@ class PayerInfo extends PayPalModel
|
||||
* External Remember Me id representing the payer
|
||||
*
|
||||
* @param string $external_remember_me_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setExternalRememberMeId($external_remember_me_id)
|
||||
@@ -79,7 +79,7 @@ class PayerInfo extends PayPalModel
|
||||
/**
|
||||
* Account Number representing the Payer
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @deprecated Use #setBuyerAccountNumberInstead
|
||||
* @param string $account_number
|
||||
*
|
||||
* @return $this
|
||||
@@ -93,6 +93,8 @@ class PayerInfo extends PayPalModel
|
||||
/**
|
||||
* Account Number representing the Payer
|
||||
*
|
||||
* @deprecated Use #getBuyerAccountNumberInstead
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
@@ -101,11 +103,34 @@ class PayerInfo extends PayPalModel
|
||||
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.
|
||||
*
|
||||
* @param string $salutation
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSalutation($salutation)
|
||||
@@ -128,7 +153,7 @@ class PayerInfo extends PayPalModel
|
||||
* First name of the payer.
|
||||
*
|
||||
* @param string $first_name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFirstName($first_name)
|
||||
@@ -151,7 +176,7 @@ class PayerInfo extends PayPalModel
|
||||
* Middle name of the payer.
|
||||
*
|
||||
* @param string $middle_name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMiddleName($middle_name)
|
||||
@@ -174,7 +199,7 @@ class PayerInfo extends PayPalModel
|
||||
* Last name of the payer.
|
||||
*
|
||||
* @param string $last_name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLastName($last_name)
|
||||
@@ -197,7 +222,7 @@ class PayerInfo extends PayPalModel
|
||||
* Suffix of the payer.
|
||||
*
|
||||
* @param string $suffix
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSuffix($suffix)
|
||||
@@ -220,7 +245,7 @@ class PayerInfo extends PayPalModel
|
||||
* PayPal assigned encrypted Payer ID.
|
||||
*
|
||||
* @param string $payer_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPayerId($payer_id)
|
||||
@@ -243,7 +268,7 @@ class PayerInfo extends PayPalModel
|
||||
* Phone number representing the payer. 20 characters max.
|
||||
*
|
||||
* @param string $phone
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPhone($phone)
|
||||
@@ -267,7 +292,7 @@ class PayerInfo extends PayPalModel
|
||||
* Valid Values: ["HOME", "WORK", "MOBILE", "OTHER"]
|
||||
*
|
||||
* @param string $phone_type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPhoneType($phone_type)
|
||||
@@ -290,7 +315,7 @@ class PayerInfo extends PayPalModel
|
||||
* Birth date of the Payer in ISO8601 format (yyyy-mm-dd).
|
||||
*
|
||||
* @param string $birth_date
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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`.
|
||||
*
|
||||
* @param string $tax_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTaxId($tax_id)
|
||||
@@ -337,7 +362,7 @@ class PayerInfo extends PayPalModel
|
||||
* Valid Values: ["BR_CPF", "BR_CNPJ"]
|
||||
*
|
||||
* @param string $tax_id_type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string $country_code
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCountryCode($country_code)
|
||||
@@ -383,7 +408,7 @@ class PayerInfo extends PayPalModel
|
||||
* Billing address of the Payer.
|
||||
*
|
||||
* @param \PayPal\Api\Address $billing_address
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
|
||||
@@ -4,9 +4,8 @@ namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Core\PayPalConstants;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* Class Payment
|
||||
@@ -15,30 +14,27 @@ use PayPal\Validation\ArgumentValidator;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string id
|
||||
* @property string intent
|
||||
* @property \PayPal\Api\Payer payer
|
||||
* @property \PayPal\Api\PotentialPayerInfo potential_payer_info
|
||||
* @property \PayPal\Api\Payee payee
|
||||
* @property \PayPal\Api\Transaction[] transactions
|
||||
* @property string[] billing_agreement_tokens
|
||||
* @property \PayPal\Api\PaymentInstruction payment_instruction
|
||||
* @property string state
|
||||
* @property string experience_profile_id
|
||||
* @property string note_to_payer
|
||||
* @property \PayPal\Api\RedirectUrls redirect_urls
|
||||
* @property string failure_reason
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property \PayPal\Api\Links[] links
|
||||
* @property string id
|
||||
* @property string intent
|
||||
* @property \PayPal\Api\Payer payer
|
||||
* @property \PayPal\Api\Transaction[] transactions
|
||||
* @property string state
|
||||
* @property string experience_profile_id
|
||||
* @property string note_to_payer
|
||||
* @property \PayPal\Api\Payee $payee
|
||||
* @property \PayPal\Api\RedirectUrls redirect_urls
|
||||
* @property string failure_reason
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property \PayPal\Api\Links[] links
|
||||
*/
|
||||
class Payment extends PayPalResourceModel
|
||||
{
|
||||
/**
|
||||
* ID of the created payment, the 'transaction ID'
|
||||
* Identifier of the payment resource created.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -62,7 +58,7 @@ class Payment extends PayPalResourceModel
|
||||
* Valid Values: ["sale", "authorize", "order"]
|
||||
*
|
||||
* @param string $intent
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param \PayPal\Api\Payer $payer
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\PotentialPayerInfo $potential_payer_info
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\PotentialPayerInfo
|
||||
*/
|
||||
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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
public function getPayee()
|
||||
@@ -152,10 +146,9 @@ class Payment extends PayPalResourceModel
|
||||
|
||||
/**
|
||||
* ID of the cart to execute the payment.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $cart
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCart($cart)
|
||||
@@ -166,7 +159,6 @@ class Payment extends PayPalResourceModel
|
||||
|
||||
/**
|
||||
* ID of the cart to execute the payment.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
@@ -179,7 +171,7 @@ class Payment extends PayPalResourceModel
|
||||
* Transactional details including the amount and item details.
|
||||
*
|
||||
* @param \PayPal\Api\Transaction[] $transactions
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\Error[] $failed_transactions
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\Error[]
|
||||
*/
|
||||
@@ -255,7 +245,6 @@ class Payment extends PayPalResourceModel
|
||||
|
||||
/**
|
||||
* Append FailedTransactions to the list.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\Error $error
|
||||
* @return $this
|
||||
@@ -273,7 +262,6 @@ class Payment extends PayPalResourceModel
|
||||
|
||||
/**
|
||||
* Remove FailedTransactions from the list.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\Error $error
|
||||
* @return $this
|
||||
@@ -287,9 +275,9 @@ class Payment extends PayPalResourceModel
|
||||
|
||||
/**
|
||||
* Collection of PayPal generated billing agreement tokens.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string[] $billing_agreement_tokens
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBillingAgreementTokens($billing_agreement_tokens)
|
||||
@@ -300,7 +288,7 @@ class Payment extends PayPalResourceModel
|
||||
|
||||
/**
|
||||
* Collection of PayPal generated billing agreement tokens.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string[]
|
||||
*/
|
||||
public function getBillingAgreementTokens()
|
||||
@@ -310,7 +298,7 @@ class Payment extends PayPalResourceModel
|
||||
|
||||
/**
|
||||
* Append BillingAgreementTokens to the list.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $billingAgreementToken
|
||||
* @return $this
|
||||
*/
|
||||
@@ -327,7 +315,7 @@ class Payment extends PayPalResourceModel
|
||||
|
||||
/**
|
||||
* Remove BillingAgreementTokens from the list.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $billingAgreementToken
|
||||
* @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
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\CreditFinancingOffered $credit_financing_offered
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\CreditFinancingOffered
|
||||
*/
|
||||
@@ -365,9 +351,9 @@ class Payment extends PayPalResourceModel
|
||||
|
||||
/**
|
||||
* Instructions for the payer to complete this payment.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\PaymentInstruction $payment_instruction
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPaymentInstruction($payment_instruction)
|
||||
@@ -378,7 +364,7 @@ class Payment extends PayPalResourceModel
|
||||
|
||||
/**
|
||||
* Instructions for the payer to complete this payment.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\PaymentInstruction
|
||||
*/
|
||||
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"]
|
||||
*
|
||||
* @param string $state
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -437,7 +423,7 @@ class Payment extends PayPalResourceModel
|
||||
* free-form field for the use of clients to pass in a message to the payer
|
||||
*
|
||||
* @param string $note_to_payer
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param \PayPal\Api\RedirectUrls $redirect_urls
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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"]
|
||||
*
|
||||
* @param string $failure_reason
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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).
|
||||
*
|
||||
* @param string $create_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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).
|
||||
*
|
||||
* @param string $update_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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 PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||
* @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 Payment
|
||||
*/
|
||||
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 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 string $paymentId
|
||||
* @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 Payment
|
||||
*/
|
||||
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 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 PatchRequest $patchRequest
|
||||
* @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 boolean
|
||||
*/
|
||||
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 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 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 Payment
|
||||
*/
|
||||
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 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 array $params
|
||||
* @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 PaymentHistory
|
||||
*/
|
||||
public static function all($params, $apiContext = null, $restCall = null)
|
||||
@@ -668,14 +654,14 @@ class Payment extends PayPalResourceModel
|
||||
ArgumentValidator::validate($params, 'params');
|
||||
$payLoad = "";
|
||||
$allowedParams = array(
|
||||
'count' => 1,
|
||||
'start_id' => 1,
|
||||
'start_index' => 1,
|
||||
'start_time' => 1,
|
||||
'end_time' => 1,
|
||||
'payee_id' => 1,
|
||||
'sort_by' => 1,
|
||||
'sort_order' => 1,
|
||||
'count' => 1,
|
||||
'start_id' => 1,
|
||||
'start_index' => 1,
|
||||
'start_time' => 1,
|
||||
'end_time' => 1,
|
||||
'payee_id' => 1,
|
||||
'sort_by' => 1,
|
||||
'sort_order' => 1,
|
||||
);
|
||||
$json = self::executeCall(
|
||||
"/v1/payments/payment?" . http_build_query(array_intersect_key($params, $allowedParams)),
|
||||
|
||||
@@ -7,35 +7,36 @@ use PayPal\Common\PayPalModel;
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* @property string id
|
||||
* @property string number
|
||||
* @property string type
|
||||
* @property string expire_month
|
||||
* @property string expire_year
|
||||
* @property string start_month
|
||||
* @property string start_year
|
||||
* @property string cvv2
|
||||
* @property string first_name
|
||||
* @property string last_name
|
||||
* @property string billing_country
|
||||
* @property string id
|
||||
* @property string number
|
||||
* @property string type
|
||||
* @property string expire_month
|
||||
* @property string expire_year
|
||||
* @property string start_month
|
||||
* @property string start_year
|
||||
* @property string cvv2
|
||||
* @property string first_name
|
||||
* @property string last_name
|
||||
* @property string billing_country
|
||||
* @property \PayPal\Api\Address billing_address
|
||||
* @property string external_customer_id
|
||||
* @property string status
|
||||
* @property string valid_until
|
||||
* @property string issue_number
|
||||
* @property string external_customer_id
|
||||
* @property string status
|
||||
* @property string card_product_class
|
||||
* @property string valid_until
|
||||
* @property string issue_number
|
||||
* @property \PayPal\Api\Links[] links
|
||||
*/
|
||||
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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -55,10 +56,10 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Card number.
|
||||
* The card number.
|
||||
*
|
||||
* @param string $number
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setNumber($number)
|
||||
@@ -68,7 +69,7 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Card number.
|
||||
* The card number.
|
||||
*
|
||||
* @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"]
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
@@ -92,7 +93,7 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of the Card.
|
||||
* The card type.
|
||||
*
|
||||
* @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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -217,10 +218,10 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Card holder's first name.
|
||||
* The first name of the card holder.
|
||||
*
|
||||
* @param string $first_name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -240,10 +241,10 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Card holder's last name.
|
||||
* The last name of the card holder.
|
||||
*
|
||||
* @param string $last_name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -263,10 +264,10 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* 2 letter country code
|
||||
* The two-letter country code.
|
||||
*
|
||||
* @param string $billing_country
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBillingCountry($billing_country)
|
||||
@@ -276,7 +277,7 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* 2 letter country code
|
||||
* The two-letter country code.
|
||||
*
|
||||
* @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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -332,11 +333,11 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* State of the funding instrument.
|
||||
* The state of the funding instrument.
|
||||
* Valid Values: ["EXPIRED", "ACTIVE"]
|
||||
*
|
||||
* @param string $status
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -405,7 +430,7 @@ class PaymentCard extends PayPalModel
|
||||
* Sets Links
|
||||
*
|
||||
* @param \PayPal\Api\Links[] $links
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
|
||||
@@ -11,8 +11,7 @@ use PayPal\Common\PayPalModel;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string payer_id
|
||||
* @property string carrier_account_id
|
||||
* @property string payer_id
|
||||
* @property \PayPal\Api\Transaction[] transactions
|
||||
*/
|
||||
class PaymentExecution extends PayPalModel
|
||||
@@ -21,7 +20,7 @@ class PaymentExecution extends PayPalModel
|
||||
* The ID of the Payer, passed in the `return_url` by PayPal.
|
||||
*
|
||||
* @param string $payer_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $carrier_account_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
public function getCarrierAccountId()
|
||||
@@ -67,7 +66,7 @@ class PaymentExecution extends PayPalModel
|
||||
* Transactional details including the amount and item details.
|
||||
*
|
||||
* @param \PayPal\Api\Transaction[] $transactions
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -16,11 +16,11 @@ use PayPal\Common\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"]
|
||||
*
|
||||
* @param string $allowed_payment_method
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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`
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param bool $recurring_flag
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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`
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @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`
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param bool $skip_fmf
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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`
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@ use PayPal\Common\PayPalModel;
|
||||
/**
|
||||
* Class Phone
|
||||
*
|
||||
* Representation of a phone number.
|
||||
* Information related to the Payee.
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
@@ -18,7 +18,7 @@ use PayPal\Common\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
|
||||
*
|
||||
@@ -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
|
||||
*/
|
||||
@@ -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
|
||||
*
|
||||
@@ -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
|
||||
*/
|
||||
@@ -67,7 +67,7 @@ class Phone extends PayPalModel
|
||||
* Phone extension
|
||||
*
|
||||
* @param string $extension
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setExtension($extension)
|
||||
|
||||
@@ -11,15 +11,12 @@ use PayPal\Common\PayPalModel;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string email
|
||||
* @property string external_remember_me_id
|
||||
* @property \PayPal\Api\Address billing_address
|
||||
*/
|
||||
class PotentialPayerInfo extends PayPalModel
|
||||
{
|
||||
/**
|
||||
* Email address representing the potential payer.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $email
|
||||
*
|
||||
* @return $this
|
||||
@@ -32,7 +29,7 @@ class PotentialPayerInfo extends PayPalModel
|
||||
|
||||
/**
|
||||
* Email address representing the potential payer.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
public function getEmail()
|
||||
@@ -42,7 +39,7 @@ class PotentialPayerInfo extends PayPalModel
|
||||
|
||||
/**
|
||||
* ExternalRememberMe id representing the potential payer
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $external_remember_me_id
|
||||
*
|
||||
* @return $this
|
||||
@@ -55,7 +52,7 @@ class PotentialPayerInfo extends PayPalModel
|
||||
|
||||
/**
|
||||
* ExternalRememberMe id representing the potential payer
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
public function getExternalRememberMeId()
|
||||
@@ -88,7 +85,7 @@ class PotentialPayerInfo extends PayPalModel
|
||||
|
||||
/**
|
||||
* Billing address of the potential payer.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param \PayPal\Api\Address $billing_address
|
||||
*
|
||||
* @return $this
|
||||
@@ -101,7 +98,7 @@ class PotentialPayerInfo extends PayPalModel
|
||||
|
||||
/**
|
||||
* Billing address of the potential payer.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return \PayPal\Api\Address
|
||||
*/
|
||||
public function getBillingAddress()
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* Class Refund
|
||||
@@ -13,16 +13,18 @@ use PayPal\Validation\ArgumentValidator;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string id
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property string state
|
||||
* @property string reason
|
||||
* @property string sale_id
|
||||
* @property string capture_id
|
||||
* @property string parent_payment
|
||||
* @property string description
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property string id
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property string state
|
||||
* @property string reason
|
||||
* @property string invoice_number
|
||||
* @property string sale_id
|
||||
* @property string capture_id
|
||||
* @property string parent_payment
|
||||
* @property string description
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property string reason_code
|
||||
* @property \PayPal\Api\Links[] links
|
||||
*/
|
||||
class Refund extends PayPalResourceModel
|
||||
@@ -31,7 +33,7 @@ class Refund extends PayPalResourceModel
|
||||
* ID of the refund transaction. 17 characters max.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param \PayPal\Api\Amount $amount
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAmount($amount)
|
||||
@@ -78,7 +80,7 @@ class Refund extends PayPalResourceModel
|
||||
* Valid Values: ["pending", "completed", "failed"]
|
||||
*
|
||||
* @param string $state
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setState($state)
|
||||
@@ -101,7 +103,7 @@ class Refund extends PayPalResourceModel
|
||||
* Reason description for the Sale transaction being refunded.
|
||||
*
|
||||
* @param string $reason
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -147,7 +172,7 @@ class Refund extends PayPalResourceModel
|
||||
* ID of the sale transaction being refunded.
|
||||
*
|
||||
* @param string $capture_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCaptureId($capture_id)
|
||||
@@ -170,7 +195,7 @@ class Refund extends PayPalResourceModel
|
||||
* ID of the payment resource on which this transaction is based.
|
||||
*
|
||||
* @param string $parent_payment
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setParentPayment($parent_payment)
|
||||
@@ -193,7 +218,7 @@ class Refund extends PayPalResourceModel
|
||||
* Description of what is being refunded for.
|
||||
*
|
||||
* @param string $description
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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).
|
||||
*
|
||||
* @param string $create_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreateTime($create_time)
|
||||
@@ -239,7 +264,7 @@ class Refund extends PayPalResourceModel
|
||||
* Time that the resource was last updated.
|
||||
*
|
||||
* @param string $update_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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 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 string $reason_code
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @property \PayPal\Api\Sale sale
|
||||
* @property \PayPal\Api\Sale sale
|
||||
* @property \PayPal\Api\Authorization authorization
|
||||
* @property \PayPal\Api\Order order
|
||||
* @property \PayPal\Api\Capture capture
|
||||
* @property \PayPal\Api\Refund refund
|
||||
* @property \PayPal\Api\Order order
|
||||
* @property \PayPal\Api\Capture capture
|
||||
* @property \PayPal\Api\Refund refund
|
||||
*/
|
||||
class RelatedResources extends PayPalModel
|
||||
{
|
||||
@@ -23,7 +23,7 @@ class RelatedResources extends PayPalModel
|
||||
* Sale transaction
|
||||
*
|
||||
* @param \PayPal\Api\Sale $sale
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSale($sale)
|
||||
@@ -46,7 +46,7 @@ class RelatedResources extends PayPalModel
|
||||
* Authorization transaction
|
||||
*
|
||||
* @param \PayPal\Api\Authorization $authorization
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAuthorization($authorization)
|
||||
@@ -69,7 +69,7 @@ class RelatedResources extends PayPalModel
|
||||
* Order transaction
|
||||
*
|
||||
* @param \PayPal\Api\Order $order
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrder($order)
|
||||
@@ -92,7 +92,7 @@ class RelatedResources extends PayPalModel
|
||||
* Capture transaction
|
||||
*
|
||||
* @param \PayPal\Api\Capture $capture
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCapture($capture)
|
||||
@@ -115,7 +115,7 @@ class RelatedResources extends PayPalModel
|
||||
* Refund transaction
|
||||
*
|
||||
* @param \PayPal\Api\Refund $refund
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRefund($refund)
|
||||
|
||||
@@ -3,46 +3,46 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* @property string id
|
||||
* @property string purchase_unit_reference_id
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property string payment_mode
|
||||
* @property string state
|
||||
* @property string reason_code
|
||||
* @property string protection_eligibility
|
||||
* @property string protection_eligibility_type
|
||||
* @property string clearing_time
|
||||
* @property string payment_hold_status
|
||||
* @property string[] payment_hold_reasons
|
||||
* @property \PayPal\Api\Currency transaction_fee
|
||||
* @property \PayPal\Api\Currency receivable_amount
|
||||
* @property string exchange_rate
|
||||
* @property \PayPal\Api\FmfDetails fmf_details
|
||||
* @property string receipt_id
|
||||
* @property string parent_payment
|
||||
* @property string id
|
||||
* @property string purchase_unit_reference_id
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property string payment_mode
|
||||
* @property string state
|
||||
* @property string reason_code
|
||||
* @property string protection_eligibility
|
||||
* @property string protection_eligibility_type
|
||||
* @property string clearing_time
|
||||
* @property string payment_hold_status
|
||||
* @property string[] payment_hold_reasons
|
||||
* @property \PayPal\Api\Currency transaction_fee
|
||||
* @property \PayPal\Api\Currency receivable_amount
|
||||
* @property string exchange_rate
|
||||
* @property \PayPal\Api\FmfDetails fmf_details
|
||||
* @property string receipt_id
|
||||
* @property string parent_payment
|
||||
* @property \PayPal\Api\ProcessorResponse processor_response
|
||||
* @property string billing_agreement_id
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property \PayPal\Api\Links[] links
|
||||
* @property string billing_agreement_id
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property \PayPal\Api\Links[] links
|
||||
*/
|
||||
class Sale extends PayPalResourceModel
|
||||
{
|
||||
/**
|
||||
* ID of the sale transaction.
|
||||
* Identifier of the sale transaction.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
@@ -52,7 +52,7 @@ class Sale extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* ID of the sale transaction.
|
||||
* Identifier of the sale transaction.
|
||||
*
|
||||
* @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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ class Sale extends PayPalResourceModel
|
||||
* Amount being collected.
|
||||
*
|
||||
* @param \PayPal\Api\Amount $amount
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAmount($amount)
|
||||
@@ -112,7 +112,7 @@ class Sale extends PayPalResourceModel
|
||||
* Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
|
||||
*
|
||||
* @param string $payment_mode
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPaymentMode($payment_mode)
|
||||
@@ -132,11 +132,11 @@ class Sale extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* State of the sale.
|
||||
* Valid Values: ["completed", "partially_refunded", "pending", "refunded"]
|
||||
* State of the sale transaction.
|
||||
* Valid Values: ["completed", "partially_refunded", "pending", "refunded", "denied"]
|
||||
*
|
||||
* @param string $state
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setState($state)
|
||||
@@ -146,7 +146,7 @@ class Sale extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* State of the sale.
|
||||
* State of the sale transaction.
|
||||
*
|
||||
* @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`.
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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"]
|
||||
*
|
||||
* @param string $protection_eligibility
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -208,7 +208,7 @@ class Sale extends PayPalResourceModel
|
||||
* Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"]
|
||||
*
|
||||
* @param string $protection_eligibility_type
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -255,7 +255,7 @@ class Sale extends PayPalResourceModel
|
||||
* Valid Values: ["HELD"]
|
||||
*
|
||||
* @param string $payment_hold_status
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @param string[] $payment_hold_reasons
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -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.
|
||||
*
|
||||
* @param \PayPal\Api\Currency $receivable_amount
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string $exchange_rate
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param \PayPal\Api\FmfDetails $fmf_details
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string $receipt_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setReceiptId($receipt_id)
|
||||
@@ -446,7 +446,7 @@ class Sale extends PayPalResourceModel
|
||||
* ID of the payment resource on which this transaction is based.
|
||||
*
|
||||
* @param string $parent_payment
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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`.
|
||||
*
|
||||
* @param \PayPal\Api\ProcessorResponse $processor_response
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param string $billing_agreement_id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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)
|
||||
*
|
||||
* @param string $create_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreateTime($create_time)
|
||||
@@ -538,7 +538,7 @@ class Sale extends PayPalResourceModel
|
||||
* Time the resource was last updated in UTC ISO8601 format.
|
||||
*
|
||||
* @param string $update_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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 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 string $saleId
|
||||
* @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 Sale
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @deprecated Please use #refundSale instead.
|
||||
* @param Refund $refund
|
||||
* @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
|
||||
@@ -608,4 +609,29 @@ class Sale extends PayPalResourceModel
|
||||
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
|
||||
*
|
||||
* @property string id
|
||||
* @property string recipient_name
|
||||
* @property bool default_address
|
||||
* @property bool preferred_address
|
||||
*/
|
||||
class ShippingAddress extends Address
|
||||
{
|
||||
/**
|
||||
* Address ID assigned in PayPal system.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
@@ -31,7 +28,7 @@ class ShippingAddress extends Address
|
||||
|
||||
/**
|
||||
* Address ID assigned in PayPal system.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
public function getId()
|
||||
@@ -43,7 +40,7 @@ class ShippingAddress extends Address
|
||||
* Name of the recipient at this address.
|
||||
*
|
||||
* @param string $recipient_name
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRecipientName($recipient_name)
|
||||
@@ -64,9 +61,9 @@ class ShippingAddress extends Address
|
||||
|
||||
/**
|
||||
* Default shipping address of the Payer.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param bool $default_address
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDefaultAddress($default_address)
|
||||
@@ -77,7 +74,7 @@ class ShippingAddress extends Address
|
||||
|
||||
/**
|
||||
* Default shipping address of the Payer.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return bool
|
||||
*/
|
||||
public function getDefaultAddress()
|
||||
@@ -87,9 +84,9 @@ class ShippingAddress extends Address
|
||||
|
||||
/**
|
||||
* Shipping Address marked as preferred by Payer.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param bool $preferred_address
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPreferredAddress($preferred_address)
|
||||
@@ -100,7 +97,7 @@ class ShippingAddress extends Address
|
||||
|
||||
/**
|
||||
* Shipping Address marked as preferred by Payer.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return bool
|
||||
*/
|
||||
public function getPreferredAddress()
|
||||
|
||||
@@ -40,7 +40,7 @@ class Transaction extends TransactionBase
|
||||
* Identifier to the purchase unit corresponding to this sale transaction
|
||||
*
|
||||
* @param string $purchase_unit_reference_id
|
||||
*
|
||||
* @deprecated Use #setReferenceId instead
|
||||
* @return $this
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @deprecated Use #getReferenceId instead
|
||||
* @return string
|
||||
*/
|
||||
public function getPurchaseUnitReferenceId()
|
||||
|
||||
Reference in New Issue
Block a user