From fe79d5bcef0502e55d54318a63dc6608d7efd032 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Sat, 1 Feb 2025 19:01:24 +0800 Subject: [PATCH] Debug approve payment problem --- .../ApprovePaymentTransactionLogic.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Classes/Modules/Transactions/ControllersLogic/ApprovePaymentTransactionLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/ApprovePaymentTransactionLogic.php index eb3e7505..1573824b 100644 --- a/app/Classes/Modules/Transactions/ControllersLogic/ApprovePaymentTransactionLogic.php +++ b/app/Classes/Modules/Transactions/ControllersLogic/ApprovePaymentTransactionLogic.php @@ -80,16 +80,16 @@ class ApprovePaymentTransactionLogic extends AbstractControllerLogic $transaction = $this->fetchesTransaction->execute(['id' => $request->route('transaction_id')]); - // $document = $transaction->documents() - // ->where('status', ApprovalStatus::PENDING_VERIFICATION) - // ->first(); + $document = $transaction->documents() + ->where('status', ApprovalStatus::PENDING_VERIFICATION) + ->first(); - // if($status === 'approve') { - // $this->approvesDocument->execute($document); - // } - // else { - // $this->rejectsDocument->execute($document); - // } + if($status === 'approve') { + $this->approvesDocument->execute($document); + } + else { + $this->rejectsDocument->execute($document); + } $this->updatesTransactionStatus->execute($transaction, $status === 'approve' ? ApprovalStatus::APPROVED : ApprovalStatus::REJECTED);