Compare commits
2 Commits
3ab67cbe2d
...
e7d8ec8c63
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7d8ec8c63 | ||
|
|
1e3cd99c69 |
@@ -245,7 +245,7 @@
|
||||
<div class="payment-status-screen success">
|
||||
<div class="success-icon">✓</div>
|
||||
<h2>{{ 'cart.paymentSuccess' | translate }}</h2>
|
||||
<p class="success-text">{{ 'cart.paymentSuccessDesc' | translate }}</p>
|
||||
<!-- <p class="success-text">{{ 'cart.paymentSuccessDesc' | translate }}</p> -->
|
||||
|
||||
<!-- <div class="email-form">
|
||||
<div class="input-group">
|
||||
|
||||
@@ -39,7 +39,7 @@ export class CartComponent implements OnDestroy {
|
||||
|
||||
// Payment popup states
|
||||
showPaymentPopup = signal<boolean>(false);
|
||||
paymentStatus = signal<'creating' | 'waiting' | 'success' | 'timeout' | 'error'>('creating');
|
||||
paymentStatus = signal<'creating' | 'waiting' | 'success' | 'timeout' | 'error' | null>('creating');
|
||||
qrCodeUrl = signal<string>('');
|
||||
paymentUrl = signal<string>('');
|
||||
paymentId = signal<string>('');
|
||||
@@ -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
|
||||
if (this.closeTimeout) clearTimeout(this.closeTimeout);
|
||||
this.closeTimeout = setTimeout(() => {
|
||||
this.autoSubmitPurchase();
|
||||
}, 5000);
|
||||
this.cartService.clearCart();
|
||||
|
||||
|
||||
}
|
||||
// Continue checking for 3 minutes regardless of other statuses
|
||||
},
|
||||
@@ -358,6 +359,10 @@ export class CartComponent implements OnDestroy {
|
||||
this.router.navigate([`/${lang}`]);
|
||||
}
|
||||
});
|
||||
this.paymentStatus.set(null);
|
||||
|
||||
const lang = this.langService.currentLanguage();
|
||||
this.router.navigate([`/${lang}`]);
|
||||
}
|
||||
|
||||
copyPaymentLink(): void {
|
||||
|
||||
Reference in New Issue
Block a user