Stop Paystack pre-modal flash on customer checkout.
Deploy Ladill POS / deploy (push) Successful in 1m0s
Deploy Ladill POS / deploy (push) Successful in 1m0s
Use the shared Inline sheet, hold busy until payment UI opens, and avoid locking page scroll during the handoff.
This commit is contained in:
+6
-3
@@ -183,6 +183,8 @@ Alpine.data('miniPaymentLanding', (config = {}) => ({
|
||||
errorMsg: config.errorMsg ?? '',
|
||||
showSheet: false,
|
||||
checkoutUrl: '',
|
||||
accessCode: '',
|
||||
returnUrl: '',
|
||||
paymentSheetStyle: '',
|
||||
sheetBleedStyle: '',
|
||||
|
||||
@@ -259,9 +261,10 @@ Alpine.data('miniPaymentLanding', (config = {}) => ({
|
||||
this.loading = false;
|
||||
return;
|
||||
}
|
||||
this.checkoutUrl = data.checkout_url;
|
||||
this.showSheet = true;
|
||||
this.loading = false;
|
||||
this.checkoutUrl = data.checkout_url || data.authorization_url || '';
|
||||
this.accessCode = data.access_code || '';
|
||||
this.returnUrl = data.callback_url || this.returnUrl || '';
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user