'account_owner', 'label' => 'Kontoinhaber', 'type' => 'string', 'required' => true], ['name' => 'iban', 'label' => 'IBAN', 'type' => 'string', 'required' => true], ['name' => 'bic', 'label' => 'BIC', 'type' => 'string', 'required' => false], ]; } public function registrationSummary(RegistrationSummaryRequest $request): RegistrationSummaryResponse { $participant = $request->participant; $config = $request->configuration; $amountLeft = clone $participant->amount; if ($participant->amount_paid !== null) { $amountLeft->subtractAmount($participant->amount_paid); } $response = new RegistrationSummaryResponse(); $response->hasPaymentInformation = $amountLeft->getAmount() > 0; $response->showGiroCode = $response->hasPaymentInformation; $response->lines = [ ['label' => 'Kontoinhaber', 'value' => (string)($config['account_owner'] ?? '')], ['label' => 'IBAN', 'value' => (string)($config['iban'] ?? '')], ['label' => 'Verwendungszweck', 'value' => (string)$participant->payment_purpose], ['label' => 'Betrag', 'value' => $amountLeft->toString()], ]; return $response; } public function giroCode(EventParticipant $participant, array $configuration): ?string { $amountLeft = clone $participant->amount; if ($participant->amount_paid !== null) { $amountLeft->subtractAmount($participant->amount_paid); } if ($amountLeft->getAmount() <= 0) { return null; } $provider = new GiroCodeProvider( (string)($configuration['account_owner'] ?? ''), (string)($configuration['iban'] ?? ''), $amountLeft->getAmount(), (string)$participant->payment_purpose, ); return (string)$provider->create(); } protected function invoiceClosingStatement(CreateInvoiceRequest $request): string { // TODO: In einer Folge-Iteration ausformulieren (z.B. "Bitte überweise bis zum ... auf IBAN ..."). return ''; } }