From daeb376aa5c755bc13635b171099ffdd9152c7d6 Mon Sep 17 00:00:00 2001 From: Omair Saleh Date: Mon, 13 Mar 2023 16:05:41 +0800 Subject: [PATCH] billplz audit --- routes/web.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routes/web.php b/routes/web.php index 18efb102..11bbf1db 100644 --- a/routes/web.php +++ b/routes/web.php @@ -968,9 +968,13 @@ Route::get('/billplz/audit', function (Request $request) { if($data['paid']){ } else { + $transaction->status = ApprovalStatus::REJECTED; $transaction->save(); + $invoice = $transaction->owner; + $invoice->status = ApprovalStatus::APPROVED; + $totalAmount += $transaction->amount; echo 'Order: '. $transaction->owner->owner->owner->reference . ' - Date: '.$transaction->owner->created_at->format('d-m-Y').' - Amount: '. $transaction->amount . "

"; }