POST /widerruf (host-agnostisch, throttled, Honeypot, eigener withdrawal-Error-Bag): persistiert nur Zuordnungsdaten (Name, E-Mail, optionale Bestellnummer - KEIN Grund, darf nicht verlangt werden) und versendet sofort die gesetzlich vorgeschriebene automatische Eingangsbestaetigung mit Zeitstempel an den Verbraucher plus eine interne Benachrichtigung an die Brand-Kontaktadresse des Hosts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
35 lines
911 B
PHP
35 lines
911 B
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Models\WithdrawalRequest;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
/**
|
|
* Sofortige automatische Eingangsbestätigung an den Verbraucher — gesetzlich
|
|
* vorgeschrieben beim Online-Widerruf (Widerrufsbutton).
|
|
*/
|
|
class WithdrawalRequestReceived extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public function __construct(
|
|
public readonly WithdrawalRequest $withdrawalRequest,
|
|
) {}
|
|
|
|
public function envelope(): Envelope
|
|
{
|
|
return new Envelope(
|
|
subject: 'Eingangsbestätigung: Ihr Widerruf vom '.$this->withdrawalRequest->created_at->format('d.m.Y'),
|
|
);
|
|
}
|
|
|
|
public function content(): Content
|
|
{
|
|
return new Content(view: 'emails.withdrawal.received');
|
|
}
|
|
}
|