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