• 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

@@ -279,6 +279,19 @@ return [
'reason' => 'Grund: :reason',
'footer' => 'Die Rückerstattung wird vom Zahlungsanbieter verarbeitet und kann je nach Bank einige Tage dauern.',
],
'withdrawal_confirmation' => [
'subject' => 'Widerruf bestätigt: :package',
'preheader' => 'Dein Widerruf für :package wurde bestätigt.',
'subtitle' => 'Widerruf für :package',
'greeting' => 'Hallo :name,',
'body' => 'Wir haben deinen Widerruf für :package dokumentiert und die Rückerstattung angestoßen.',
'package_label' => 'Paket',
'amount_label' => 'Betrag',
'transaction_label' => 'Zahlungs-ID',
'confirmed_label' => 'Bestätigt am',
'processing_hint' => 'Die Rückerstattung wird vom Zahlungsanbieter verarbeitet und kann je nach Bank einige Tage dauern.',
'footer' => 'Wenn du Fragen hast, antworte einfach auf diese E-Mail.',
],
'ops' => [
'purchase' => [

View File

@@ -301,4 +301,12 @@ return [
],
'too_many_attempts' => 'Zu viele Versuche. Bitte kurz warten und erneut probieren.',
],
'withdrawal' => [
'success' => 'Dein Widerruf wurde bestätigt. Eine Bestätigung ist per E-Mail unterwegs.',
'errors' => [
'not_eligible' => 'Dieses Paket kann aktuell nicht widerrufen werden.',
'missing_transaction' => 'Für diesen Kauf fehlt eine gültige Zahlungsreferenz.',
'refund_failed' => 'Die Rückerstattung konnte nicht gestartet werden. Bitte kontaktiere den Support.',
],
],
];

View File

@@ -253,6 +253,19 @@ return [
'reason' => 'Reason: :reason',
'footer' => 'The refund is processed by the payment provider and may take a few days depending on your bank.',
],
'withdrawal_confirmation' => [
'subject' => 'Withdrawal confirmed: :package',
'preheader' => 'Your withdrawal for :package has been confirmed.',
'subtitle' => 'Withdrawal for :package',
'greeting' => 'Hi :name,',
'body' => 'We have documented your withdrawal for :package and started the refund.',
'package_label' => 'Package',
'amount_label' => 'Amount',
'transaction_label' => 'Payment ID',
'confirmed_label' => 'Confirmed on',
'processing_hint' => 'The refund is processed by the payment provider and may take a few days depending on your bank.',
'footer' => 'If you have any questions, just reply to this email.',
],
'ops' => [
'purchase' => [

View File

@@ -301,4 +301,12 @@ return [
],
'too_many_attempts' => 'Too many attempts. Please wait a moment and try again.',
],
'withdrawal' => [
'success' => 'Your withdrawal was confirmed. A confirmation email is on the way.',
'errors' => [
'not_eligible' => 'This package is currently not eligible for withdrawal.',
'missing_transaction' => 'This purchase is missing a valid payment reference.',
'refund_failed' => 'We could not start the refund. Please contact support.',
],
],
];