diff --git a/resources/views/partials/payment-checkout-host.blade.php b/resources/views/partials/payment-checkout-host.blade.php index b456685..91d2855 100644 --- a/resources/views/partials/payment-checkout-host.blade.php +++ b/resources/views/partials/payment-checkout-host.blade.php @@ -12,6 +12,12 @@ set showSheet(v) { if (!v) { $store.paymentCheckout.close() } }, get checkoutUrl() { return $store.paymentCheckout.url }, }"> - @include('partials.paystack-sheet') + @include('partials.paystack-sheet', [ + 'audience' => 'operator', + 'sheetTitle' => 'Customer payment', + 'sheetSubtitle' => 'Hand this screen to the customer for card or mobile money.', + 'sheetFooter' => 'Stay on this screen until the customer finishes. Closing only hides the sheet.', + 'iframeTitle' => 'Customer card or mobile money checkout', + ]) diff --git a/resources/views/partials/paystack-sheet.blade.php b/resources/views/partials/paystack-sheet.blade.php index cf0e98a..9d0c4a4 100644 --- a/resources/views/partials/paystack-sheet.blade.php +++ b/resources/views/partials/paystack-sheet.blade.php @@ -1,20 +1,49 @@ {{-- - POS checkout shell for till operators: bottomsheet on mobile, modal on desktop. - Audience is staff at the register — not the end customer browsing alone. + 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). + + Loads the provider authorization URL in-frame (verified via production Events/POS). + MoMo and other non-frameable providers should redirect instead of opening this sheet. --}} @php - $sheetTitle = $sheetTitle ?? 'Customer payment'; - $sheetSubtitle = $sheetSubtitle ?? 'Hand this screen to the customer for card or mobile money.'; - $sheetAria = $sheetAria ?? $sheetTitle; - $iframeTitle = $iframeTitle ?? 'Customer card or mobile money checkout'; + $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 diff --git a/resources/views/public/payment-return.blade.php b/resources/views/public/payment-return.blade.php new file mode 100644 index 0000000..82ed789 --- /dev/null +++ b/resources/views/public/payment-return.blade.php @@ -0,0 +1,27 @@ + + + + + + Payment + + + +

Confirming your payment…

+ + +