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
+21 -2
View File
@@ -52,14 +52,33 @@ class EventPaymentModuleRegistryTest extends TestCase
public function test_participant_options_per_module(): void
{
// Überweisung: keine payer-seitigen Eingaben.
$this->assertSame([], (new AccountTransferPaymentModule())->getParticipantOptions());
// Überweisung: keine payer-seitigen Eingaben im Anmeldeformular.
$this->assertSame([], (new AccountTransferPaymentModule())->participantInputOptions());
// Sonstiges (Barzahlung vor Ort): ebenfalls keine payer-seitigen Eingaben -- die Zahlungsart
// beschreibt sich allein über den vom Veranstalter gepflegten Freitext.
$this->assertSame([], (new UndefinedPaymentModule())->getParticipantOptions());
}
public function test_system_participant_options_stay_in_the_schema(): void
{
$module = new AccountTransferPaymentModule();
// Die Zahler-Konto-Felder trägt der Zahlungsimport nach, gefragt wird beim Anmelden nicht
// danach. Im Schema müssen sie trotzdem stehen -- sonst wirft sanitizeParticipantOptions()
// sie beim nächsten Durchlauf als unbekannte Schlüssel weg.
$names = array_column($module->getParticipantOptions(), 'name');
$this->assertSame(['payer_account_owner', 'payer_iban'], $names);
$this->assertSame(
['payer_iban' => 'DE02120300000000202051'],
$module->sanitizeParticipantOptions(['payer_iban' => 'DE02120300000000202051', 'evil' => 'x'])
);
// Kein Pflichtfeld -- eine Anmeldung ohne Zahlungseingang bleibt vollständig.
$this->assertTrue($module->participantOptionsComplete([]));
}
public function test_participant_option_helpers(): void
{
// Anonymes Modul mit einer Pflicht-Teilnehmereingabe.