Stop Paystack pre-modal flash on customer checkout.
Deploy Ladill Mini / deploy (push) Successful in 1m39s
Deploy Ladill Mini / deploy (push) Successful in 1m39s
Use the shared Inline sheet, hold busy until payment UI opens, and avoid locking page scroll during the handoff.
This commit is contained in:
+5
-1
@@ -323,7 +323,11 @@ Alpine.data('miniPaymentLanding', (config = {}) => ({
|
||||
: 'Network error. Please try again.';
|
||||
} finally {
|
||||
clearTimeout(timer);
|
||||
this.loading = false;
|
||||
// Keep loading while the sheet is open — ladill-pay-opened / cancel / error clear it.
|
||||
// Clearing here caused a form flash before Paystack's modal painted.
|
||||
if (!this.showSheet) {
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -59,8 +59,7 @@
|
||||
this.accessCode = data.access_code || '';
|
||||
this.publicKey = data.public_key || '';
|
||||
this.returnUrl = data.callback_url || '';
|
||||
this.showSheet = true;
|
||||
this.loading = false;
|
||||
this.showSheet = true; // loading cleared when payment UI opens (ladill-pay-opened)
|
||||
} catch (error) {
|
||||
window.LadillPayCheckout?.cancel?.(); this.errorMsg = 'Network error. Please try again.';
|
||||
this.loading = false;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -374,8 +374,7 @@
|
||||
this.accessCode = data.access_code || '';
|
||||
this.publicKey = data.public_key || '';
|
||||
this.returnUrl = data.callback_url || '';
|
||||
this.showSheet = true;
|
||||
this.loading = false;
|
||||
this.showSheet = true; // loading cleared when payment UI opens (ladill-pay-opened)
|
||||
}
|
||||
} catch(e) {
|
||||
window.LadillPayCheckout?.cancel?.(); this.errorMsg = 'Network error. Please try again.';
|
||||
@@ -695,8 +694,7 @@
|
||||
this.accessCode = data.access_code || '';
|
||||
this.publicKey = data.public_key || '';
|
||||
this.returnUrl = data.callback_url || '';
|
||||
this.showSheet = true;
|
||||
this.loading = false;
|
||||
this.showSheet = true; // loading cleared when payment UI opens (ladill-pay-opened)
|
||||
}
|
||||
} catch(e) { window.LadillPayCheckout?.cancel?.(); this.errorMsg = 'Network error. Please try again.'; this.loading = false; }
|
||||
}
|
||||
@@ -1246,8 +1244,7 @@
|
||||
this.accessCode = data.access_code || '';
|
||||
this.publicKey = data.public_key || '';
|
||||
this.returnUrl = data.callback_url || '';
|
||||
this.showSheet = true;
|
||||
this.loading = false;
|
||||
this.showSheet = true; // loading cleared when payment UI opens (ladill-pay-opened)
|
||||
}
|
||||
} catch(e) {
|
||||
window.LadillPayCheckout?.cancel?.(); this.errorMsg = 'Network error. Please try again.';
|
||||
|
||||
Reference in New Issue
Block a user