feat: Complete checkout overhaul with Stripe PaymentIntent integration and abandoned cart recovery
This commit is contained in:
@@ -18,11 +18,10 @@ class LocaleController extends Controller
|
||||
Session::put('locale', $locale);
|
||||
}
|
||||
|
||||
$previousUrl = $request->header('Referer') ?? '/';
|
||||
$currentPath = parse_url($previousUrl, PHP_URL_PATH);
|
||||
// Remove prefix if present for redirect to prefix-free
|
||||
$currentPath = preg_replace('/^\/(de|en)/', '', $currentPath);
|
||||
|
||||
return redirect($currentPath);
|
||||
// Return JSON response for fetch requests
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'locale' => App::getLocale(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user