Moved bank transfer logic to special module
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user