forked from LiveCarta/PayPal-PHP-SDK
Payments API Updates
This commit is contained in:
@@ -4,7 +4,6 @@ namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PayPalResourceModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
use PayPal\Transport\PayPalRestCall;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
|
||||
/**
|
||||
@@ -14,29 +13,29 @@ use PayPal\Validation\ArgumentValidator;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string id
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @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 clearing_time
|
||||
* @property string valid_until
|
||||
* @property \PayPal\Api\Links links
|
||||
* @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
|
||||
*/
|
||||
class Authorization extends PayPalResourceModel
|
||||
{
|
||||
/**
|
||||
* Identifier of the authorization transaction.
|
||||
* ID of the authorization transaction.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
@@ -46,7 +45,7 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifier of the authorization transaction.
|
||||
* ID of the authorization transaction.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -56,10 +55,10 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Amount being authorized for.
|
||||
* Amount being authorized.
|
||||
*
|
||||
* @param \PayPal\Api\Amount $amount
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAmount($amount)
|
||||
@@ -69,7 +68,7 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Amount being authorized for.
|
||||
* Amount being authorized.
|
||||
*
|
||||
* @return \PayPal\Api\Amount
|
||||
*/
|
||||
@@ -79,11 +78,11 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* specifies payment mode of the transaction
|
||||
* Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
|
||||
* Specifies the payment mode of the transaction.
|
||||
* Valid Values: ["INSTANT_TRANSFER"]
|
||||
*
|
||||
* @param string $payment_mode
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPaymentMode($payment_mode)
|
||||
@@ -93,7 +92,7 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* specifies payment mode of the transaction
|
||||
* Specifies the payment mode of the transaction.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -103,11 +102,11 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* State of the authorization transaction.
|
||||
* State of the authorization.
|
||||
* Valid Values: ["pending", "authorized", "partially_captured", "captured", "expired", "voided"]
|
||||
*
|
||||
* @param string $state
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setState($state)
|
||||
@@ -117,7 +116,7 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* State of the authorization transaction.
|
||||
* State of the authorization.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -127,11 +126,11 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason code for the transaction state being Pending. This field will replace pending_reason field eventually
|
||||
* Reason code, `AUTHORIZATION`, for a transaction state of `pending`.
|
||||
* Valid Values: ["AUTHORIZATION"]
|
||||
*
|
||||
* @param string $reason_code
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setReasonCode($reason_code)
|
||||
@@ -141,7 +140,7 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason code for the transaction state being Pending. This field will replace pending_reason field eventually
|
||||
* Reason code, `AUTHORIZATION`, for a transaction state of `pending`.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -153,9 +152,9 @@ class Authorization extends PayPalResourceModel
|
||||
/**
|
||||
* [DEPRECATED] Reason code for the transaction state being Pending.Obsolete. use reason_code field instead.
|
||||
* Valid Values: ["AUTHORIZATION"]
|
||||
* @deprecated Plese Use setReasonCode instead
|
||||
*
|
||||
* @param string $pending_reason
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPendingReason($pending_reason)
|
||||
@@ -165,8 +164,8 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* [DEPRECATED] Reason code for the transaction state being Pending.Obsolete. use reason_code field instead.
|
||||
* @deprecated Plese Use setReasonCode instead
|
||||
* @deprecated [DEPRECATED] Reason code for the transaction state being Pending.Obsolete. use reason_code field instead.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPendingReason()
|
||||
@@ -175,11 +174,11 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Protection Eligibility of the Payer
|
||||
* The level of seller protection in force for the transaction. Only supported when the `payment_method` is set to `paypal`. Allowed values:<br> `ELIGIBLE`- Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received.<br> `PARTIALLY_ELIGIBLE`- Merchant is protected by PayPal's Seller Protection Policy for Item Not Received or Unauthorized Payments. Refer to `protection_eligibility_type` for specifics. <br> `INELIGIBLE`- Merchant is not protected under the Seller Protection Policy.
|
||||
* Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
|
||||
*
|
||||
* @param string $protection_eligibility
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setProtectionEligibility($protection_eligibility)
|
||||
@@ -189,7 +188,7 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Protection Eligibility of the Payer
|
||||
* The level of seller protection in force for the transaction. Only supported when the `payment_method` is set to `paypal`. Allowed values:<br> `ELIGIBLE`- Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received.<br> `PARTIALLY_ELIGIBLE`- Merchant is protected by PayPal's Seller Protection Policy for Item Not Received or Unauthorized Payments. Refer to `protection_eligibility_type` for specifics. <br> `INELIGIBLE`- Merchant is not protected under the Seller Protection Policy.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -199,11 +198,11 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Protection Eligibility Type of the Payer
|
||||
* Valid Values: ["ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE", "INELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE"]
|
||||
* The kind of seller protection in force for the transaction. This property is returned only when the `protection_eligibility` property is set to `ELIGIBLE`or `PARTIALLY_ELIGIBLE`. Only supported when the `payment_method` is set to `paypal`. Allowed values:<br> `ITEM_NOT_RECEIVED_ELIGIBLE`- Sellers are protected against claims for items not received.<br> `UNAUTHORIZED_PAYMENT_ELIGIBLE`- Sellers are protected against claims for unauthorized payments.<br> One or both of the allowed values can be returned.
|
||||
* 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)
|
||||
@@ -213,7 +212,7 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Protection Eligibility Type of the Payer
|
||||
* The kind of seller protection in force for the transaction. This property is returned only when the `protection_eligibility` property is set to `ELIGIBLE`or `PARTIALLY_ELIGIBLE`. Only supported when the `payment_method` is set to `paypal`. Allowed values:<br> `ITEM_NOT_RECEIVED_ELIGIBLE`- Sellers are protected against claims for items not received.<br> `UNAUTHORIZED_PAYMENT_ELIGIBLE`- Sellers are protected against claims for unauthorized payments.<br> One or both of the allowed values can be returned.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -223,10 +222,10 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.
|
||||
* Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, 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)
|
||||
@@ -236,7 +235,7 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.
|
||||
* Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, 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.
|
||||
*
|
||||
* @return \PayPal\Api\FmfDetails
|
||||
*/
|
||||
@@ -249,7 +248,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)
|
||||
@@ -269,34 +268,33 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Expected clearing time for eCheck Transactions
|
||||
* Response codes returned by the processor concerning the submitted payment. Only supported when the `payment_method` is set to `credit_card`.
|
||||
*
|
||||
*
|
||||
* @param string $clearing_time
|
||||
* @param \PayPal\Api\ProcessorResponse $processor_response
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setClearingTime($clearing_time)
|
||||
public function setProcessorResponse($processor_response)
|
||||
{
|
||||
$this->clearing_time = $clearing_time;
|
||||
$this->processor_response = $processor_response;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expected clearing time for eCheck Transactions
|
||||
* Response codes returned by the processor concerning the submitted payment. Only supported when the `payment_method` is set to `credit_card`.
|
||||
*
|
||||
* @return string
|
||||
* @return \PayPal\Api\ProcessorResponse
|
||||
*/
|
||||
public function getClearingTime()
|
||||
public function getProcessorResponse()
|
||||
{
|
||||
return $this->clearing_time;
|
||||
return $this->processor_response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Date/Time until which funds may be captured against this resource in UTC ISO8601 format.
|
||||
* 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)
|
||||
@@ -306,7 +304,7 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Date/Time until which funds may be captured against this resource in UTC ISO8601 format.
|
||||
* Authorization expiration time and date as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -316,10 +314,10 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was created in UTC ISO8601 format.
|
||||
* 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)
|
||||
@@ -329,7 +327,7 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was created in UTC ISO8601 format.
|
||||
* Time of authorization as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -339,10 +337,10 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was last updated in UTC ISO8601 format.
|
||||
* Time that the resource was last updated.
|
||||
*
|
||||
* @param string $update_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUpdateTime($update_time)
|
||||
@@ -352,7 +350,7 @@ class Authorization extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was last updated in UTC ISO8601 format.
|
||||
* Time that the resource was last updated.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -364,9 +362,9 @@ class Authorization extends PayPalResourceModel
|
||||
/**
|
||||
* Retrieve details about a previously created authorization by passing the authorization_id in the request URI.
|
||||
*
|
||||
* @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 $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)
|
||||
@@ -389,9 +387,9 @@ 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.
|
||||
*
|
||||
* @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)
|
||||
@@ -415,8 +413,8 @@ 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.
|
||||
*
|
||||
* @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)
|
||||
@@ -436,10 +434,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.
|
||||
* 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
|
||||
*
|
||||
* @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)
|
||||
|
||||
Reference in New Issue
Block a user