fix bug unsuccessfull payment can went through

This commit is contained in:
edmondlang
2023-03-13 00:32:59 +08:00
parent fe8b6d0518
commit 8277b9d0fd
@@ -101,7 +101,7 @@ class CallbackBillplzLogic
$token = Auth::fromUser(User::find(1));
$request->headers->set('Authorization', 'Bearer '.$token);
$this->updatesTransactionStatus->execute($transaction, ApprovalStatus::APPROVED);
$this->updatesTransactionStatus->execute($transaction, $status);
if(($invoice->amount - $transaction->amount) < 0.01) {
$this->updatesTransactionStatus->execute($invoice, ApprovalStatus::COMPLETED);