participant->toResource()->toArray(new Request()); $subject = sprintf( $participant['needs_payment'] ? 'Teilnahme- & Zahlungsinformationen %1$s %2$s' : 'Anmeldebestätigung %1$s %2$s', 'für die Veranstaltung', $this->participant->event()->first()->name ); return new Envelope( subject: $subject, ); } /** * Get the message content definition. */ public function content(): Content { $event = $this->participant->event()->first()->toResource()->toArray(new Request()); $participant = $this->participant->toResource()->toArray(new Request()); $module = $this->participant->paymentModule(); $girocodeBinary = $module instanceof ProvidesGiroCode ? $module->giroCode($this->participant, $this->participant->paymentConfiguration()) : null; // Zahlungs-Block im Mail-Kontext erzeugen (GiroCode als cid: statt Web-Endpoint). $paymentSummary = $this->participant->paymentSummary(RegistrationRenderContext::Mail); return new Content( view: 'emails.participantPayments.missing_amount', with: [ 'participationType' => $participant['participationType'], 'name' => $participant['nicename'], 'eventTitle' => $event['name'], 'eventEmail' => $event['email'], 'arrival' => $participant['arrival'], 'departure' => $participant['departure'], 'amount' => $participant['amount_left_string'], 'paymentFinalDate' => $event['registrationFinalEnd']['formatted'], 'paymentSummary' => ['hasPaymentInformation' => $paymentSummary->hasPaymentInformation, 'html' => $paymentSummary->html], 'girocodeBinary' => $girocodeBinary, ], ); } /** * Get the attachments for the message. * * @return array */ public function attachments(): array { return []; } }