T1neu: Unternehmer-Pflicht-Checkbox im Checkout, protokolliert mit AGB-Version
B2B-Gate (AGB v0.6 par. 1 Abs. 4): Das Buchungs-Modal verlangt vor jedem Stripe-Checkout die Bestaetigung 'Ich bestelle in Ausuebung meiner gewerblichen oder selbstaendigen beruflichen Taetigkeit (par. 14 BGB)'. - booking_confirmations: user, Buchungstyp/-ref, AGB-Version, IP, confirmed_at (Nachweis laut Datenschutz Abschnitt 7) - Checkout-Link erscheint erst nach der Checkbox; CheckoutController verlangt zusaetzlich serverseitig eine zeitnahe Bestaetigung (30 Min.) fuer Abo/Einzel-PM/Credit-Topup — Direktaufrufe laufen ins Leere - config/legal.php als zentrale AGB-Versionsquelle (Seite + Protokoll, Uebergangsloesung bis zum legal_documents-System E3) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
99ab47ba1f
commit
8916bcce7c
9 changed files with 311 additions and 7 deletions
|
|
@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
|||
|
||||
use App\Enums\SinglePurchaseStatus;
|
||||
use App\Enums\SinglePurchaseType;
|
||||
use App\Models\BookingConfirmation;
|
||||
use App\Models\Plan;
|
||||
use App\Models\SinglePurchase;
|
||||
use App\Services\Billing\CreditTopupService;
|
||||
|
|
@ -33,6 +34,10 @@ class CheckoutController extends Controller
|
|||
return $this->backToProfile();
|
||||
}
|
||||
|
||||
if ($redirect = $this->requireEntrepreneurConfirmation($request)) {
|
||||
return $redirect;
|
||||
}
|
||||
|
||||
if ($user->subscribed()) {
|
||||
return $this->backToBookings(__('Es besteht bereits ein aktives Abo. Ein Tarifwechsel ist aktuell über den Support möglich.'));
|
||||
}
|
||||
|
|
@ -54,6 +59,10 @@ class CheckoutController extends Controller
|
|||
return $this->backToProfile();
|
||||
}
|
||||
|
||||
if ($redirect = $this->requireEntrepreneurConfirmation($request)) {
|
||||
return $redirect;
|
||||
}
|
||||
|
||||
if (! config('billing.single_pm_stripe_price_id')) {
|
||||
return $this->backToBookings(__('Die Einzel-Pressemitteilung ist noch nicht buchbar. Bitte versuchen Sie es später erneut.'));
|
||||
}
|
||||
|
|
@ -80,6 +89,10 @@ class CheckoutController extends Controller
|
|||
return $this->backToProfile();
|
||||
}
|
||||
|
||||
if ($redirect = $this->requireEntrepreneurConfirmation($request)) {
|
||||
return $redirect;
|
||||
}
|
||||
|
||||
if (! $topups->findPack($pack)) {
|
||||
return $this->backToBookings(__('Dieses Credit-Paket ist nicht verfügbar.'));
|
||||
}
|
||||
|
|
@ -111,6 +124,23 @@ class CheckoutController extends Controller
|
|||
->with('checkout-notice', $notice);
|
||||
}
|
||||
|
||||
/**
|
||||
* B2B-Gate (T1neu, AGB v0.6 § 1 Abs. 4): Jeder Stripe-Checkout setzt eine
|
||||
* zeitnah protokollierte Unternehmer-Bestätigung voraus (Pflicht-Checkbox
|
||||
* im Buchungs-Modal). Direktaufrufe der Checkout-Routen ohne Bestätigung
|
||||
* werden auf die Buchungsseite zurückgeleitet.
|
||||
*/
|
||||
private function requireEntrepreneurConfirmation(Request $request): ?RedirectResponse
|
||||
{
|
||||
if (BookingConfirmation::query()->recentFor($request->user())->exists()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->backToBookings(
|
||||
__('Bitte bestätigen Sie im Buchungsdialog, dass Sie als Unternehmer bestellen — das Angebot richtet sich ausschließlich an Unternehmen, Selbstständige und Agenturen.')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Buchungs-Voraussetzung (12.06.2026): ohne vollständige
|
||||
* Rechnungsadresse kein Checkout — der Hinweis erscheint direkt auf
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue