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>
34 lines
854 B
PHP
34 lines
854 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;
|
|
|
|
/**
|
|
* Interne Benachrichtigung an den Betreiber über einen neuen Online-Widerruf.
|
|
*/
|
|
class WithdrawalRequestSubmitted extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public function __construct(
|
|
public readonly WithdrawalRequest $withdrawalRequest,
|
|
) {}
|
|
|
|
public function envelope(): Envelope
|
|
{
|
|
return new Envelope(
|
|
subject: 'Neuer Online-Widerruf #'.$this->withdrawalRequest->id.' über '.$this->withdrawalRequest->host,
|
|
);
|
|
}
|
|
|
|
public function content(): Content
|
|
{
|
|
return new Content(view: 'emails.withdrawal.submitted');
|
|
}
|
|
}
|