checkout.com wip refunds
This commit is contained in:
parent
f6f999b801
commit
6ffb2d7286
1 changed files with 12 additions and 0 deletions
|
|
@ -273,4 +273,16 @@ class CheckoutComPaymentDriver extends BasePaymentDriver
|
|||
$company_gateway_token->save();
|
||||
}
|
||||
}
|
||||
|
||||
public function refund(Payment $payment, $amount)
|
||||
{
|
||||
$payment = new \Checkout\Models\Payments\Refund($payment->transaction_reference);
|
||||
$payment->amount = $amount;
|
||||
|
||||
try {
|
||||
$refund = $this->gateway->payments()->refund($payment);
|
||||
} catch (CheckoutHttpException $e) {
|
||||
// ..
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue