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