{{-- Responsive payment checkout shell: bottom sheet on mobile, centered modal on desktop. Audiences: - buyer (default): public ticket buyers, donors, shoppers — self-serve checkout - 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). 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. --}} @php $audience = $audience ?? 'buyer'; $defaults = match ($audience) { 'operator' => [ 'title' => 'Complete payment', 'subtitle' => null, 'aria' => 'Complete payment', 'iframe' => 'Payment checkout', 'footer' => null, ], default => [ 'title' => 'Complete your payment', 'subtitle' => 'Pay securely. You\'ll get a confirmation when it succeeds.', 'aria' => 'Complete your payment', 'iframe' => 'Secure payment checkout', 'footer' => 'Your payment is processed securely. Do not close this window until finished.', ], }; $sheetTitle = $sheetTitle ?? $defaults['title']; $sheetSubtitle = $sheetSubtitle ?? $defaults['subtitle']; $sheetAria = $sheetAria ?? $defaults['aria']; $iframeTitle = $iframeTitle ?? $defaults['iframe']; $sheetFooter = $sheetFooter ?? $defaults['footer']; @endphp @once @endonce {{-- Mobile bottom sheet --}} {{ $sheetTitle }} @if (! empty($sheetSubtitle)) {{ $sheetSubtitle }} @endif A Paystack window should be open. If you do not see it, tap continue below. Your browser blocked the popup. Tap continue to open Paystack. Continue to Paystack Cancel @if (! empty($sheetFooter)) {{ $sheetFooter }} @endif {{-- Desktop centered modal --}} {{ $sheetTitle }} @if (! empty($sheetSubtitle)) {{ $sheetSubtitle }} @endif A Paystack window should be open. If you do not see it, click continue below. Your browser blocked the popup. Click continue to open Paystack. Continue to Paystack Cancel @if (! empty($sheetFooter)) {{ $sheetFooter }} @endif
{{ $sheetTitle }}
{{ $sheetSubtitle }}
A Paystack window should be open. If you do not see it, tap continue below. Your browser blocked the popup. Tap continue to open Paystack.
{{ $sheetFooter }}
A Paystack window should be open. If you do not see it, click continue below. Your browser blocked the popup. Click continue to open Paystack.