chek
This commit is contained in:
@@ -274,13 +274,14 @@ export class CartComponent implements OnDestroy {
|
|||||||
if (paymentStatus === 'COMPLETED' || paymentStatus === 'APPROVED' || paymentStatus === 'PAID' || paymentCode === 'SUCCESS') {
|
if (paymentStatus === 'COMPLETED' || paymentStatus === 'APPROVED' || paymentStatus === 'PAID' || paymentCode === 'SUCCESS') {
|
||||||
this.paymentStatus.set('success');
|
this.paymentStatus.set('success');
|
||||||
this.stopPolling();
|
this.stopPolling();
|
||||||
this.cartService.clearCart();
|
|
||||||
|
|
||||||
// Auto-submit purchase after 5 seconds
|
// Auto-submit purchase after 5 seconds
|
||||||
if (this.closeTimeout) clearTimeout(this.closeTimeout);
|
if (this.closeTimeout) clearTimeout(this.closeTimeout);
|
||||||
this.closeTimeout = setTimeout(() => {
|
this.closeTimeout = setTimeout(() => {
|
||||||
this.autoSubmitPurchase();
|
this.autoSubmitPurchase();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
this.cartService.clearCart();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// Continue checking for 3 minutes regardless of other statuses
|
// Continue checking for 3 minutes regardless of other statuses
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user