mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 08:21:34 +02:00
Set default payment method when inserting first record
This commit is contained in:
parent
970809f248
commit
85c645fbeb
@ -175,7 +175,9 @@ class StripePaymentDriver extends BasePaymentDriver
|
||||
$cgt->save();
|
||||
|
||||
|
||||
if($is_default == 'true')
|
||||
\Log::error('number of tokens = '. $this->client->gateway_tokens->count());
|
||||
|
||||
if($is_default == 'true' || $this->client->gateway_tokens->count() == 1)
|
||||
{
|
||||
$this->client->gateway_tokens()->update(['is_default'=>0]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user