Class RefundRequest
Fat Zebra REST Refund Request
In order to refund a purchase you must submit the following details:
- Amount (numerical)
- Reference (The Transaction ID of the original transaction to be refunded (XXX-P-YYYYYY))
- Reference (String) - (The merchants reference for the refund -- in this class we create it by appending '-REFUND' to the original transaction reference.)
Example -- note this example assumes that the purchase has been successful and that the transaction ID returned from the purchase is held in $sale_id. See PurchaseRequest for the first part of this example transaction:
// Do a refund transaction on the gateway $transaction = $gateway->refund(array( 'amount' => '10.00', 'transactionReference' => $sale_id, )); $response = $transaction->send(); if ($response->isSuccessful()) { echo "Refund transaction was successful!\n"; $refund_id = $response->getTransactionReference(); echo "Transaction reference = " . $refund_id . "\n"; }
- Omnipay\Common\Message\AbstractRequest implements Omnipay\Common\Message\RequestInterface
- Omnipay\Fatzebra\Message\AbstractRestRequest
- Omnipay\Fatzebra\Message\RefundRequest
Namespace: Omnipay\Fatzebra\Message
See:
See:
Link: http://www.paystream.com.au/developer-guides/
Located at Message/RefundRequest.php
See:
Omnipay\Fatzebra\Message\PurchaseRequest
See:
Omnipay\Fatzebra\FatzebraGateway
Link: http://www.paystream.com.au/developer-guides/
Located at Message/RefundRequest.php
public
mixed
|
|
protected
string
|
getHttpMethod(),
getUsername(),
sendData(),
setUsername()
|
API_VERSION
|
$liveEndpoint,
$testEndpoint
|
$httpClient,
$httpRequest,
$negativeAmountAllowed,
$parameters,
$response,
$zeroAmountAllowed
|