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
@@ -64,7 +64,7 @@ class SetPaymentMethodsCommand
// Bestehende Zuweisung: Config nur bei explizitem Override anpassen, sonst unverändert lassen.
if ($override !== null) {
$row = $existing[$slug];
$row->configuration = PaymentMethod::sanitizeConfiguration($slug, $override);
$row->configuration = $this->eventConfiguration($slug, $override);
$row->save();
}
continue;
@@ -75,8 +75,27 @@ class SetPaymentMethodsCommand
EventPaymentMethods::create([
'event_id' => $event->id,
'slug' => $slug,
'configuration' => PaymentMethod::sanitizeConfiguration($slug, $snapshot ?? []),
'configuration' => $this->eventConfiguration($slug, $snapshot ?? []),
]);
}
}
/**
* Was von einer Konfiguration am Event gespeichert wird.
*
* Neben dem Zuschnitt aufs Schema fallen hier die tenant-weiten Optionen heraus. Das
* Kontoauszug-Format etwa beschreibt die Bank, nicht die Zusage an die Teilnehmenden -- eingefroren
* ließe sich nach einem Bankwechsel für laufende Aktionen nichts mehr importieren. IBAN und
* Kontoinhaber frieren dagegen weiterhin pro Aktion ein.
*
* @param array<string, mixed> $configuration
* @return array<string, mixed>
*/
private function eventConfiguration(string $slug, array $configuration): array
{
return PaymentMethod::stripTenantScopedOptions(
$slug,
PaymentMethod::sanitizeConfiguration($slug, $configuration),
);
}
}