feat: Complete checkout overhaul with Stripe PaymentIntent integration and abandoned cart recovery

This commit is contained in:
Codex Agent
2025-10-07 22:25:03 +02:00
parent dd5545605c
commit aa8c6c67c5
38 changed files with 1848 additions and 878 deletions

View File

@@ -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(),
]);
}
}