Use ladl.link URLs for all front-facing QR and short-link surfaces.
Deploy Ladill Events / deploy (push) Successful in 26s
Deploy Ladill Events / deploy (push) Successful in 26s
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\Models\QrEventRegistration;
|
||||
use App\Services\Events\EventRegistrationService;
|
||||
use App\Support\LadillLink;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -44,10 +45,7 @@ class EventRegistrationController extends Controller
|
||||
'paid' => $result['paid'],
|
||||
'checkout_url' => $result['checkout_url'],
|
||||
'badge_code' => $result['registration']->badge_code,
|
||||
'success_url' => route('qr.public.event.confirmed', [
|
||||
'shortCode' => $qrCode->short_code,
|
||||
'ref' => $result['registration']->reference,
|
||||
]),
|
||||
'success_url' => LadillLink::path($qrCode->short_code, 'registered/'.$result['registration']->reference),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -56,18 +54,15 @@ class EventRegistrationController extends Controller
|
||||
$reference = (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 {
|
||||
$registration = $this->eventService->complete($reference);
|
||||
|
||||
return redirect()->route('qr.public.event.confirmed', [
|
||||
'shortCode' => $shortCode,
|
||||
'ref' => $registration->reference,
|
||||
]);
|
||||
return redirect()->away(LadillLink::path($shortCode, 'registered/'.$registration->reference));
|
||||
} catch (\Throwable $e) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user