📅  最后修改于: 2022-03-11 14:54:01.940000             🧑  作者: Mango
// 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";
}