Prevent duplicate refunds

This commit is contained in:
Hillel Coren 2017-11-01 13:51:38 +02:00
parent f556546d85
commit 0b9d555f99

View File

@ -285,11 +285,13 @@ 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();