More improvements
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user