This commit is contained in:
sdarbinyan
2026-06-18 18:30:20 +04:00
parent 1e3cd99c69
commit e7d8ec8c63

View File

@@ -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
},