Open Paystack from the Pay click gesture, not after fetch.
Deploy Ladill Give / deploy (push) Successful in 1m1s
Deploy Ladill Give / deploy (push) Successful in 1m1s
Paystack blocks iframes, so checkout uses a popup beside the sheet/modal chrome. Opening about:blank on the user tap keeps that window from being blocked after the async initiate response.
This commit is contained in:
+2
-2
@@ -215,7 +215,7 @@ Alpine.data('miniPaymentLanding', (config = {}) => ({
|
||||
}
|
||||
|
||||
this.errorMsg = '';
|
||||
this.loading = true;
|
||||
this.loading = true; window.LadillPayCheckout?.prepare?.();
|
||||
|
||||
try {
|
||||
const res = await fetch(config.payUrl, {
|
||||
@@ -242,7 +242,7 @@ Alpine.data('miniPaymentLanding', (config = {}) => ({
|
||||
this.checkoutUrl = data.checkout_url;
|
||||
this.showSheet = true;
|
||||
} catch (e) {
|
||||
this.errorMsg = 'Network error. Please try again.';
|
||||
window.LadillPayCheckout?.cancel?.(); this.errorMsg = 'Network error. Please try again.';
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user