• 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

@@ -1037,6 +1037,24 @@
},
"too_many_attempts": "Zu viele Versuche. Bitte kurz warten und erneut probieren."
},
"withdrawal": {
"cta_title": "Widerruf starten",
"cta_body": "Du kannst dein Paket widerrufen, solange noch kein Event damit erstellt wurde und der Kauf weniger als 14 Tage zurückliegt.",
"cta_button": "Widerruf erklären",
"title": "Widerruf bestätigen",
"subtitle": "Widerruf innerhalb von {{days}} Tagen nach Kauf, solange kein Event mit dem Paket gestartet wurde.",
"empty_title": "Kein widerrufbares Paket gefunden",
"empty_body": "Für deine aktuellen Käufe liegt entweder kein 14-Tage-Widerrufsrecht mehr vor oder das Paket wurde bereits für ein Event verwendet.",
"empty_cta": "Pakete ansehen",
"selection_title": "Paket auswählen",
"selection_body": "Wähle das Paket aus, das du widerrufen möchtest. Der Widerruf ist erst mit der Bestätigung rechts wirksam.",
"purchase_date": "Gekauft am {{date}}",
"expires_at": "Widerruf möglich bis {{date}}",
"confirm_title": "Widerruf offiziell erklären",
"confirm_body": "Mit dem Klick wird der Widerruf dokumentiert und die Rückerstattung gestartet. Du erhältst eine E-Mail mit Datum und Uhrzeit.",
"confirm_button": "Widerruf jetzt bestätigen",
"confirm_processing": "Widerruf wird übermittelt …"
},
"not_found": {
"title": "Seite nicht gefunden",
"subtitle": "Ups! Diese Seite existiert nicht mehr.",

View File

@@ -1030,6 +1030,24 @@
},
"too_many_attempts": "Too many attempts. Please wait a moment and try again."
},
"withdrawal": {
"cta_title": "Start withdrawal",
"cta_body": "You can withdraw your package if no event has been created with it and the purchase is less than 14 days old.",
"cta_button": "Declare withdrawal",
"title": "Confirm withdrawal",
"subtitle": "Withdraw within {{days}} days of purchase as long as no event has been started with the package.",
"empty_title": "No eligible package found",
"empty_body": "Your current purchases are either outside the 14-day window or the package has already been used for an event.",
"empty_cta": "View packages",
"selection_title": "Select a package",
"selection_body": "Choose the package you want to withdraw. The withdrawal only takes effect after confirmation.",
"purchase_date": "Purchased on {{date}}",
"expires_at": "Withdrawal possible until {{date}}",
"confirm_title": "Officially declare withdrawal",
"confirm_body": "By clicking, the withdrawal is documented and the refund is started. You will receive an email with date and time.",
"confirm_button": "Confirm withdrawal now",
"confirm_processing": "Submitting withdrawal …"
},
"not_found": {
"title": "Page not found",
"subtitle": "Oops! This page is nowhere to be found.",