ungültige paket-IDs werden nun abgefangen

This commit is contained in:
Codex Agent
2025-12-20 16:59:14 +01:00
parent 6500b8df2c
commit 80985828d8
7 changed files with 57 additions and 13 deletions

View File

@@ -23,8 +23,16 @@ class CheckoutController extends Controller
{
use PresentsPackages;
public function show(string $locale, string $checkoutSlug, Package $package): \Inertia\Response
public function show(string $locale, string $checkoutSlug, string $package): \Inertia\Response|\Illuminate\Http\RedirectResponse
{
$resolvedPackage = Package::query()->find($package);
if (! $resolvedPackage) {
return redirect()
->route('packages', ['locale' => $locale])
->with('error', __('marketing.packages.package_not_found'));
}
$googleStatus = session()->pull('checkout_google_status');
$googleError = session()->pull('checkout_google_error');
$googleProfile = session()->pull('checkout_google_profile');
@@ -35,7 +43,7 @@ class CheckoutController extends Controller
->all();
return Inertia::render('marketing/CheckoutWizardPage', [
'package' => $this->presentPackage($package),
'package' => $this->presentPackage($resolvedPackage),
'packageOptions' => $packageOptions,
'privacyHtml' => view('legal.datenschutz-partial')->render(),
'auth' => [