Open Monograph Press  3.3.0
Omnipay\PayPal\Message\AbstractRestRequest Class Reference
Inheritance diagram for Omnipay\PayPal\Message\AbstractRestRequest:
Omnipay\Common\Message\AbstractRequest Omnipay\Common\Message\RequestInterface Omnipay\Common\Message\MessageInterface Omnipay\PayPal\Message\RestAuthorizeRequest Omnipay\PayPal\Message\RestCancelSubscriptionRequest Omnipay\PayPal\Message\RestCaptureRequest Omnipay\PayPal\Message\RestCompletePurchaseRequest Omnipay\PayPal\Message\RestCompleteSubscriptionRequest Omnipay\PayPal\Message\RestCreateCardRequest Omnipay\PayPal\Message\RestCreatePlanRequest Omnipay\PayPal\Message\RestCreateSubscriptionRequest Omnipay\PayPal\Message\RestDeleteCardRequest Omnipay\PayPal\Message\RestFetchPurchaseRequest Omnipay\PayPal\Message\RestFetchTransactionRequest Omnipay\PayPal\Message\RestListPlanRequest Omnipay\PayPal\Message\RestListPurchaseRequest Omnipay\PayPal\Message\RestReactivateSubscriptionRequest Omnipay\PayPal\Message\RestRefundCaptureRequest Omnipay\PayPal\Message\RestRefundRequest Omnipay\PayPal\Message\RestSearchTransactionRequest Omnipay\PayPal\Message\RestSuspendSubscriptionRequest Omnipay\PayPal\Message\RestTokenRequest Omnipay\PayPal\Message\RestUpdatePlanRequest Omnipay\PayPal\Message\RestVoidRequest

Public Member Functions

 getClientId ()
 
 getClientId ()
 
 getPayerId ()
 
 getPayerId ()
 
 getSecret ()
 
 getSecret ()
 
 getToken ()
 
 getToken ()
 
 sendData ($data)
 
 sendData ($data)
 
 setClientId ($value)
 
 setClientId ($value)
 
 setPayerId ($value)
 
 setPayerId ($value)
 
 setSecret ($value)
 
 setSecret ($value)
 
 setToken ($value)
 
 setToken ($value)
 
 toJSON ($data, $options=0)
 
 toJSON ($data, $options=0)
 
- Public Member Functions inherited from Omnipay\Common\Message\AbstractRequest
 __construct (ClientInterface $httpClient, HttpRequest $httpRequest)
 
 __construct (ClientInterface $httpClient, HttpRequest $httpRequest)
 
 formatCurrency ($amount)
 
 formatCurrency ($amount)
 
 getAmount ()
 
 getAmount ()
 
 getAmountInteger ()
 
 getAmountInteger ()
 
 getCancelUrl ()
 
 getCancelUrl ()
 
 getCard ()
 
 getCard ()
 
 getCardReference ()
 
 getCardReference ()
 
 getClientIp ()
 
 getClientIp ()
 
 getCurrency ()
 
 getCurrency ()
 
 getCurrencyDecimalPlaces ()
 
 getCurrencyDecimalPlaces ()
 
 getCurrencyNumeric ()
 
 getCurrencyNumeric ()
 
 getDescription ()
 
 getDescription ()
 
 getIssuer ()
 
 getIssuer ()
 
 getItems ()
 
 getItems ()
 
 getNotifyUrl ()
 
 getNotifyUrl ()
 
 getParameters ()
 
 getPaymentMethod ()
 
 getPaymentMethod ()
 
 getResponse ()
 
 getResponse ()
 
 getReturnUrl ()
 
 getReturnUrl ()
 
 getTestMode ()
 
 getTestMode ()
 
 getTransactionId ()
 
 getTransactionId ()
 
 getTransactionReference ()
 
 getTransactionReference ()
 
 initialize (array $parameters=array())
 
 initialize (array $parameters=array())
 
 send ()
 
 send ()
 
 setAmount ($value)
 
 setAmount ($value)
 
 setAmountInteger ($value)
 
 setCancelUrl ($value)
 
 setCancelUrl ($value)
 
 setCard ($value)
 
 setCard ($value)
 
 setCardReference ($value)
 
 setCardReference ($value)
 
 setClientIp ($value)
 
 setClientIp ($value)
 
 setCurrency ($value)
 
 setCurrency ($value)
 
 setDescription ($value)
 
 setDescription ($value)
 
 setIssuer ($value)
 
 setIssuer ($value)
 
 setItems ($items)
 
 setItems ($items)
 
 setMoney (Money $value)
 
 setNotifyUrl ($value)
 
 setNotifyUrl ($value)
 
 setPaymentMethod ($value)
 
 setPaymentMethod ($value)
 
 setReturnUrl ($value)
 
 setReturnUrl ($value)
 
 setTestMode ($value)
 
 setTestMode ($value)
 
 setTransactionId ($value)
 
 setTransactionId ($value)
 
 setTransactionReference ($value)
 
 setTransactionReference ($value)
 
 toFloat ($value)
 
 validate ()
 
- Public Member Functions inherited from Omnipay\Common\Message\MessageInterface
 getData ()
 
 getData ()
 

Data Fields

const API_VERSION = 'v1'
 

Protected Member Functions

 createResponse ($data, $statusCode)
 
 createResponse ($data, $statusCode)
 
 getEndpoint ()
 
 getEndpoint ()
 
 getHttpMethod ()
 
 getHttpMethod ()
 
- Protected Member Functions inherited from Omnipay\Common\Message\AbstractRequest
 getCurrencies ()
 
 getParameter ($key)
 
 setParameter ($key, $value)
 
 setParameter ($key, $value)
 

Protected Attributes

 $liveEndpoint = 'https://api.paypal.com'
 
 $payerId = null
 
 $testEndpoint = 'https://api.sandbox.paypal.com'
 
- Protected Attributes inherited from Omnipay\Common\Message\AbstractRequest
 $currencies
 
 $httpClient
 
 $httpRequest
 
 $negativeAmountAllowed = false
 
 $parameters
 
 $response
 
 $zeroAmountAllowed = true
 

Detailed Description

PayPal Abstract REST Request

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.

Member Function Documentation

◆ createResponse() [1/2]

◆ createResponse() [2/2]

◆ getClientId() [1/2]

Omnipay\PayPal\Message\AbstractRestRequest::getClientId ( )

◆ getClientId() [2/2]

Omnipay\PayPal\Message\AbstractRestRequest::getClientId ( )

◆ getEndpoint() [1/2]

Omnipay\PayPal\Message\AbstractRestRequest::getEndpoint ( )
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().

◆ getEndpoint() [2/2]

Omnipay\PayPal\Message\AbstractRestRequest::getEndpoint ( )
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().

◆ getHttpMethod() [1/2]

◆ getHttpMethod() [2/2]

◆ getPayerId() [1/2]

Omnipay\PayPal\Message\AbstractRestRequest::getPayerId ( )

◆ getPayerId() [2/2]

Omnipay\PayPal\Message\AbstractRestRequest::getPayerId ( )

◆ getSecret() [1/2]

Omnipay\PayPal\Message\AbstractRestRequest::getSecret ( )

◆ getSecret() [2/2]

Omnipay\PayPal\Message\AbstractRestRequest::getSecret ( )

◆ getToken() [1/2]

Omnipay\PayPal\Message\AbstractRestRequest::getToken ( )

◆ getToken() [2/2]

Omnipay\PayPal\Message\AbstractRestRequest::getToken ( )

◆ sendData() [1/2]

◆ sendData() [2/2]

◆ setClientId() [1/2]

Omnipay\PayPal\Message\AbstractRestRequest::setClientId (   $value)

◆ setClientId() [2/2]

Omnipay\PayPal\Message\AbstractRestRequest::setClientId (   $value)

◆ setPayerId() [1/2]

Omnipay\PayPal\Message\AbstractRestRequest::setPayerId (   $value)

◆ setPayerId() [2/2]

Omnipay\PayPal\Message\AbstractRestRequest::setPayerId (   $value)

◆ setSecret() [1/2]

Omnipay\PayPal\Message\AbstractRestRequest::setSecret (   $value)

◆ setSecret() [2/2]

Omnipay\PayPal\Message\AbstractRestRequest::setSecret (   $value)

◆ setToken() [1/2]

Omnipay\PayPal\Message\AbstractRestRequest::setToken (   $value)

Sets the card token.

Parameters
string$value
Returns
AbstractRequest Provides a fluent interface

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().

◆ setToken() [2/2]

Omnipay\PayPal\Message\AbstractRestRequest::setToken (   $value)

Sets the card token.

Parameters
string$value
Returns
AbstractRequest Provides a fluent interface

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().

◆ toJSON() [1/2]

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)

Parameters
int$optionshttp://php.net/manual/en/json.constants.php
Returns
string

Definition at line 183 of file vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.

◆ toJSON() [2/2]

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)

Parameters
int$optionshttp://php.net/manual/en/json.constants.php
Returns
string

Definition at line 199 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.

Referenced by Omnipay\PayPal\Message\AbstractRestRequest\sendData().

Field Documentation

◆ $liveEndpoint

string Omnipay\PayPal\Message\AbstractRestRequest::$liveEndpoint = 'https://api.paypal.com'
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().

◆ $payerId

string Omnipay\PayPal\Message\AbstractRestRequest::$payerId = null
protected

PayPal Payer ID

PayerID

Definition at line 72 of file lib/vendor/omnipay/paypal/src/Message/AbstractRestRequest.php.

◆ $testEndpoint

string Omnipay\PayPal\Message\AbstractRestRequest::$testEndpoint = 'https://api.sandbox.paypal.com'
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.

◆ API_VERSION

const Omnipay\PayPal\Message\AbstractRestRequest::API_VERSION = 'v1'

The documentation for this class was generated from the following file: