Use ladl.link URLs for all front-facing QR and short-link surfaces.
Deploy Ladill Merchant / deploy (push) Successful in 35s
Deploy Ladill Merchant / deploy (push) Successful in 35s
Public landing pages, asset paths, payment callbacks, and redirects now go through QrCode::publicPath() / LadillLink instead of ladill.com/q/* routes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Http\Controllers\Controller;
|
||||
use App\Models\QrCode;
|
||||
use App\Services\Merchant\BookingSlotService;
|
||||
use App\Services\Merchant\MerchantSaleService;
|
||||
use App\Support\LadillLink;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -63,10 +64,7 @@ class BookingController extends Controller
|
||||
|
||||
return response()->json([
|
||||
'confirmed' => true,
|
||||
'redirect_url' => route('qr.public.booking.confirmed', [
|
||||
'shortCode' => $shortCode,
|
||||
'booking' => $result['booking']->id,
|
||||
]),
|
||||
'redirect_url' => LadillLink::path($shortCode, 'booking/confirmed/'.$result['booking']->id),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -74,19 +72,16 @@ class BookingController extends Controller
|
||||
{
|
||||
$reference = trim((string) $request->query('reference', ''));
|
||||
if ($reference === '') {
|
||||
return redirect('/q/'.$shortCode)->with('error', 'Missing payment reference.');
|
||||
return redirect()->away(LadillLink::url($shortCode))->with('error', 'Missing payment reference.');
|
||||
}
|
||||
|
||||
try {
|
||||
$booking = $this->sales->completeBooking($reference);
|
||||
} catch (\Throwable) {
|
||||
return redirect('/q/'.$shortCode)->with('order_error', 'Payment could not be verified. Reference: '.$reference);
|
||||
return redirect()->away(LadillLink::url($shortCode))->with('order_error', 'Payment could not be verified. Reference: '.$reference);
|
||||
}
|
||||
|
||||
return redirect()->route('qr.public.booking.confirmed', [
|
||||
'shortCode' => $shortCode,
|
||||
'booking' => $booking->id,
|
||||
]);
|
||||
return redirect()->away(LadillLink::path($shortCode, 'booking/confirmed/'.$booking->id));
|
||||
}
|
||||
|
||||
public function confirmed(string $shortCode, int $booking): View
|
||||
|
||||
Reference in New Issue
Block a user