mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -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();
|
$invitation = $invoice->invitations->first();
|
||||||
$token = $client->getGatewayToken($accountGateway/* return parameter */, $accountGatewayToken/* return parameter */);
|
$token = $client->getGatewayToken($accountGateway/* return parameter */, $accountGatewayToken/* return parameter */);
|
||||||
|
|
||||||
|
if (!$accountGatewayToken) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$defaultPaymentMethod = $accountGatewayToken->default_payment_method;
|
$defaultPaymentMethod = $accountGatewayToken->default_payment_method;
|
||||||
|
|
||||||
if (!$invitation || !$token || !$defaultPaymentMethod) {
|
if (!$invitation || !$token || !$defaultPaymentMethod) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user