Additional logging for autobill

This commit is contained in:
David Bomba 2021-08-05 10:46:03 +10:00
parent be85175134
commit a11dff6fe7
2 changed files with 6 additions and 2 deletions

View File

@ -43,7 +43,7 @@ class AutoBillCron
set_time_limit(0); set_time_limit(0);
/* Get all invoices where the send date is less than NOW + 30 minutes() */ /* Get all invoices where the send date is less than NOW + 30 minutes() */
nlog("Performing Autobilling ".Carbon::now()->format('Y-m-d h:i:s')); info("Performing Autobilling ".Carbon::now()->format('Y-m-d h:i:s'));
if (! config('ninja.db.multi_db_enabled')) { if (! config('ninja.db.multi_db_enabled')) {
@ -95,7 +95,7 @@ class AutoBillCron
private function runAutoBiller(Invoice $invoice) private function runAutoBiller(Invoice $invoice)
{ {
nlog("Firing autobill for {$invoice->company_id} - {$invoice->number}"); info("Firing autobill for {$invoice->company_id} - {$invoice->number}");
$invoice->service()->autoBill()->save(); $invoice->service()->autoBill()->save();
} }
} }

View File

@ -99,6 +99,10 @@ class AutoBillInvoice extends AbstractService
->setPaymentHash($payment_hash) ->setPaymentHash($payment_hash)
->tokenBilling($gateway_token, $payment_hash); ->tokenBilling($gateway_token, $payment_hash);
if($payment){
info("Auto Bill payment captured for ".$this->invoice->number);
}
return $this->invoice; return $this->invoice;
} }