diff --git a/resources/views/partials/paystack-sheet.blade.php b/resources/views/partials/paystack-sheet.blade.php index 88d86f9..7baebd8 100644 --- a/resources/views/partials/paystack-sheet.blade.php +++ b/resources/views/partials/paystack-sheet.blade.php @@ -233,6 +233,7 @@ s.setProperty('visibility', 'visible', 'important'); s.setProperty('display', 'block', 'important'); s.setProperty('background', 'transparent', 'important'); + s.setProperty('background-color', 'transparent', 'important'); s.setProperty('max-width', 'none', 'important'); s.setProperty('max-height', 'none', 'important'); applyIframePermissions(iframe); @@ -681,7 +682,15 @@ overflow: hidden; background: #fff; } - /* Paystack draws its own modal chrome inside the iframe — give it the full body. */ + /* When Paystack is live the shell is transparent so only Paystack's own card shows. */ + html.ladill-pay-inline-active [data-ladill-pay-panel][data-paystack-live="1"] { + background: transparent !important; + box-shadow: none !important; + } + html.ladill-pay-inline-active [data-ladill-pay-panel][data-paystack-live="1"] [data-ladill-pay-mount] { + background: transparent !important; + } + /* Paystack draws its own modal chrome inside the iframe — fill the mount. */ [data-ladill-pay-mount] iframe[data-ladill-pay-contained], [data-ladill-pay-mount] iframe[id^="inline-checkout"], [data-ladill-pay-mount] iframe[id^="embed-checkout"] { @@ -701,14 +710,13 @@ z-index: 2 !important; visibility: visible !important; display: block !important; - background: #fff !important; + background: transparent !important; color-scheme: light !important; } - /* If a Paystack frame escapes the mount, pin it over the panel body instead of full viewport. */ + /* If a Paystack frame escapes the mount, pin it over the mount box. */ html.ladill-pay-inline-active body > iframe[id^="inline-checkout"], html.ladill-pay-inline-active body > iframe[id^="embed-checkout"] { position: fixed !important; - /* Fallback rect; JS updates these CSS vars from the mount box. */ left: var(--ladill-pay-left, 0) !important; top: var(--ladill-pay-top, 0) !important; width: var(--ladill-pay-width, 100%) !important; @@ -721,7 +729,7 @@ z-index: 10000 !important; visibility: visible !important; display: block !important; - background: #fff !important; + background: transparent !important; } @endonce @@ -771,17 +779,12 @@ {{-- - Single payment surface (same pattern as POS): - - Mobile: bottom sheet - - Desktop: centered modal, wide enough for Paystack channel sidebar - - When Inline is ready: minimal chrome so Paystack fills the body (no double header/footer) + ONE design everywhere (POS / Merchant / Mini / Give / Invoice / Events): + - Loading / error / same-origin: white bottomsheet (mobile) or modal (desktop) + - Paystack Inline ready: transparent shell so Paystack's own card is the only surface + on the dimmed backdrop (no second white frame / double modal) --}}
- {{-- Full title header only while loading / error / same-origin frame --}} + {{-- Floating close when Paystack owns the surface (Paystack has no host close for us) --}} + + + {{-- Standard POS header: loading, error, or same-origin waiting page --}}
- -

{{ $sheetTitle }}

- -
- - {{-- Body: Paystack mounts here (same area as the spinner). --}} -
- {{-- Same-origin waiting pages (e.g. MoMo status) --}} + :class="($store.ladillPayCheckout && $store.ladillPayCheckout.inline && !$store.ladillPayCheckout.launching && !$store.ladillPayCheckout.error && !$store.ladillPayCheckout.frameable) + ? 'bg-transparent' + : 'bg-white'" + style="min-height: 20rem"> - {{-- Paystack Inline checkout iframe is reparented into this mount --}} - {{-- Loading / error only — hides once Paystack has loaded inside the mount --}}
assertStringContainsString('rounded-t-2xl', $html); $this->assertStringContainsString('md:rounded-2xl', $html); $this->assertStringContainsString('md:max-w-lg', $html); - $this->assertStringContainsString('md:max-w-3xl', $html); - $this->assertStringContainsString('data-ladill-pay-header-minimal', $html); + $this->assertStringContainsString('data-paystack-live', $html); + $this->assertStringContainsString('data-ladill-pay-close-live', $html); $this->assertStringContainsString('Complete your payment', $html); $this->assertStringContainsString('safe-area-inset-bottom', $html); $this->assertStringContainsString('LadillPayCheckout', $html);