mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
Debug approve payment problem
This commit is contained in:
+9
-9
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user