diff --git a/src/controllers/05-payment-controller.ts b/src/controllers/05-payment-controller.ts index c000278..68dfb60 100644 --- a/src/controllers/05-payment-controller.ts +++ b/src/controllers/05-payment-controller.ts @@ -127,6 +127,8 @@ export class QuotationPayment extends Controller { if (!record) throw notFoundError("Payment"); + if (record.paymentStatus === "PaymentSuccess") return record; + return await prisma.$transaction(async (tx) => { const current = new Date(); const year = `${current.getFullYear()}`.slice(-2).padStart(2, "0");