mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 10:04:30 -04:00
Prevent duplicate refunds
This commit is contained in:
parent
f556546d85
commit
0b9d555f99
@ -285,12 +285,14 @@ class WePayPaymentDriver extends BasePaymentDriver
|
||||
'checkout_id' => intval($objectId),
|
||||
]);
|
||||
|
||||
/*
|
||||
if ($checkout->state == 'refunded') {
|
||||
$payment->recordRefund();
|
||||
} elseif (! empty($checkout->refund) && ! empty($checkout->refund->amount_refunded) && ($checkout->refund->amount_refunded - $payment->refunded) > 0) {
|
||||
$payment->recordRefund($checkout->refund->amount_refunded - $payment->refunded);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
if ($checkout->state == 'captured') {
|
||||
$payment->markComplete();
|
||||
} elseif ($checkout->state == 'cancelled') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user