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
|
|
@ -3,6 +3,7 @@
|
|||
use App\Enums\SinglePurchaseStatus;
|
||||
use App\Listeners\ProcessStripeWebhook;
|
||||
use App\Models\BillingAddress;
|
||||
use App\Models\BookingConfirmation;
|
||||
use App\Models\User;
|
||||
use App\Services\Billing\CreditTopupService;
|
||||
use App\Services\Billing\CreditWalletService;
|
||||
|
|
@ -91,6 +92,15 @@ test('the topup checkout route starts a stripe checkout with a complete billing
|
|||
$user->assignRole('customer');
|
||||
BillingAddress::factory()->create(['user_id' => $user->id]);
|
||||
|
||||
// B2B-Gate (T1neu): Checkout setzt eine zeitnahe Unternehmer-Bestätigung voraus.
|
||||
BookingConfirmation::query()->create([
|
||||
'user_id' => $user->id,
|
||||
'booking_type' => 'credit_pack',
|
||||
'booking_ref' => 'p25',
|
||||
'agb_version' => (string) config('legal.agb_version'),
|
||||
'confirmed_at' => now(),
|
||||
]);
|
||||
|
||||
$checkout = Mockery::mock(Checkout::class);
|
||||
$checkout->shouldReceive('toResponse')->andReturn(new RedirectResponse('https://checkout.stripe.com/c/pay/test'));
|
||||
$mock = Mockery::mock(StripeCheckoutService::class);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue