Merge pull request #37 from Danakcorp/mrtz

test:keep cart after payment failure
This commit is contained in:
morteza-mortezai
2025-10-29 10:41:14 +03:30
committed by GitHub
@@ -179,7 +179,8 @@ class PaymentService {
// Handle unsuccessful payment status
if (status !== "OK") {
await this.handleFailedPayment(paymentData._id.toString(), order._id, orderItems, session);
// user can retry
// await this.handleFailedPayment(paymentData._id.toString(), order._id, orderItems, session);
return this.buildPaymentResponse(status, PaymentMessage.PaymentNotSuccessful, paymentData._id.toString(), order._id);
}