PHP Класс 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.
См. также: Omnipay\PayPal\RestGateway
Наследование: extends Omnipay\Common\Message\AbstractRequest
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
createResponse ( $data, $statusCode )
getEndpoint ( )
getHttpMethod ( ) : string Get HTTP Method.

Описание методов

createResponse() защищенный Метод

protected createResponse ( $data, $statusCode )

getClientId() публичный Метод

public getClientId ( )

getEndpoint() защищенный Метод

protected getEndpoint ( )

getHttpMethod() защищенный Метод

This is nearly always POST but can be over-ridden in sub classes.
protected getHttpMethod ( ) : string
Результат string

getPayerId() публичный Метод

public getPayerId ( )

getSecret() публичный Метод

public getSecret ( )

getToken() публичный Метод

public getToken ( )

sendData() публичный Метод

public sendData ( $data )

setClientId() публичный Метод

public setClientId ( $value )

setPayerId() публичный Метод

public setPayerId ( $value )

setSecret() публичный Метод

public setSecret ( $value )

setToken() публичный Метод

public setToken ( $value )

toJSON() публичный Метод

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
Результат string

Описание свойств

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

$payerId защищенное свойство

PayPal Payer ID
protected $payerId

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