mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 21:54:30 -04:00
Fix for payment refund
This commit is contained in:
parent
92698f5c26
commit
32f341f448
@ -149,10 +149,11 @@ class PaymentService extends BaseService
|
|||||||
foreach ($payments as $payment) {
|
foreach ($payments as $payment) {
|
||||||
if (Auth::user()->can('edit', $payment)) {
|
if (Auth::user()->can('edit', $payment)) {
|
||||||
$amount = !empty($params['amount']) ? floatval($params['amount']) : null;
|
$amount = !empty($params['amount']) ? floatval($params['amount']) : null;
|
||||||
$accountGateway = $payment->account_gateway;
|
if ($accountGateway = $payment->account_gateway) {
|
||||||
$paymentDriver = $accountGateway->paymentDriver();
|
$paymentDriver = $accountGateway->paymentDriver();
|
||||||
if ($paymentDriver->refundPayment($payment, $amount)) {
|
if ($paymentDriver->refundPayment($payment, $amount)) {
|
||||||
$successful++;
|
$successful++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user