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
Afficher le fichier Open project: omnipay/paypal

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Method Details

createResponse() protected méthode

protected createResponse ( $data, $statusCode )

getClientId() public méthode

public getClientId ( )

getEndpoint() protected méthode

protected getEndpoint ( )

getHttpMethod() protected méthode

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

getPayerId() public méthode

public getPayerId ( )

getSecret() public méthode

public getSecret ( )

getToken() public méthode

public getToken ( )

sendData() public méthode

public sendData ( $data )

setClientId() public méthode

public setClientId ( $value )

setPayerId() public méthode

public setPayerId ( $value )

setSecret() public méthode

public setSecret ( $value )

setToken() public méthode

public setToken ( $value )

toJSON() public méthode

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
Résultat 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