Present Paystack checkout in a responsive mobile sheet and desktop modal.
Deploy Ladill Merchant / deploy (push) Successful in 1m5s

Standardize customer-facing Ladill Pay checkout shells across products, open them on all viewports, and escape iframe callbacks back to the product flow.
This commit is contained in:
isaacclad
2026-07-21 16:50:07 +00:00
parent 29a29224dd
commit c11cc99d17
11 changed files with 228 additions and 86 deletions
@@ -68,20 +68,26 @@ class BookingController extends Controller
]);
}
public function callback(Request $request, string $shortCode): RedirectResponse
public function callback(Request $request, string $shortCode): View
{
$reference = trim((string) $request->query('reference', ''));
if ($reference === '') {
return redirect()->away(LadillLink::url($shortCode))->with('error', 'Missing payment reference.');
return view('public.payment-return', [
'redirect' => LadillLink::url($shortCode),
]);
}
try {
$booking = $this->sales->completeBooking($reference);
} catch (\Throwable) {
return redirect()->away(LadillLink::url($shortCode))->with('order_error', 'Payment could not be verified. Reference: '.$reference);
return view('public.payment-return', [
'redirect' => LadillLink::url($shortCode),
]);
}
return redirect()->away(LadillLink::path($shortCode, 'booking/confirmed/'.$booking->id));
return view('public.payment-return', [
'redirect' => LadillLink::path($shortCode, 'booking/confirmed/'.$booking->id),
]);
}
public function confirmed(string $shortCode, int $booking): View