Moved bank transfer logic to special module
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Mail\ParticipantPaymentMails;
|
||||
|
||||
use App\EventPaymentModules\ProvidesGiroCode;
|
||||
use App\Models\EventParticipant;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Mail\Mailable;
|
||||
@@ -45,13 +46,10 @@ class ParticipantPaymentMissingPaymentMail extends Mailable
|
||||
$event = $this->participant->event()->first()->toResource()->toArray(new Request());
|
||||
$participant = $this->participant->toResource()->toArray(new Request());
|
||||
|
||||
$girocodeProvider = new \App\Providers\GiroCodeProvider(
|
||||
$event['accountOwner'],
|
||||
$event['accountIban'],
|
||||
(float) $participant['amount_left_value'],
|
||||
$participant['payment_purpose']
|
||||
);
|
||||
$girocodeBinary = (string)$girocodeProvider->create();
|
||||
$module = $this->participant->paymentModule();
|
||||
$girocodeBinary = $module instanceof ProvidesGiroCode
|
||||
? $module->giroCode($this->participant, $this->participant->paymentConfiguration())
|
||||
: null;
|
||||
|
||||
return new Content(
|
||||
view: 'emails.participantPayments.missing_amount',
|
||||
@@ -64,10 +62,7 @@ class ParticipantPaymentMissingPaymentMail extends Mailable
|
||||
'departure' => $participant['departure'],
|
||||
'amount' => $participant['amount_left_string'],
|
||||
'paymentFinalDate' => $event['registrationFinalEnd']['formatted'],
|
||||
'paymentRequired' => $participant['needs_payment'],
|
||||
'accountOwner' => $event['accountOwner'],
|
||||
'accountIban' => $event['accountIban'],
|
||||
'paymentPurpose' => $participant['payment_purpose'],
|
||||
'paymentSummary' => $participant['paymentSummary'],
|
||||
'girocodeBinary' => $girocodeBinary,
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user