Pass access_code into the payment sheet, launch Paystack Inline only, and hide Ladill chrome after Inline loads so register Card/MoMo shows a single payment interface.
26 lines
1.1 KiB
PHP
26 lines
1.1 KiB
PHP
{{-- Global host for till-operator Card/MoMo sheets (register + open tickets). --}}
|
|
<div x-data
|
|
x-init="
|
|
const url = @js(session('checkout_url'));
|
|
const code = @js(session('access_code'));
|
|
if (url || code) {
|
|
$store.paymentCheckout.open(url || '', code || '');
|
|
}
|
|
"
|
|
class="contents">
|
|
<div x-data="{
|
|
get showSheet() { return $store.paymentCheckout.isOpen },
|
|
set showSheet(v) { if (!v) { $store.paymentCheckout.close() } },
|
|
get checkoutUrl() { return $store.paymentCheckout.url },
|
|
get accessCode() { return $store.paymentCheckout.accessCode },
|
|
}">
|
|
@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',
|
|
])
|
|
</div>
|
|
</div>
|