Present Paystack checkout in a responsive mobile sheet and desktop modal.
Deploy Ladill Merchant / deploy (push) Successful in 1m5s
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user