mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 11:04:41 -04:00
Fix auto bill error when the user hasn't entered payment information
This commit is contained in:
parent
9afd0741f7
commit
8bc8b384c5
@ -821,6 +821,11 @@ class PaymentService extends BaseService
|
||||
|
||||
$invitation = $invoice->invitations->first();
|
||||
$token = $client->getGatewayToken($accountGateway/* return parameter */, $accountGatewayToken/* return parameter */);
|
||||
|
||||
if (!$accountGatewayToken) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$defaultPaymentMethod = $accountGatewayToken->default_payment_method;
|
||||
|
||||
if (!$invitation || !$token || !$defaultPaymentMethod) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user