Answers for "omnipay refund"

PHP
0

omnipay refund

// 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";
}
Posted by: Guest on July-22-2020

Browse Popular Code Answers by Language