billing: Blindkopie der Zahlungsbestätigung an LEGAL_CONTACT_EMAIL
Interner Beleg über jede versendete Buchungsbestätigung im Rechts-/Service-Postfach (config legal.contact_email). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
e32431e948
commit
37bcf731bf
2 changed files with 6 additions and 0 deletions
|
|
@ -34,8 +34,13 @@ class BookingPaymentConfirmed extends Mailable implements ShouldQueue
|
|||
|
||||
public function envelope(): Envelope
|
||||
{
|
||||
// Blindkopie an das Rechts-/Service-Postfach: interner Beleg über
|
||||
// jede versendete Zahlungsbestätigung.
|
||||
$bcc = (string) config('legal.contact_email');
|
||||
|
||||
return new Envelope(
|
||||
subject: 'Zahlungsbestätigung für Ihre Buchung — Rechnung '.$this->invoice->number,
|
||||
bcc: $bcc !== '' ? [$bcc] : [],
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ test('a mirrored invoice queues a payment confirmation mail to the customer', fu
|
|||
|
||||
Mail::assertQueued(BookingPaymentConfirmed::class, function (BookingPaymentConfirmed $mail) use ($user) {
|
||||
return $mail->hasTo($user->email)
|
||||
&& $mail->hasBcc(config('legal.contact_email'))
|
||||
&& $mail->invoice->number === 'STR-00001';
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue