From f014cda4e64dadb0590545aafbbeaa498526e9ae Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 18 Jun 2022 17:10:15 +1000 Subject: [PATCH] Ensure we save auto_bill_tries --- app/Services/Invoice/AutoBillInvoice.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Services/Invoice/AutoBillInvoice.php b/app/Services/Invoice/AutoBillInvoice.php index 4a5c8cafca..fa0f8f0bea 100644 --- a/app/Services/Invoice/AutoBillInvoice.php +++ b/app/Services/Invoice/AutoBillInvoice.php @@ -123,6 +123,7 @@ class AutoBillInvoice extends AbstractService ->setPaymentHash($payment_hash) ->tokenBilling($gateway_token, $payment_hash); } catch (\Exception $e) { + $this->invoice->auto_bill_tries += 1; if ($this->invoice->auto_bill_tries == 3) { @@ -131,6 +132,8 @@ class AutoBillInvoice extends AbstractService $this->invoice->save(); } + $this->invoice->save(); + nlog("payment NOT captured for " . $this->invoice->number . " with error " . $e->getMessage()); }