Open Paystack from the Pay click gesture, not after fetch.
Deploy Ladill POS / deploy (push) Successful in 54s

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:
isaacclad
2026-07-21 18:13:56 +00:00
parent c9c8278500
commit 497cdfbe8e
3 changed files with 65 additions and 19 deletions
+2 -2
View File
@@ -231,7 +231,7 @@ Alpine.data('miniPaymentLanding', (config = {}) => ({
}
this.errorMsg = '';
this.loading = true;
this.loading = true; window.LadillPayCheckout?.prepare?.();
try {
const res = await fetch(config.payUrl, {
@@ -259,7 +259,7 @@ Alpine.data('miniPaymentLanding', (config = {}) => ({
this.showSheet = true;
this.loading = false;
} catch (e) {
this.errorMsg = 'Network error. Please try again.';
window.LadillPayCheckout?.cancel?.(); this.errorMsg = 'Network error. Please try again.';
this.loading = false;
}
},