Open Monograph Press
3.3.0
|
Data Fields | |
const | API_VERSION = 'v1' |
Protected Member Functions | |
createResponse ($data, $statusCode) | |
createResponse ($data, $statusCode) | |
getEndpoint () | |
getEndpoint () | |
getHttpMethod () | |
getHttpMethod () | |
![]() | |
getCurrencies () | |
getParameter ($key) | |
setParameter ($key, $value) | |
setParameter ($key, $value) | |
Protected Attributes | |
$liveEndpoint = 'https://api.paypal.com' | |
$payerId = null | |
$testEndpoint = 'https://api.sandbox.paypal.com' | |
![]() | |
$currencies | |
$httpClient | |
$httpRequest | |
$negativeAmountAllowed = false | |
$parameters | |
$response | |
$zeroAmountAllowed = true | |
This class forms the base class for PayPal REST requests via the PayPal REST APIs.
A complete REST operation is formed by combining an HTTP method (or “verb”) with the full URI to the resource you’re addressing. For example, here is the operation to create a new payment:
POST https://api.paypal.com/v1/payments/payment
To create a complete request, combine the operation with the appropriate HTTP headers and any required JSON payload.
https://devtools-paypal.com/integrationwizard/ http://paypal.github.io/sdk/ Omnipay
Definition at line 31 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
|
protected |
Reimplemented in Omnipay\PayPal\Message\RestCreateSubscriptionRequest, Omnipay\PayPal\Message\RestCreateSubscriptionRequest, Omnipay\PayPal\Message\RestAuthorizeRequest, and Omnipay\PayPal\Message\RestAuthorizeRequest.
Definition at line 194 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
|
protected |
Reimplemented in Omnipay\PayPal\Message\RestCreateSubscriptionRequest, Omnipay\PayPal\Message\RestCreateSubscriptionRequest, Omnipay\PayPal\Message\RestAuthorizeRequest, and Omnipay\PayPal\Message\RestAuthorizeRequest.
Definition at line 210 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
Referenced by Omnipay\PayPal\Message\AbstractRestRequest\sendData().
Omnipay\PayPal\Message\AbstractRestRequest::getClientId | ( | ) |
Definition at line 74 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
Referenced by Omnipay\PayPal\Message\RestTokenRequest\sendData().
Omnipay\PayPal\Message\AbstractRestRequest::getClientId | ( | ) |
Definition at line 74 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
|
protected |
Reimplemented in Omnipay\PayPal\Message\RestCreateSubscriptionRequest, Omnipay\PayPal\Message\RestCreateSubscriptionRequest, Omnipay\PayPal\Message\RestAuthorizeRequest, Omnipay\PayPal\Message\RestAuthorizeRequest, Omnipay\PayPal\Message\RestCreatePlanRequest, Omnipay\PayPal\Message\RestCreatePlanRequest, Omnipay\PayPal\Message\RestListPurchaseRequest, Omnipay\PayPal\Message\RestListPurchaseRequest, Omnipay\PayPal\Message\RestListPlanRequest, Omnipay\PayPal\Message\RestListPlanRequest, Omnipay\PayPal\Message\RestSearchTransactionRequest, Omnipay\PayPal\Message\RestSearchTransactionRequest, Omnipay\PayPal\Message\RestUpdatePlanRequest, Omnipay\PayPal\Message\RestUpdatePlanRequest, Omnipay\PayPal\Message\RestCompleteSubscriptionRequest, Omnipay\PayPal\Message\RestCompleteSubscriptionRequest, Omnipay\PayPal\Message\RestCreateCardRequest, Omnipay\PayPal\Message\RestCreateCardRequest, Omnipay\PayPal\Message\RestCancelSubscriptionRequest, Omnipay\PayPal\Message\RestReactivateSubscriptionRequest, Omnipay\PayPal\Message\RestSuspendSubscriptionRequest, Omnipay\PayPal\Message\RestCancelSubscriptionRequest, Omnipay\PayPal\Message\RestReactivateSubscriptionRequest, Omnipay\PayPal\Message\RestSuspendSubscriptionRequest, Omnipay\PayPal\Message\RestRefundRequest, Omnipay\PayPal\Message\RestRefundRequest, Omnipay\PayPal\Message\RestCompletePurchaseRequest, Omnipay\PayPal\Message\RestCompletePurchaseRequest, Omnipay\PayPal\Message\RestDeleteCardRequest, Omnipay\PayPal\Message\RestDeleteCardRequest, Omnipay\PayPal\Message\RestCaptureRequest, Omnipay\PayPal\Message\RestCaptureRequest, Omnipay\PayPal\Message\RestFetchTransactionRequest, Omnipay\PayPal\Message\RestFetchTransactionRequest, Omnipay\PayPal\Message\RestFetchPurchaseRequest, Omnipay\PayPal\Message\RestFetchPurchaseRequest, Omnipay\PayPal\Message\RestRefundCaptureRequest, Omnipay\PayPal\Message\RestRefundCaptureRequest, Omnipay\PayPal\Message\RestTokenRequest, Omnipay\PayPal\Message\RestTokenRequest, Omnipay\PayPal\Message\RestVoidRequest, and Omnipay\PayPal\Message\RestVoidRequest.
Definition at line 126 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\PayPal\Message\AbstractRestRequest\$liveEndpoint, Omnipay\PayPal\Message\AbstractRestRequest\API_VERSION, and Omnipay\Common\Message\AbstractRequest\getTestMode().
Referenced by Omnipay\PayPal\Message\AbstractRestRequest\sendData().
|
protected |
Reimplemented in Omnipay\PayPal\Message\RestCreateSubscriptionRequest, Omnipay\PayPal\Message\RestCreateSubscriptionRequest, Omnipay\PayPal\Message\RestAuthorizeRequest, Omnipay\PayPal\Message\RestAuthorizeRequest, Omnipay\PayPal\Message\RestCreatePlanRequest, Omnipay\PayPal\Message\RestCreatePlanRequest, Omnipay\PayPal\Message\RestListPurchaseRequest, Omnipay\PayPal\Message\RestListPurchaseRequest, Omnipay\PayPal\Message\RestListPlanRequest, Omnipay\PayPal\Message\RestListPlanRequest, Omnipay\PayPal\Message\RestSearchTransactionRequest, Omnipay\PayPal\Message\RestSearchTransactionRequest, Omnipay\PayPal\Message\RestUpdatePlanRequest, Omnipay\PayPal\Message\RestUpdatePlanRequest, Omnipay\PayPal\Message\RestCompleteSubscriptionRequest, Omnipay\PayPal\Message\RestCompleteSubscriptionRequest, Omnipay\PayPal\Message\RestCreateCardRequest, Omnipay\PayPal\Message\RestCreateCardRequest, Omnipay\PayPal\Message\RestCancelSubscriptionRequest, Omnipay\PayPal\Message\RestReactivateSubscriptionRequest, Omnipay\PayPal\Message\RestSuspendSubscriptionRequest, Omnipay\PayPal\Message\RestCancelSubscriptionRequest, Omnipay\PayPal\Message\RestReactivateSubscriptionRequest, Omnipay\PayPal\Message\RestSuspendSubscriptionRequest, Omnipay\PayPal\Message\RestRefundRequest, Omnipay\PayPal\Message\RestRefundRequest, Omnipay\PayPal\Message\RestCompletePurchaseRequest, Omnipay\PayPal\Message\RestCompletePurchaseRequest, Omnipay\PayPal\Message\RestDeleteCardRequest, Omnipay\PayPal\Message\RestDeleteCardRequest, Omnipay\PayPal\Message\RestCaptureRequest, Omnipay\PayPal\Message\RestCaptureRequest, Omnipay\PayPal\Message\RestFetchTransactionRequest, Omnipay\PayPal\Message\RestFetchTransactionRequest, Omnipay\PayPal\Message\RestFetchPurchaseRequest, Omnipay\PayPal\Message\RestFetchPurchaseRequest, Omnipay\PayPal\Message\RestRefundCaptureRequest, Omnipay\PayPal\Message\RestRefundCaptureRequest, Omnipay\PayPal\Message\RestTokenRequest, Omnipay\PayPal\Message\RestTokenRequest, Omnipay\PayPal\Message\RestVoidRequest, and Omnipay\PayPal\Message\RestVoidRequest.
Definition at line 126 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\PayPal\Message\AbstractRestRequest\$liveEndpoint, Omnipay\PayPal\Message\AbstractRestRequest\API_VERSION, and Omnipay\Common\Message\AbstractRequest\getTestMode().
|
protected |
Get HTTP Method.
This is nearly always POST but can be over-ridden in sub classes.
Reimplemented in Omnipay\PayPal\Message\RestListPurchaseRequest, Omnipay\PayPal\Message\RestListPurchaseRequest, Omnipay\PayPal\Message\RestListPlanRequest, Omnipay\PayPal\Message\RestListPlanRequest, Omnipay\PayPal\Message\RestSearchTransactionRequest, Omnipay\PayPal\Message\RestSearchTransactionRequest, Omnipay\PayPal\Message\RestUpdatePlanRequest, Omnipay\PayPal\Message\RestUpdatePlanRequest, Omnipay\PayPal\Message\RestDeleteCardRequest, Omnipay\PayPal\Message\RestFetchTransactionRequest, Omnipay\PayPal\Message\RestDeleteCardRequest, Omnipay\PayPal\Message\RestFetchTransactionRequest, Omnipay\PayPal\Message\RestFetchPurchaseRequest, and Omnipay\PayPal\Message\RestFetchPurchaseRequest.
Definition at line 121 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
|
protected |
Get HTTP Method.
This is nearly always POST but can be over-ridden in sub classes.
Reimplemented in Omnipay\PayPal\Message\RestListPurchaseRequest, Omnipay\PayPal\Message\RestListPurchaseRequest, Omnipay\PayPal\Message\RestListPlanRequest, Omnipay\PayPal\Message\RestListPlanRequest, Omnipay\PayPal\Message\RestSearchTransactionRequest, Omnipay\PayPal\Message\RestSearchTransactionRequest, Omnipay\PayPal\Message\RestUpdatePlanRequest, Omnipay\PayPal\Message\RestUpdatePlanRequest, Omnipay\PayPal\Message\RestDeleteCardRequest, Omnipay\PayPal\Message\RestFetchTransactionRequest, Omnipay\PayPal\Message\RestDeleteCardRequest, Omnipay\PayPal\Message\RestFetchTransactionRequest, Omnipay\PayPal\Message\RestFetchPurchaseRequest, and Omnipay\PayPal\Message\RestFetchPurchaseRequest.
Definition at line 121 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
Referenced by Omnipay\PayPal\Message\RestTokenRequest\sendData(), and Omnipay\PayPal\Message\AbstractRestRequest\sendData().
Omnipay\PayPal\Message\AbstractRestRequest::getPayerId | ( | ) |
Definition at line 104 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
Omnipay\PayPal\Message\AbstractRestRequest::getPayerId | ( | ) |
Definition at line 104 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
Referenced by Omnipay\PayPal\Message\RestCompletePurchaseRequest\getData().
Omnipay\PayPal\Message\AbstractRestRequest::getSecret | ( | ) |
Definition at line 84 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
Omnipay\PayPal\Message\AbstractRestRequest::getSecret | ( | ) |
Definition at line 84 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
Referenced by Omnipay\PayPal\Message\RestTokenRequest\sendData().
Omnipay\PayPal\Message\AbstractRestRequest::getToken | ( | ) |
Get the card token.
Reimplemented from Omnipay\Common\Message\AbstractRequest.
Definition at line 94 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
Referenced by Omnipay\PayPal\Message\AbstractRestRequest\sendData().
Omnipay\PayPal\Message\AbstractRestRequest::getToken | ( | ) |
Get the card token.
Reimplemented from Omnipay\Common\Message\AbstractRequest.
Definition at line 94 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
Omnipay\PayPal\Message\AbstractRestRequest::sendData | ( | $data | ) |
Send the request with specified data
mixed | $data | The data to send |
Implements Omnipay\Common\Message\RequestInterface.
Reimplemented in Omnipay\PayPal\Message\RestTokenRequest, and Omnipay\PayPal\Message\RestTokenRequest.
Definition at line 132 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\$httpRequest, Omnipay\PayPal\Message\AbstractRestRequest\createResponse(), Omnipay\PayPal\Message\AbstractRestRequest\getEndpoint(), Omnipay\PayPal\Message\AbstractRestRequest\getHttpMethod(), Omnipay\PayPal\Message\AbstractRestRequest\getToken(), and Omnipay\PayPal\Message\AbstractRestRequest\toJSON().
Omnipay\PayPal\Message\AbstractRestRequest::sendData | ( | $data | ) |
Send the request with specified data
mixed | $data | The data to send |
Implements Omnipay\Common\Message\RequestInterface.
Reimplemented in Omnipay\PayPal\Message\RestTokenRequest, and Omnipay\PayPal\Message\RestTokenRequest.
Definition at line 132 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\PayPal\Message\AbstractRestRequest\createResponse(), Omnipay\PayPal\Message\AbstractRestRequest\getEndpoint(), Omnipay\PayPal\Message\AbstractRestRequest\getHttpMethod(), Omnipay\PayPal\Message\AbstractRestRequest\getToken(), and Omnipay\PayPal\Message\AbstractRestRequest\toJSON().
Omnipay\PayPal\Message\AbstractRestRequest::setClientId | ( | $value | ) |
Definition at line 79 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().
Omnipay\PayPal\Message\AbstractRestRequest::setClientId | ( | $value | ) |
Definition at line 79 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().
Omnipay\PayPal\Message\AbstractRestRequest::setPayerId | ( | $value | ) |
Definition at line 109 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().
Omnipay\PayPal\Message\AbstractRestRequest::setPayerId | ( | $value | ) |
Definition at line 109 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().
Omnipay\PayPal\Message\AbstractRestRequest::setSecret | ( | $value | ) |
Definition at line 89 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().
Omnipay\PayPal\Message\AbstractRestRequest::setSecret | ( | $value | ) |
Definition at line 89 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().
Omnipay\PayPal\Message\AbstractRestRequest::setToken | ( | $value | ) |
Sets the card token.
string | $value |
Reimplemented from Omnipay\Common\Message\AbstractRequest.
Definition at line 99 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().
Omnipay\PayPal\Message\AbstractRestRequest::setToken | ( | $value | ) |
Sets the card token.
string | $value |
Reimplemented from Omnipay\Common\Message\AbstractRequest.
Definition at line 99 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().
Omnipay\PayPal\Message\AbstractRestRequest::toJSON | ( | $data, | |
$options = 0 |
|||
) |
Returns object JSON representation required by PayPal. The PayPal REST API requires the use of JSON_UNESCAPED_SLASHES.
Adapted from the official PayPal REST API PHP SDK. (https://github.com/paypal/PayPal-PHP-SDK/blob/master/lib/PayPal/Common/PayPalModel.php)
int | $options | http://php.net/manual/en/json.constants.php |
Definition at line 183 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
Omnipay\PayPal\Message\AbstractRestRequest::toJSON | ( | $data, | |
$options = 0 |
|||
) |
Returns object JSON representation required by PayPal. The PayPal REST API requires the use of JSON_UNESCAPED_SLASHES.
Adapted from the official PayPal REST API PHP SDK. (https://github.com/paypal/PayPal-PHP-SDK/blob/master/lib/PayPal/Common/PayPalModel.php)
int | $options | http://php.net/manual/en/json.constants.php |
Definition at line 199 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
Referenced by Omnipay\PayPal\Message\AbstractRestRequest\sendData().
|
protected |
Live Endpoint URL
When you’re set to go live, use the live credentials assigned to your app to generate a new access token to be used with the live URIs.
URL
Definition at line 62 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
Referenced by Omnipay\PayPal\Message\AbstractRestRequest\getEndpoint().
|
protected |
PayPal Payer ID
PayerID
Definition at line 72 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
|
protected |
Sandbox Endpoint URL
The PayPal REST APIs are supported in two environments. Use the Sandbox environment for testing purposes, then move to the live environment for production processing. When testing, generate an access token with your test credentials to make calls to the Sandbox URIs. When you’re set to go live, use the live credentials assigned to your app to generate a new access token to be used with the live URIs.
URL
Definition at line 49 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
const Omnipay\PayPal\Message\AbstractRestRequest::API_VERSION = 'v1' |
Definition at line 33 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.
Referenced by Omnipay\PayPal\Message\AbstractRestRequest\getEndpoint().