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
|
||||
|
||||
@@ -36,7 +36,7 @@ class QrScanController extends Controller
|
||||
}
|
||||
|
||||
if ($qrCode->isDocumentType()) {
|
||||
return redirect()->route('qr.public.view', $shortCode);
|
||||
return redirect()->away($qrCode->publicPath('view'));
|
||||
}
|
||||
|
||||
if ($qrCode->isBookingType()) {
|
||||
@@ -66,7 +66,7 @@ class QrScanController extends Controller
|
||||
|
||||
return view('public.qr.document-viewer', [
|
||||
'qrCode' => $qrCode,
|
||||
'fileUrl' => route('qr.public.file', $shortCode),
|
||||
'fileUrl' => $qrCode->publicPath('file'),
|
||||
'allowDownload' => (bool) ($qrCode->content()['allow_download'] ?? true),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Public;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\QrCode;
|
||||
use App\Services\Merchant\MerchantSaleService;
|
||||
use App\Support\LadillLink;
|
||||
use App\Support\Qr\QrTypeCatalog;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
@@ -59,13 +60,13 @@ class SaleOrderController 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 {
|
||||
$order = $this->sales->completeOrder($reference);
|
||||
} catch (\Throwable) {
|
||||
return redirect('/q/'.$shortCode)->with('order_error', 'Payment could not be verified. Contact the merchant with reference: '.$reference);
|
||||
return redirect()->away(LadillLink::url($shortCode))->with('order_error', 'Payment could not be verified. Contact the merchant with reference: '.$reference);
|
||||
}
|
||||
|
||||
return view('public.qr.order-success', [
|
||||
|
||||
Reference in New Issue
Block a user