From c40b9e63edec30ce1ed0554855b8ddf21f3f90db Mon Sep 17 00:00:00 2001 From: isaacclad Date: Thu, 23 Jul 2026 22:37:18 +0000 Subject: [PATCH] Force Paystack checkout into the sheet mount on first insert. Redirect first iframe append into the Ladill sheet body and keep absolute fill styles applied so checkout is not a second full-screen modal. --- .../views/partials/paystack-sheet.blade.php | 1331 ++++++++++++++--- 1 file changed, 1132 insertions(+), 199 deletions(-) diff --git a/resources/views/partials/paystack-sheet.blade.php b/resources/views/partials/paystack-sheet.blade.php index 17afe3c..3c63f5e 100644 --- a/resources/views/partials/paystack-sheet.blade.php +++ b/resources/views/partials/paystack-sheet.blade.php @@ -6,13 +6,16 @@ - operator: signed-in staff flows such as wallet top-up Optional overrides: $sheetTitle, $sheetSubtitle, $sheetFooter, $sheetAria, $iframeTitle - Requires Alpine ancestor with: showSheet (bool), checkoutUrl (string). + Requires Alpine ancestor with: + - showSheet (bool) + - checkoutUrl (string) — authorization / waiting URL + - accessCode (string, optional) — Paystack initialize access_code for Inline + - publicKey (string, optional) — unused by resumeTransaction; kept for callers + - returnUrl (string, optional) — where to go after Inline onSuccess (?reference=) - Paystack (checkout.paystack.com) sends X-Frame-Options: SAMEORIGIN and cannot be - embedded. Same-origin URLs (e.g. MoMo waiting pages) still load in an iframe. - External checkouts open in a named window. Call LadillPayCheckout.prepare() - synchronously in the Pay click handler (before await fetch) so the popup is not - blocked after the async response. An in-sheet Continue CTA remains as fallback. + checkout.paystack.com cannot be iframed (X-Frame-Options: SAMEORIGIN). + Primary path: Paystack Inline JS (PaystackPop.resumeTransaction) — in-page overlay, + not a separate browser tab. Same-origin URLs (e.g. MoMo waiting) still use iframe. --}} @php $audience = $audience ?? 'buyer'; @@ -41,10 +44,12 @@ @once @endonce +{{-- Keep Paystack checkout inside the Ladill sheet loading area. --}} +@once('ladill-paystack-contain-css') + +@endonce