• Added the two‑step Widerruf flow with an auth‑only CTA on the Widerrufsbelehrung page and a dedicated confirmation

screen where users pick an eligible end‑customer purchase and confirm. Eligibility is enforced server‑side
  (endcustomer_event, within 14 days, no event package created after purchase), refund is issued via Paddle, the
  purchase is marked refunded, the tenant package is deactivated, and a new confirmation email is sent using resources/
  views/emails/partials/layout.blade.php.

  Details

  - New controller + form request for the confirm flow: app/Http/Controllers/WithdrawalController.php, app/Http/
    Requests/Marketing/WithdrawalConfirmRequest.php
  - New confirmation page + CTA: resources/js/pages/marketing/WithdrawalConfirm.tsx, resources/js/pages/legal/Show.tsx
  - Routes + locale rewrites: routes/web.php, resources/js/lib/localizedPath.ts
  - New email notification + template: app/Notifications/Customer/WithdrawalConfirmed.php, resources/views/emails/
    withdrawal-confirmation.blade.php
  - Translations added for marketing UI + backend flash + email copy: public/lang/de/marketing.json, public/lang/en/
    marketing.json, resources/lang/de/marketing.php, resources/lang/en/marketing.php, resources/lang/de/emails.php,
    resources/lang/en/emails.php
  - Tests: tests/Feature/Marketing/WithdrawalConfirmationTest.php
This commit is contained in:
Codex Agent
2025-12-24 11:54:15 +01:00
parent f6e7c72d14
commit 42b4b647d7
15 changed files with 808 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ use App\Http\Controllers\ProfileDataExportController;
use App\Http\Controllers\Tenant\EventPhotoArchiveController;
use App\Http\Controllers\TenantAdminAuthController;
use App\Http\Controllers\TenantAdminGoogleController;
use App\Http\Controllers\WithdrawalController;
use App\Models\Package;
use App\Support\CheckoutRoutes;
use App\Support\LocaleConfig;
@@ -181,6 +182,19 @@ Route::prefix('{locale}')
Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'index'])
->name('marketing.profile.index');
Route::get('/widerruf', [WithdrawalController::class, 'show'])
->where('locale', 'de')
->name('marketing.withdrawal.confirm.de');
Route::post('/widerruf', [WithdrawalController::class, 'confirm'])
->where('locale', 'de')
->name('marketing.withdrawal.confirm.submit.de');
Route::get('/withdrawal/confirm', [WithdrawalController::class, 'show'])
->where('locale', 'en')
->name('marketing.withdrawal.confirm.en');
Route::post('/withdrawal/confirm', [WithdrawalController::class, 'confirm'])
->where('locale', 'en')
->name('marketing.withdrawal.confirm.submit.en');
});
Route::fallback(function () {