More improvements

This commit is contained in:
2026-08-05 10:55:06 +02:00
parent e55cdd1988
commit a0d26648ee
20 changed files with 279 additions and 216 deletions
@@ -4,6 +4,7 @@ namespace App\EventPaymentModules\Modules;
use App\EventPaymentModules\AbstractEventPaymentModule;
use App\EventPaymentModules\DTO\CreateInvoiceRequest;
use App\EventPaymentModules\DTO\RegistrationRenderContext;
use App\EventPaymentModules\DTO\RegistrationSummaryRequest;
use App\EventPaymentModules\DTO\RegistrationSummaryResponse;
use App\Models\PaymentMethod;
@@ -33,12 +34,19 @@ class UndefinedPaymentModule extends AbstractEventPaymentModule
public function registrationSummary(RegistrationSummaryRequest $request): RegistrationSummaryResponse
{
$html = (string)($request->configuration['payment_information'] ?? '');
$paymentInformation = (string)($request->configuration['payment_information'] ?? '');
$response = new RegistrationSummaryResponse();
$response->hasPaymentInformation = trim($html) !== '';
$response->html = $html;
$response->showGiroCode = false;
$response->hasPaymentInformation = trim($paymentInformation) !== '';
if ($response->hasPaymentInformation) {
// Medien-gerechtes Template je Render-Kontext (Web: SPA, Mail: E-Mail-tauglich).
$view = $request->context === RegistrationRenderContext::Mail
? 'payment-modules.undefined.mail'
: 'payment-modules.undefined.web';
$response->html = view($view, ['paymentInformation' => $paymentInformation])->render();
}
return $response;
}