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

Public Member Functions

 getCount ()
 
 getCount ()
 
 getData ()
 
 getData ()
 
 getEndpoint ()
 
 getEndpoint ()
 
 getEndTime ()
 
 getEndTime ()
 
 getStartId ()
 
 getStartId ()
 
 getStartIndex ()
 
 getStartIndex ()
 
 getStartTime ()
 
 getStartTime ()
 
 setCount ($value)
 
 setCount ($value)
 
 setEndTime ($value)
 
 setEndTime ($value)
 
 setStartId ($value)
 
 setStartId ($value)
 
 setStartIndex ($value)
 
 setStartIndex ($value)
 
 setStartTime ($value)
 
 setStartTime ($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 Purchase Request

Use this call to get a list of payments in any state (created, approved, failed, etc.). The payments returned are the payments made to the merchant making the call.

Example

See RestPurchaseRequest for the first part of this example transaction:

// Make some DateTimes for start and end times $start_time = new \DateTime('yesterday'); $end_time = new \DateTime('now');

// List the transaction so that details can be found for refund, etc. $transaction = $gateway->listPurchase( 'startTime' => $start_time, 'endTime => $end_time ); $response = $transaction->send(); $data = $response->getData(); echo "Gateway listPurchase 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/payment? sort_order=asc&sort_by=update_time \ -H "Content-Type:application/json" \ -H "Authorization: Bearer <Access-Token>"

Response Sample

This is from the PayPal web site:

{ "payments": [ { "id": "PAY-4D099447DD202993VKEFMRJQ", "create_time": "2013-01-31T19:40:22Z", "update_time": "2013-01-31T19:40:24Z", "state": "approved", "intent": "sale", "payer": { "payment_method": "credit_card", "funding_instruments": [ { "credit_card": { "type": "visa", "number": "xxxxxxxxxxxx0331", "expire_month": "10", "expire_year": "2018", "first_name": "Betsy", "last_name": "Buyer", "billing_address": { "line1": "111 First Street", "city": "Saratoga", "state": "CA", "postal_code": "95070", "country_code": "US" } } } ] }, "transactions": [ { "amount": { "total": "110.54", "currency": "USD" }, "description": "This is the payment transaction description.", "related_resources": [ { "sale": { "id": "1D971400A7097562W", "create_time": "2013-01-31T19:40:23Z", "update_time": "2013-01-31T19:40:25Z", "state": "completed", "amount": { "total": "110.54", "currency": "USD" }, "parent_payment": "PAY-4D099447DD202993VKEFMRJQ", "links": [ { "href": "https://api.sandbox.paypal.com/v1/payments/sale/1D971400A7097562W", "rel": "self", "method": "GET" }, { "href": "https://api.sandbox.paypal.com/v1/payments/sale/1D971400A7097562W/refund", "rel": "refund", "method": "POST" }, { "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-4D099447DD202993VKEFMRJQ", "rel": "parent_payment", "method": "GET" } ] } } ] } ], "links": [ { "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-4D099447DD202993VKEFMRJQ", "rel": "self", "method": "GET" } ] } ] }

See also
RestPurchaseRequest PayPal REST List Purchase Request Use this call to get a list of payments in any state (created, approved, failed, etc.). The payments returned are the payments made to the merchant making the call. autotoc_md96 Example See RestPurchaseRequest for the first part of this example transaction: // Make some DateTimes for start and end times $start_time = new ('yesterday'); $end_time = new ('now'); // List the transaction so that details can be found for refund, etc. $transaction = $gateway->listPurchase( 'startTime' => $start_time, 'endTime => $end_time ); $response = $transaction->send(); $data = $response->getData(); echo "Gateway listPurchase response data == " . print_r($data, true) . "\n"; autotoc_md97 Request Sample This is from the PayPal web site: curl -v -X GET https://api.sandbox.paypal.com/v1/payments/payment? sort_order=asc&sort_by=update_time \ -H "Content-Type:application/json" \ -H "Authorization: Bearer <Access-Token>" autotoc_md98 Response Sample This is from the PayPal web site: { "payments": [ { "id": "PAY-4D099447DD202993VKEFMRJQ", "create_time": "2013-01-31T19:40:22Z", "update_time": "2013-01-31T19:40:24Z", "state": "approved", "intent": "sale", "payer": { "payment_method": "credit_card", "funding_instruments": [ { "credit_card": { "type": "visa", "number": "xxxxxxxxxxxx0331", "expire_month": "10", "expire_year": "2018", "first_name": "Betsy", "last_name": "Buyer", "billing_address": { "line1": "111 First Street", "city": "Saratoga", "state": "CA", "postal_code": "95070", "country_code": "US" } } } ] }, "transactions": [ { "amount": { "total": "110.54", "currency": "USD" }, "description": "This is the payment transaction description.", "related_resources": [ { "sale": { "id": "1D971400A7097562W", "create_time": "2013-01-31T19:40:23Z", "update_time": "2013-01-31T19:40:25Z", "state": "completed", "amount": { "total": "110.54", "currency": "USD" }, "parent_payment": "PAY-4D099447DD202993VKEFMRJQ", "links": [ { "href": "https://api.sandbox.paypal.com/v1/payments/sale/1D971400A7097562W", "rel": "self", "method": "GET" }, { "href": "https://api.sandbox.paypal.com/v1/payments/sale/1D971400A7097562W/refund", "rel": "refund", "method": "POST" }, { "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-4D099447DD202993VKEFMRJQ", "rel": "parent_payment", "method": "GET" } ] } } ] } ], "links": [ { "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-4D099447DD202993VKEFMRJQ", "rel": "self", "method": "GET" } ] } ] } RestPurchaseRequest https://developer.paypal.com/docs/api/#list-payment-resources

Definition at line 140 of file lib/vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

Member Function Documentation

◆ getCount() [1/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::getCount ( )

◆ getCount() [2/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::getCount ( )

Get the request count

Returns
integer

Definition at line 147 of file vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ getData() [1/2]

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

◆ getData() [2/2]

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

◆ getEndpoint() [1/2]

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

◆ getEndpoint() [2/2]

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

◆ getEndTime() [1/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::getEndTime ( )

◆ getEndTime() [2/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::getEndTime ( )

Get the request endTime

Returns
string

Definition at line 235 of file vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ getHttpMethod() [1/2]

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

Get HTTP Method.

The HTTP method for listPurchase requests must be GET.

Returns
string

Reimplemented from Omnipay\PayPal\Message\AbstractRestRequest.

Definition at line 273 of file vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

◆ getHttpMethod() [2/2]

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

Get HTTP Method.

The HTTP method for listPurchase requests must be GET.

Returns
string

Reimplemented from Omnipay\PayPal\Message\AbstractRestRequest.

Definition at line 273 of file lib/vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

◆ getStartId() [1/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::getStartId ( )

Get the request startId

Returns
string

Definition at line 168 of file vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ getStartId() [2/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::getStartId ( )

◆ getStartIndex() [1/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::getStartIndex ( )

◆ getStartIndex() [2/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::getStartIndex ( )

Get the request startIndex

Returns
integer

Definition at line 189 of file vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ getStartTime() [1/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::getStartTime ( )

Get the request startTime

Returns
string

Definition at line 210 of file vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ getStartTime() [2/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::getStartTime ( )

◆ setCount() [1/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::setCount (   $value)

Set the request count

Parameters
integer$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 158 of file lib/vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ setCount() [2/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::setCount (   $value)

Set the request count

Parameters
integer$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 158 of file vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ setEndTime() [1/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::setEndTime (   $value)

Set the request endTime

Parameters
string | \DateTime$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 246 of file vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ setEndTime() [2/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::setEndTime (   $value)

Set the request endTime

Parameters
string | \DateTime$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 246 of file lib/vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ setStartId() [1/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::setStartId (   $value)

Set the request startId

Parameters
string$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 179 of file vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ setStartId() [2/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::setStartId (   $value)

Set the request startId

Parameters
string$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 179 of file lib/vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ setStartIndex() [1/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::setStartIndex (   $value)

Set the request startIndex

Parameters
integer$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 200 of file vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ setStartIndex() [2/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::setStartIndex (   $value)

Set the request startIndex

Parameters
integer$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 200 of file lib/vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ setStartTime() [1/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::setStartTime (   $value)

Set the request startTime

Parameters
string | \DateTime$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 221 of file lib/vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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

◆ setStartTime() [2/2]

Omnipay\PayPal\Message\RestListPurchaseRequest::setStartTime (   $value)

Set the request startTime

Parameters
string | \DateTime$value
Returns
AbstractRestRequest provides a fluent interface.

Definition at line 221 of file vendor/omnipay/paypal/src/Message/RestListPurchaseRequest.php.

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


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