Moved bank transfer logic to special module
This commit is contained in:
@@ -8,6 +8,7 @@ use App\Domains\Event\Actions\GenerateIcal\GenerateIcalResponse;
|
||||
use App\Domains\Event\Actions\GenerateIcalForDeadline\GenerateIcalForDeadlineCommand;
|
||||
use App\Domains\Event\Actions\GenerateIcalForDeadline\GenerateIcalForDeadlineRequest;
|
||||
use App\Domains\Event\Actions\GenerateIcalForDeadline\GenerateIcalForDeadlineResponse;
|
||||
use App\EventPaymentModules\ProvidesGiroCode;
|
||||
use App\Models\EventParticipant;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -62,13 +63,10 @@ class EventSignUpSuccessfullMail 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;
|
||||
|
||||
$participationIcal = $this->getParticipationIcal();
|
||||
$deadlineIcal = $this->getDeadlineIcal();
|
||||
@@ -85,10 +83,7 @@ class EventSignUpSuccessfullMail 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,
|
||||
'efzStatus' => $participant['efz_status'],
|
||||
'participationIcalFilename' => $participationIcal->filename,
|
||||
|
||||
Reference in New Issue
Block a user