diff --git a/src/app/pages/cart/cart.component.ts b/src/app/pages/cart/cart.component.ts index ab186aa..4098e70 100644 --- a/src/app/pages/cart/cart.component.ts +++ b/src/app/pages/cart/cart.component.ts @@ -274,13 +274,14 @@ export class CartComponent implements OnDestroy { if (paymentStatus === 'COMPLETED' || paymentStatus === 'APPROVED' || paymentStatus === 'PAID' || paymentCode === 'SUCCESS') { this.paymentStatus.set('success'); this.stopPolling(); - this.cartService.clearCart(); - - // Auto-submit purchase after 5 seconds + // Auto-submit purchase after 5 seconds if (this.closeTimeout) clearTimeout(this.closeTimeout); this.closeTimeout = setTimeout(() => { this.autoSubmitPurchase(); }, 5000); + this.cartService.clearCart(); + + } // Continue checking for 3 minutes regardless of other statuses },