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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user