Moved bank transfer logic to special module

This commit is contained in:
2026-08-05 10:00:02 +02:00
parent d1ef092bc3
commit e55cdd1988
22 changed files with 669 additions and 165 deletions
@@ -2,23 +2,21 @@
namespace App\EventPaymentModules\DTO;
use App\Models\Event;
use App\ValueObjects\Amount;
use App\Models\EventParticipant;
/**
* Eingabe für {@see \App\EventPaymentModules\EventPaymentModule::registrationSummary()}.
*
* Bewusst ohne persistierten EventParticipant: Die Zusammenfassung wird im Anmeldefluss VOR dem
* Absenden erzeugt, es existiert also noch kein Teilnehmer-Datensatz.
* Anker ist der (bereits erstellte) Teilnehmer -- daraus leiten die Module Event, Betrag/Restbetrag
* und Verwendungszweck ab. $configuration ist die aufgelöste pro-Event-Config des Zahlungsmoduls.
*/
final class RegistrationSummaryRequest
{
/**
* @param array<string, mixed> $configuration Aufgelöste (pro-Event-)Konfiguration des Moduls.
* @param array<string, mixed> $configuration
*/
public function __construct(
public readonly Event $event,
public readonly Amount $amount,
public readonly EventParticipant $participant,
public readonly array $configuration = [],
) {
}
@@ -5,17 +5,22 @@ namespace App\EventPaymentModules\DTO;
/**
* Ausgabe von {@see \App\EventPaymentModules\EventPaymentModule::registrationSummary()}.
*
* Strukturierte Daten (kein reines Vue) -- speisen sowohl die Anmelde-Zusammenfassung im Frontend
* als auch spätere API-Actions. Der obere Teil der Zusammenfassung ist für alle gleich; hier kommt
* ausschließlich der zahlungsspezifische Abschnitt.
* Render-agnostisch: speist den Zahlungs-Abschnitt sowohl im Anmeldeabschluss (Vue) als auch in den Mails.
* Zwei Darstellungsformen:
* - strukturierte $lines (label/value) -- z.B. Überweisung (Kontoinhaber, IBAN, Verwendungszweck, Betrag),
* - $html -- frei konfigurierter Text (z.B. Barzahlung).
*/
final class RegistrationSummaryResponse
{
public string $title = '';
/** Gibt es überhaupt einen Zahlungs-Info-Block darzustellen? */
public bool $hasPaymentInformation = false;
/** @var array<int, array{label: string, value: string}> Zeilen des Zahlungs-Abschnitts. */
/** @var array<int, array{label: string, value: string}> */
public array $lines = [];
/** Bestätigungstext für die Checkbox, z.B. "Ich bestätige, den Betrag von X zu überweisen.". */
public ?string $confirmationLabel = null;
/** Frei konfigurierter HTML-Text (alternativ zu $lines). */
public ?string $html = null;
/** Soll der GiroCode (QR) angezeigt werden? */
public bool $showGiroCode = false;
}