mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 15:54:31 -04:00
Fix error with payment methods
This commit is contained in:
parent
d3116f7a06
commit
5f861f491a
@ -540,6 +540,7 @@ class BasePaymentDriver
|
||||
$paymentMethod->setRelation('account_gateway_token', $customer);
|
||||
$paymentMethod = $this->creatingPaymentMethod($paymentMethod);
|
||||
|
||||
if ($paymentMethod) {
|
||||
// archive the old payment method
|
||||
$oldPaymentMethod = PaymentMethod::clientId($this->client()->id)
|
||||
->wherePaymentTypeId($paymentMethod->payment_type_id)
|
||||
@ -549,7 +550,6 @@ class BasePaymentDriver
|
||||
$oldPaymentMethod->delete();
|
||||
}
|
||||
|
||||
if ($paymentMethod) {
|
||||
$paymentMethod->save();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user