Moved bank transfer logic to special module

This commit is contained in:
2026-08-05 10:00:02 +02:00
parent d1ef092bc3
commit e55cdd1988
22 changed files with 669 additions and 165 deletions
@@ -4,10 +4,13 @@ namespace App\EventPaymentModules\Modules;
use App\EventPaymentModules\AbstractEventPaymentModule;
use App\EventPaymentModules\DTO\CreateInvoiceRequest;
use App\EventPaymentModules\DTO\RegistrationSummaryRequest;
use App\EventPaymentModules\DTO\RegistrationSummaryResponse;
use App\Models\PaymentMethod;
/**
* Sonstiges (Barzahlung, Zahlung vor Ort) -- keine konfigurierbaren Optionen, keine aktive Zahlung.
* Sonstiges (Barzahlung, Zahlung vor Ort) -- die anzuzeigende Zahlungsinformation ist nutzerdefiniert
* (mehrzeiliger Freitext) und wird als Option gepflegt.
*/
class UndefinedPaymentModule extends AbstractEventPaymentModule
{
@@ -23,7 +26,21 @@ class UndefinedPaymentModule extends AbstractEventPaymentModule
public function getOptions(): array
{
return [];
return [
['name' => 'payment_information', 'label' => 'Zahlungsinformationen', 'type' => 'richtext', 'required' => true],
];
}
public function registrationSummary(RegistrationSummaryRequest $request): RegistrationSummaryResponse
{
$html = (string)($request->configuration['payment_information'] ?? '');
$response = new RegistrationSummaryResponse();
$response->hasPaymentInformation = trim($html) !== '';
$response->html = $html;
$response->showGiroCode = false;
return $response;
}
protected function invoiceClosingStatement(CreateInvoiceRequest $request): string