Open Journal Systems
3.3.0
|
Protected Member Functions | |
getHttpMethod () | |
getHttpMethod () | |
![]() | |
createResponse ($data, $statusCode) | |
createResponse ($data, $statusCode) | |
![]() | |
getCurrencies () | |
getParameter ($key) | |
setParameter ($key, $value) | |
setParameter ($key, $value) | |
Additional Inherited Members | |
![]() | |
const | API_VERSION = 'v1' |
![]() | |
$liveEndpoint = 'https://api.paypal.com' | |
$payerId = null | |
$testEndpoint = 'https://api.sandbox.paypal.com' | |
![]() | |
$currencies | |
$httpClient | |
$httpRequest | |
$negativeAmountAllowed = false | |
$parameters | |
$response | |
$zeroAmountAllowed = true | |
PayPal REST Search Transaction Request
Use this call to search for the transactions within a billing agreement. Note that this is not a generic transaction search function – for that see RestListPurchaseRequest. It only searches for transactions within a billing agreement.
This should be used on a regular basis to determine the success / failure state of transactions on active billing agreements.
// List the transactions for a billing agreement. $transaction = $gateway->listPurchase(); $response = $transaction->send(); $data = $response->getData(); echo "Gateway listPurchase response data == " . print_r($data, true) . "\n";
This is from the PayPal web site:
curl -v GET https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-0LN988D3JACS/transactions \ -H 'Content-Type:application/json' \ -H 'Authorization: Bearer <Access-Token>'
This is from the PayPal web site:
{ "agreement_transaction_list": [ { "transaction_id": "I-0LN988D3JACS", "status": "Created", "transaction_type": "Recurring Payment", "payer_email": "bbuyer@example.com", "payer_name": "Betsy Buyer", "time_stamp": "2014-06-09T09:29:36Z", "time_zone": "GMT" }, { "transaction_id": "928415314Y5640008", "status": "Completed", "transaction_type": "Recurring Payment", "amount": { "currency": "USD", "value": "1.00" }, "fee_amount": { "currency": "USD", "value": "-0.33" }, "net_amount": { "currency": "USD", "value": "0.67" }, "payer_email": "bbuyer@example.com", "payer_name": "Betsy Buyer", "time_stamp": "2014-06-09T09:42:47Z", "time_zone": "GMT" }, { "transaction_id": "I-0LN988D3JACS", "status": "Suspended", "transaction_type": "Recurring Payment", "payer_email": "bbuyer@example.com", "payer_name": "Betsy Buyer", "time_stamp": "2014-06-09T11:18:34Z", "time_zone": "GMT" }, { "transaction_id": "I-0LN988D3JACS", "status": "Reactivated", "transaction_type": "Recurring Payment", "payer_email": "bbuyer@example.com", "payer_name": "Betsy Buyer", "time_stamp": "2014-06-09T11:18:48Z", "time_zone": "GMT" } ] }
PayPal subscription payments cannot be refunded. PayPal is working on this functionality for their future API release. In order to refund a PayPal subscription payment, you will need to use the PayPal web interface to refund it manually.
// List the transactions for a billing agreement. $transaction = $gateway->listPurchase(); $response = $transaction->send(); $data = $response->getData(); echo "Gateway listPurchase response data == " . print_r($data, true) . "\n";
autotoc_md109 Request Sample This is from the PayPal web site: curl -v GET https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-0LN988D3JACS/transactions \ -H 'Content-Type:application/json' \ -H 'Authorization: Bearer <Access-Token>'
autotoc_md110 Response Sample This is from the PayPal web site: { "agreement_transaction_list": [ { "transaction_id": "I-0LN988D3JACS", "status": "Created", "transaction_type": "Recurring Payment", "payer_email": "bbuyer@example.com", "payer_name": "Betsy Buyer", "time_stamp": "2014-06-09T09:29:36Z", "time_zone": "GMT" }, { "transaction_id": "928415314Y5640008", "status": "Completed", "transaction_type": "Recurring Payment", "amount": { "currency": "USD", "value": "1.00" }, "fee_amount": { "currency": "USD", "value": "-0.33" }, "net_amount": { "currency": "USD", "value": "0.67" }, "payer_email": "bbuyer@example.com", "payer_name": "Betsy Buyer", "time_stamp": "2014-06-09T09:42:47Z", "time_zone": "GMT" }, { "transaction_id": "I-0LN988D3JACS", "status": "Suspended", "transaction_type": "Recurring Payment", "payer_email": "bbuyer@example.com", "payer_name": "Betsy Buyer", "time_stamp": "2014-06-09T11:18:34Z", "time_zone": "GMT" }, { "transaction_id": "I-0LN988D3JACS", "status": "Reactivated", "transaction_type": "Recurring Payment", "payer_email": "bbuyer@example.com", "payer_name": "Betsy Buyer", "time_stamp": "2014-06-09T11:18:48Z", "time_zone": "GMT" } ] }
autotoc_md111 Known Issues PayPal subscription payments cannot be refunded. PayPal is working on this functionality for their future API release. In order to refund a PayPal subscription payment, you will need to use the PayPal web interface to refund it manually. RestCreateSubscriptionRequest https://developer.paypal.com/docs/api/#search-for-transactions Definition at line 107 of file lib/vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
Omnipay\PayPal\Message\RestSearchTransactionRequest::getAgreementId | ( | ) |
Get the agreement ID
Definition at line 114 of file lib/vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
Referenced by Omnipay\PayPal\Message\RestSearchTransactionRequest\getEndpoint().
Omnipay\PayPal\Message\RestSearchTransactionRequest::getAgreementId | ( | ) |
Get the agreement ID
Definition at line 114 of file vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
Omnipay\PayPal\Message\RestSearchTransactionRequest::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.
Implements Omnipay\Common\Message\MessageInterface.
Definition at line 172 of file vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\PayPal\Message\RestSearchTransactionRequest\getEndDate(), Omnipay\PayPal\Message\RestSearchTransactionRequest\getStartDate(), and Omnipay\Common\Message\AbstractRequest\validate().
Omnipay\PayPal\Message\RestSearchTransactionRequest::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.
Implements Omnipay\Common\Message\MessageInterface.
Definition at line 172 of file lib/vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\PayPal\Message\RestSearchTransactionRequest\getEndDate(), Omnipay\PayPal\Message\RestSearchTransactionRequest\getStartDate(), and Omnipay\Common\Message\AbstractRequest\validate().
Omnipay\PayPal\Message\RestSearchTransactionRequest::getEndDate | ( | ) |
Get the request endDate
Definition at line 156 of file lib/vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
Referenced by Omnipay\PayPal\Message\RestSearchTransactionRequest\getData().
Omnipay\PayPal\Message\RestSearchTransactionRequest::getEndDate | ( | ) |
Get the request endDate
Definition at line 156 of file vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
Omnipay\PayPal\Message\RestSearchTransactionRequest::getEndpoint | ( | ) |
Reimplemented from Omnipay\PayPal\Message\AbstractRestRequest.
Definition at line 193 of file lib/vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\PayPal\Message\RestSearchTransactionRequest\getAgreementId().
Omnipay\PayPal\Message\RestSearchTransactionRequest::getEndpoint | ( | ) |
Reimplemented from Omnipay\PayPal\Message\AbstractRestRequest.
Definition at line 193 of file vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\PayPal\Message\RestSearchTransactionRequest\getAgreementId().
|
protected |
Get HTTP Method.
The HTTP method for searchTransaction requests must be GET.
Reimplemented from Omnipay\PayPal\Message\AbstractRestRequest.
Definition at line 188 of file lib/vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
|
protected |
Get HTTP Method.
The HTTP method for searchTransaction requests must be GET.
Reimplemented from Omnipay\PayPal\Message\AbstractRestRequest.
Definition at line 188 of file vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
Omnipay\PayPal\Message\RestSearchTransactionRequest::getStartDate | ( | ) |
Get the request startDate
Definition at line 135 of file vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
Omnipay\PayPal\Message\RestSearchTransactionRequest::getStartDate | ( | ) |
Get the request startDate
Definition at line 135 of file lib/vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\Common\Message\AbstractRequest\getParameter().
Referenced by Omnipay\PayPal\Message\RestSearchTransactionRequest\getData().
Omnipay\PayPal\Message\RestSearchTransactionRequest::setAgreementId | ( | $value | ) |
Set the agreement ID
string | $value |
Definition at line 125 of file lib/vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().
Omnipay\PayPal\Message\RestSearchTransactionRequest::setAgreementId | ( | $value | ) |
Set the agreement ID
string | $value |
Definition at line 125 of file vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().
Omnipay\PayPal\Message\RestSearchTransactionRequest::setEndDate | ( | $value | ) |
Set the request endDate
string | DateTime | $value |
Definition at line 167 of file vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().
Omnipay\PayPal\Message\RestSearchTransactionRequest::setEndDate | ( | $value | ) |
Set the request endDate
string | DateTime | $value |
Definition at line 167 of file lib/vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().
Omnipay\PayPal\Message\RestSearchTransactionRequest::setStartDate | ( | $value | ) |
Set the request startDate
string | DateTime | $value |
Definition at line 146 of file vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().
Omnipay\PayPal\Message\RestSearchTransactionRequest::setStartDate | ( | $value | ) |
Set the request startDate
string | DateTime | $value |
Definition at line 146 of file lib/vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php.
References Omnipay\Common\Message\AbstractRequest\setParameter().