PHP Class Omnipay\PayPal\Message\AbstractRestRequest

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.
Inheritance: extends Omnipay\Common\Message\AbstractRequest
Datei anzeigen Open project: omnipay/paypal

Protected Properties

Property Type Description
$liveEndpoint 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.
$payerId PayPal Payer ID
$testEndpoint 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.

Public Methods

Method Description
getClientId ( )
getPayerId ( )
getSecret ( )
getToken ( )
sendData ( $data )
setClientId ( $value )
setPayerId ( $value )
setSecret ( $value )
setToken ( $value )
toJSON ( $data, integer $options ) : string Returns object JSON representation required by PayPal.

Protected Methods

Method Description
createResponse ( $data, $statusCode )
getEndpoint ( )
getHttpMethod ( ) : string Get HTTP Method.

Method Details

createResponse() protected method

protected createResponse ( $data, $statusCode )

getClientId() public method

public getClientId ( )

getEndpoint() protected method

protected getEndpoint ( )

getHttpMethod() protected method

This is nearly always POST but can be over-ridden in sub classes.
protected getHttpMethod ( ) : string
return string

getPayerId() public method

public getPayerId ( )

getSecret() public method

public getSecret ( )

getToken() public method

public getToken ( )

sendData() public method

public sendData ( $data )

setClientId() public method

public setClientId ( $value )

setPayerId() public method

public setPayerId ( $value )

setSecret() public method

public setSecret ( $value )

setToken() public method

public setToken ( $value )

toJSON() public method

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)
public toJSON ( $data, integer $options ) : string
$options integer http://php.net/manual/en/json.constants.php
return string

Property Details

$liveEndpoint protected_oe property

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.
protected $liveEndpoint

$payerId protected_oe property

PayPal Payer ID
protected $payerId

$testEndpoint protected_oe property

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.
protected $testEndpoint