Zahlungsparser

This commit is contained in:
2026-09-09 16:55:08 +02:00
parent ae13841699
commit 651b6147bf
38 changed files with 3308 additions and 22 deletions
+4
View File
@@ -74,6 +74,8 @@ class EventParticipant extends InstancedModel
'payment_purpose',
'payment_method',
'payment_options',
'refund_data',
'last_payment_date',
'efz_status',
'unregistered_at',
];
@@ -94,6 +96,8 @@ class EventParticipant extends InstancedModel
'amount' => AmountCast::class,
'amount_paid' => AmountCast::class,
'payment_options' => 'array',
'refund_data' => 'boolean',
'last_payment_date' => 'date',
'invoice_sequence' => 'integer',
'sibling_reduction' => 'boolean',
+18 -2
View File
@@ -58,13 +58,15 @@ class PaymentMethod extends CommonModel
}
/**
* Teilnehmer-Eingabe-Schema für einen Slug (payer-seitig).
* Teilnehmer-Eingabe-Schema für einen Slug (payer-seitig) -- das, was das Anmeldeformular
* abfragt. Programmatisch befüllte Felder (`system => true`, z.B. das vom Zahlungsimport
* nachgetragene Zahler-Konto) sind hier bewusst nicht dabei.
*
* @return array<int, array{name: string, label: string, type: string, required: bool}>
*/
public static function participantOptionsFor(string $slug): array
{
return EventPaymentModuleRegistry::forSlug($slug)?->getParticipantOptions() ?? [];
return EventPaymentModuleRegistry::forSlug($slug)?->participantInputOptions() ?? [];
}
/**
@@ -88,6 +90,20 @@ class PaymentMethod extends CommonModel
return EventPaymentModuleRegistry::forSlug($slug)?->sanitizeConfiguration($config) ?? [];
}
/**
* Entfernt die tenant-weiten Optionen eines Slugs aus einer Konfiguration.
*
* Aufgerufen beim Copy-on-Assign an eine Veranstaltung: Was den Mandanten als Ganzes betrifft
* (z.B. das Kontoauszug-Format), darf nicht pro Aktion einfrieren.
*
* @param array<string, mixed> $config
* @return array<string, mixed>
*/
public static function stripTenantScopedOptions(string $slug, array $config): array
{
return EventPaymentModuleRegistry::forSlug($slug)?->stripTenantScopedOptions($config) ?? $config;
}
/**
* Prüft, ob alle Pflicht-Optionen eines Slugs in der Konfiguration befüllt (non-empty) sind.
* Unbekannte Slugs (kein Modul) gelten als vollständig -- kein Modul, keine Pflichtfelder.