mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Clarified/documented refund logic
This commit is contained in:
parent
0238067af3
commit
1e837c2368
@ -1005,7 +1005,11 @@ class PaymentService extends BaseService
|
|||||||
'transactionReference' => $payment->transaction_reference,
|
'transactionReference' => $payment->transaction_reference,
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($accountGateway->gateway_id != GATEWAY_WEPAY || $amount != ($payment->amount - $payment->refunded)) {
|
if ($accountGateway->gateway_id == GATEWAY_WEPAY && $amount == $payment->getCompletedAmount()) {
|
||||||
|
// WePay issues a full refund when no amount is set. If an amount is set, it will try
|
||||||
|
// to issue a partial refund without refunding any fees. However, the Stripe driver
|
||||||
|
// (but not the API) requires the amount parameter to be set no matter what.
|
||||||
|
} else {
|
||||||
$details['amount'] = $amount;
|
$details['amount'] = $amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user