Present Paystack checkout in a responsive mobile sheet and desktop modal.
Deploy Ladill Give / deploy (push) Successful in 44s

Standardize customer-facing Ladill Pay checkout shells across products, open them on all viewports, and escape iframe callbacks back to the product flow.
This commit is contained in:
isaacclad
2026-07-21 16:50:07 +00:00
parent 959f3d3e14
commit a73a15988b
7 changed files with 202 additions and 67 deletions
+6 -16
View File
@@ -358,13 +358,8 @@
});
const data = await res.json();
if (data.error) { this.errorMsg = data.error; this.loading = false; return; }
if (window.innerWidth < 768) {
this.checkoutUrl = data.checkout_url;
this.showSheet = true;
this.loading = false;
} else {
window.location.href = data.checkout_url;
}
this.checkoutUrl = data.checkout_url;
this.showSheet = true;
} catch(e) {
this.errorMsg = 'Network error. Please try again.';
this.loading = false;
@@ -671,8 +666,8 @@
const data = await res.json();
if (data.error) { this.errorMsg = data.error; this.loading = false; return; }
if (!data.paid) { window.location.href = data.success_url; return; }
if (window.innerWidth < 768) { this.checkoutUrl = data.checkout_url; this.showSheet = true; this.loading = false; }
else { window.location.href = data.checkout_url; }
this.checkoutUrl = data.checkout_url;
this.showSheet = true;
} catch(e) { this.errorMsg = 'Network error. Please try again.'; this.loading = false; }
}
}" class="min-h-screen bg-slate-50 pb-12">
@@ -1205,13 +1200,8 @@
});
const data = await res.json();
if (data.error) { this.errorMsg = data.error; this.loading = false; return; }
if (window.innerWidth < 768) {
this.checkoutUrl = data.checkout_url;
this.showSheet = true;
this.loading = false;
} else {
window.location.href = data.checkout_url;
}
this.checkoutUrl = data.checkout_url;
this.showSheet = true;
} catch(e) {
this.errorMsg = 'Network error. Please try again.';
this.loading = false;