mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Additional online payment checks
This commit is contained in:
parent
078964d297
commit
ce6068f924
@ -68,6 +68,10 @@ class OnlinePaymentController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
if ( ! floatval($invitation->invoice->balance)) {
|
||||
return redirect()->to('view/' . $invitation->invitation_key);
|
||||
}
|
||||
|
||||
$invitation = $invitation->load('invoice.client.account.account_gateways.gateway');
|
||||
|
||||
if ( ! $gatewayType) {
|
||||
|
@ -716,7 +716,7 @@ class BasePaymentDriver
|
||||
}
|
||||
|
||||
// check invoice still has balance
|
||||
if ( ! $this->invoice()->balance) {
|
||||
if ( ! floatval($this->invoice()->balance)) {
|
||||
throw new Exception(trans('texts.payment_error_code', ['code' => 'NB']));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user