Use Paystack/Ladill Pay on Mini payment landing.
Deploy Ladill Mini / deploy (push) Successful in 1m23s
Deploy Ladill Mini / deploy (push) Successful in 1m23s
Drop the required MTN MoMo number field and MoMo copy so public payment QRs open Paystack checkout via Ladill Pay like the other restored storefronts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-9
@@ -160,7 +160,6 @@ function mobileKeyboardBottomOffset() {
|
||||
|
||||
Alpine.data('miniPaymentLanding', (config = {}) => ({
|
||||
amount: config.amount ?? '',
|
||||
phone: config.phone ?? '',
|
||||
loading: false,
|
||||
errorMsg: config.errorMsg ?? '',
|
||||
showSheet: false,
|
||||
@@ -216,12 +215,6 @@ Alpine.data('miniPaymentLanding', (config = {}) => ({
|
||||
return;
|
||||
}
|
||||
|
||||
const phone = String(this.phone || '').trim();
|
||||
if (!phone) {
|
||||
this.errorMsg = 'Enter your MoMo number to pay.';
|
||||
return;
|
||||
}
|
||||
|
||||
this.errorMsg = '';
|
||||
this.loading = true;
|
||||
|
||||
@@ -237,7 +230,7 @@ Alpine.data('miniPaymentLanding', (config = {}) => ({
|
||||
'X-CSRF-TOKEN': config.csrf,
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
},
|
||||
body: JSON.stringify({ amount: value, customer_phone: phone }),
|
||||
body: JSON.stringify({ amount: value }),
|
||||
signal: controller.signal,
|
||||
});
|
||||
const data = await res.json().catch(() => ({}));
|
||||
@@ -253,7 +246,7 @@ Alpine.data('miniPaymentLanding', (config = {}) => ({
|
||||
return;
|
||||
}
|
||||
|
||||
// MoMo waiting page must be full-page — never trap it in the Paystack iframe
|
||||
// Legacy MoMo waiting page must be full-page — never trap it in the Paystack iframe
|
||||
// (cross-origin iframe is blank / looks like "Pay did nothing").
|
||||
const useSheet = data.provider !== 'mtn_momo' && window.innerWidth < 768;
|
||||
if (useSheet) {
|
||||
|
||||
Reference in New Issue
Block a user