Fix POS Paystack double modal and keep checkout in-app.

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.
This commit is contained in:
isaacclad
2026-07-21 21:23:21 +00:00
parent 4dcc46e319
commit 5c23df9561
8 changed files with 147 additions and 105 deletions
@@ -230,6 +230,7 @@ class TicketController extends Controller
if ($request->expectsJson() || $request->ajax()) {
return response()->json([
'checkout_url' => $result['checkout_url'],
'access_code' => $result['access_code'] ?? '',
'sale_id' => $sale->id,
]);
}
@@ -237,6 +238,7 @@ class TicketController extends Controller
return redirect()
->route('pos.tickets.show', $sale)
->with('checkout_url', $result['checkout_url'])
->with('access_code', $result['access_code'] ?? '')
->with('success', 'Payment sheet ready — hand the device to the customer for card or MoMo.');
} catch (RuntimeException $e) {
return back()->with('error', $e->getMessage());