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