From 7908d2dab53d8812aa0954a6635ada94e577b437 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Tue, 26 Nov 2024 11:34:39 +0700 Subject: [PATCH] fix: payment always trigger payment success --- src/controllers/05-payment-controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/05-payment-controller.ts b/src/controllers/05-payment-controller.ts index 58fba4f..36d433e 100644 --- a/src/controllers/05-payment-controller.ts +++ b/src/controllers/05-payment-controller.ts @@ -174,7 +174,7 @@ export class QuotationPayment extends Controller { where: { id: quotation.id }, data: { quotationStatus: - paymentSum._sum.amount || 0 >= quotation.finalPrice + (paymentSum._sum.amount || 0) >= quotation.finalPrice ? "PaymentSuccess" : "PaymentInProcess", requestData: await (async () => {