Open Journal Systems  3.3.0
Omnipay\PayPal\Message\RestListPlanRequest Class Reference
Inheritance diagram for Omnipay\PayPal\Message\RestListPlanRequest:
Omnipay\PayPal\Message\AbstractRestRequest Omnipay\Common\Message\AbstractRequest Omnipay\Common\Message\RequestInterface Omnipay\Common\Message\MessageInterface

Public Member Functions

 getData ()
 
 getData ()
 
 getEndpoint ()
 
 getEndpoint ()
 
 getPage ()
 
 getPage ()
 
 getPageSize ()
 
 getPageSize ()
 
 getStatus ()
 
 getStatus ()
 
 getTotalRequired ()
 
 getTotalRequired ()
 
 setPage ($value)
 
 setPage ($value)
 
 setPageSize ($value)
 
 setPageSize ($value)
 
 setStatus ($value)
 
 setStatus ($value)
 
 setTotalRequired ($value)
 
 setTotalRequired ($value)
 
- Public Member Functions inherited from Omnipay\PayPal\Message\AbstractRestRequest
 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 ()
 

Protected Member Functions

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

Additional Inherited Members

- Data Fields inherited from Omnipay\PayPal\Message\AbstractRestRequest
const API_VERSION = 'v1'
 
- Protected Attributes inherited from Omnipay\PayPal\Message\AbstractRestRequest
 $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 REST List Plans Request

Use this call to get a list of plans in any state (CREATED, ACTIVE, etc.). The plans returned are the plans made by the merchant making the call.

Example

Initialize Gateway

// Create a gateway for the PayPal RestGateway // (routes to GatewayFactory::create) $gateway = Omnipay::create('PayPal_Rest');

// Initialise the gateway $gateway->initialize(array( 'clientId' => 'MyPayPalClientId', 'secret' => 'MyPayPalSecret', 'testMode' => true, // Or false when you are ready for live transactions ));

List all plans that have state CREATED

// List all billing plans $transaction = $gateway->listPlan([ 'state' => CREATED, ]); $response = $transaction->send(); $data = $response->getData(); echo "Gateway listPlan response data == " . print_r($data, true) . "\n";

Request Sample

This is from the PayPal web site:

curl -v -X GET https://api.sandbox.paypal.com/v1/payments/billing-plans?page_size=3&status=ACTIVE&page=1\ -H "Content-Type:application/json" \ -H "Authorization: Bearer Access-Token"

Response Sample

This is from the PayPal web site:

{ "total_items": "166", "total_pages": "83", "plans": [ { "id": "P-7DC96732KA7763723UOPKETA", "state": "ACTIVE", "name": "Plan with Regular and Trial Payment Definitions", "description": "Plan with regular and trial billing payment definitions.", "type": "FIXED", "create_time": "2017-08-22T04:41:52.836Z", "update_time": "2017-08-22T04:41:53.169Z", "links": [ { "href": "https://api.sandbox.paypal.com//v1/payments/billing-plans/P-7DC96732KA7763723UOPKETA", "rel": "self", "method": "GET" } ] }, { "id": "P-1TV69435N82273154UPWDU4I", "state": "ACTIVE", "name": "Plan with Regular Payment Definition", "description": "Plan with one regular payment definition, minimal merchant preferences, and no shipping fee", "type": "INFINITE", "create_time": "2017-08-22T04:41:55.623Z", "update_time": "2017-08-22T04:41:56.055Z", "links": [ { "href": "https://api.sandbox.paypal.com//v1/payments/billing-plans/P-1TV69435N82273154UPWDU4I", "rel": "self", "method": "GET" } ] } ], "links": [ { "href": "https://api.sandbox.paypal.com/v1/payments/billing-plans?page_size=2&page=1&start=3&status=active", "rel": "start", "method": "GET" }, { "href": "https://api.sandbox.paypal.com/v1/payments/billing-plans?page_size=2&page=0&status=active", "rel": "previous_page", "method": "GET" }, { "href": "https://api.sandbox.paypal.com/v1/payments/billing-plans?page_size=2&page=2&status=active", "rel": "next_page", "method": "GET" }, { "href": "https://api.sandbox.paypal.com/v1/payments/billing-plans?page_size=2&page=82&status=active", "rel": "last", "method": "GET" } ] }

PayPal REST List Plans Request Use this call to get a list of plans in any state (CREATED, ACTIVE, etc.). The plans returned are the plans made by the merchant making the call. autotoc_md91 Example autotoc_md92 Initialize Gateway // Create a gateway for the PayPal RestGateway // (routes to GatewayFactory::create) $gateway = Omnipay::create('PayPal_Rest'); // Initialise the gateway $gateway->initialize(array( 'clientId' => 'MyPayPalClientId', 'secret' => 'MyPayPalSecret', 'testMode' => true, // Or false when you are ready for live transactions )); autotoc_md93 List all plans that have state CREATED // List all billing plans $transaction = $gateway->listPlan([ 'state' => CREATED, ]); $response = $transaction->send(); $data = $response->getData(); echo "Gateway listPlan response data == " . print_r($data, true) . "\n"; autotoc_md94 Request Sample This is from the PayPal web site: curl -v -X GET https://api.sandbox.paypal.com/v1/payments/billing-plans?page_size=3&status=ACTIVE&page=1\ -H "Content-Type:application/json" \ -H "Authorization: Bearer Access-Token" autotoc_md95 Response Sample This is from the PayPal web site: { "total_items": "166", "total_pages": "83", "plans": [ { "id": "P-7DC96732KA7763723UOPKETA", "state": "ACTIVE", "name": "Plan with Regular and Trial Payment Definitions", "description": "Plan with regular and trial billing payment definitions.", "type": "FIXED", "create_time": "2017-08-22T04:41:52.836Z", "update_time": "2017-08-22T04:41:53.169Z", "links": [ { "href": "https://api.sandbox.paypal.com//v1/payments/billing-plans/P-7DC96732KA7763723UOPKETA", "rel": "self", "method": "GET" } ] }, { "id": "P-1TV69435N82273154UPWDU4I", "state": "ACTIVE", "name": "Plan with Regular Payment Definition", "description": "Plan with one regular payment definition, minimal merchant preferences, and no shipping fee", "type": "INFINITE", "create_time": "2017-08-22T04:41:55.623Z", "update_time": "2017-08-22T04:41:56.055Z", "links": [ { "href": "https://api.sandbox.paypal.com//v1/payments/billing-plans/P-1TV69435N82273154UPWDU4I", "rel": "self", "method": "GET" } ] } ], "links": [ { "href": "https://api.sandbox.paypal.com/v1/payments/billing-plans?page_size=2&page=1&start=3&status=active", "rel": "start", "method": "GET" }, { "href": "https://api.sandbox.paypal.com/v1/payments/billing-plans?page_size=2&page=0&status=active", "rel": "previous_page", "method": "GET" }, { "href": "https://api.sandbox.paypal.com/v1/payments/billing-plans?page_size=2&page=2&status=active", "rel": "next_page", "method": "GET" }, { "href": "https://api.sandbox.paypal.com/v1/payments/billing-plans?page_size=2&page=82&status=active", "rel": "last", "method": "GET" } ] } https://developer.paypal.com/docs/api/payments.billing-plans#plan_list

Definition at line 124 of file lib/vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

Member Function Documentation

◆ getData() [1/2]

Omnipay\PayPal\Message\RestListPlanRequest::getData ( )

Get the raw data array for this message. The format of this varies from gateway to gateway, but will usually be either an associative array, or a SimpleXMLElement.

Returns
mixed

Implements Omnipay\Common\Message\MessageInterface.

Definition at line 216 of file lib/vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\PayPal\Message\RestListPlanRequest\getPage(), Omnipay\PayPal\Message\RestListPlanRequest\getPageSize(), Omnipay\PayPal\Message\RestListPlanRequest\getStatus(), and Omnipay\PayPal\Message\RestListPlanRequest\getTotalRequired().

◆ getData() [2/2]

Omnipay\PayPal\Message\RestListPlanRequest::getData ( )

Get the raw data array for this message. The format of this varies from gateway to gateway, but will usually be either an associative array, or a SimpleXMLElement.

Returns
mixed

Implements Omnipay\Common\Message\MessageInterface.

Definition at line 216 of file vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\PayPal\Message\RestListPlanRequest\getPage(), Omnipay\PayPal\Message\RestListPlanRequest\getPageSize(), Omnipay\PayPal\Message\RestListPlanRequest\getStatus(), and Omnipay\PayPal\Message\RestListPlanRequest\getTotalRequired().

◆ getEndpoint() [1/2]

Omnipay\PayPal\Message\RestListPlanRequest::getEndpoint ( )

◆ getEndpoint() [2/2]

Omnipay\PayPal\Message\RestListPlanRequest::getEndpoint ( )

◆ getHttpMethod() [1/2]

Omnipay\PayPal\Message\RestListPlanRequest::getHttpMethod ( )
protected

Get HTTP Method.

The HTTP method for list plans requests must be GET.

Returns
string

Reimplemented from Omnipay\PayPal\Message\AbstractRestRequest.

Definition at line 233 of file vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

◆ getHttpMethod() [2/2]

Omnipay\PayPal\Message\RestListPlanRequest::getHttpMethod ( )
protected

Get HTTP Method.

The HTTP method for list plans requests must be GET.

Returns
string

Reimplemented from Omnipay\PayPal\Message\AbstractRestRequest.

Definition at line 233 of file lib/vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

◆ getPage() [1/2]

Omnipay\PayPal\Message\RestListPlanRequest::getPage ( )

◆ getPage() [2/2]

Omnipay\PayPal\Message\RestListPlanRequest::getPage ( )

Get the request page

Returns
integer

Definition at line 133 of file vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

◆ getPageSize() [1/2]

Omnipay\PayPal\Message\RestListPlanRequest::getPageSize ( )

◆ getPageSize() [2/2]

Omnipay\PayPal\Message\RestListPlanRequest::getPageSize ( )

Get the request page size

Returns
string

Definition at line 176 of file vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

◆ getStatus() [1/2]

Omnipay\PayPal\Message\RestListPlanRequest::getStatus ( )

◆ getStatus() [2/2]

Omnipay\PayPal\Message\RestListPlanRequest::getStatus ( )

Get the request status

Returns
string

Definition at line 155 of file vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

◆ getTotalRequired() [1/2]

Omnipay\PayPal\Message\RestListPlanRequest::getTotalRequired ( )

◆ getTotalRequired() [2/2]

Omnipay\PayPal\Message\RestListPlanRequest::getTotalRequired ( )

Get the request total required

Returns
string

Definition at line 197 of file vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\Common\Message\AbstractRequest\getParameter().

◆ setPage() [1/2]

Omnipay\PayPal\Message\RestListPlanRequest::setPage (   $value)

Set the request page

Parameters
integer$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 145 of file lib/vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setPage() [2/2]

Omnipay\PayPal\Message\RestListPlanRequest::setPage (   $value)

Set the request page

Parameters
integer$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 145 of file vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setPageSize() [1/2]

Omnipay\PayPal\Message\RestListPlanRequest::setPageSize (   $value)

Set the request page size

Parameters
string$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 187 of file vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setPageSize() [2/2]

Omnipay\PayPal\Message\RestListPlanRequest::setPageSize (   $value)

Set the request page size

Parameters
string$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 187 of file lib/vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setStatus() [1/2]

Omnipay\PayPal\Message\RestListPlanRequest::setStatus (   $value)

Set the request status

Parameters
string$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 166 of file lib/vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setStatus() [2/2]

Omnipay\PayPal\Message\RestListPlanRequest::setStatus (   $value)

Set the request status

Parameters
string$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 166 of file vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setTotalRequired() [1/2]

Omnipay\PayPal\Message\RestListPlanRequest::setTotalRequired (   $value)

Set the request total required

Parameters
string$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 208 of file vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().

◆ setTotalRequired() [2/2]

Omnipay\PayPal\Message\RestListPlanRequest::setTotalRequired (   $value)

Set the request total required

Parameters
string$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 208 of file lib/vendor/omnipay/paypal/src/Message/RestListPlanRequest.php.

References Omnipay\Common\Message\AbstractRequest\setParameter().


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