add paymentUnknownOrderLog

This commit is contained in:
edmondlang
2023-11-28 22:15:36 +08:00
parent 5cdbc09c5b
commit 12f05b7aa6
2 changed files with 8 additions and 0 deletions
@@ -33,12 +33,14 @@ class WalletTransactionResource extends JsonResource
case TransactionType::PAYMENT:
$invoice = Transaction::where('payment_reference', $this->bill_no)->first();
if(!$invoice) {
Log::channel('paymentUnknownOrderLog')->info('ID: ' . $this->id);
$description = 'Payment for unknown invoice, please contact tech support.';
break;
}
$order = $invoice->owner->owner->owner;
if(!$order) {
Log::channel('paymentUnknownOrderLog')->info('ID: ' . $this->id);
$description = 'Payment for unknown order, please contact tech support.';
break;
}
+6
View File
@@ -100,6 +100,12 @@ return [
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
'paymentUnknownOrderLog' => [
'driver' => 'single',
'path' => storage_path('logs/paymentUnknownOrderLog.log'),
'level' => 'info',
],
],
];