Skip to content

Add Euro and Foreign Transactions, refactor Domestic Transactions - #20

Open
martenb wants to merge 6 commits into
contributte:masterfrom
martenb:fix/transaction-uninitialized-properties
Open

Add Euro and Foreign Transactions, refactor Domestic Transactions#20
martenb wants to merge 6 commits into
contributte:masterfrom
martenb:fix/transaction-uninitialized-properties

Conversation

@martenb

@martenb martenb commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

No description provided.

martenb and others added 6 commits July 30, 2026 22:36
toArray() on a valid minimal transaction (only mandatory fields set)
threw "Typed property must not be accessed before initialization" for
optional properties without setters called, crashing
PaymentService::sendPayments(). Null values are already skipped by
ExportXmlGenerator, so XML output is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Extract assertMaxLength/assertExactLength/assertLengthBetween
helpers and move setPaymentReason/setPaymentType up — shared by
all transaction types, subclasses keep only their constants.
Maps to T2Transaction element (FIO API docs 6.3.2). AbroadTransaction
base holds fields shared with foreign payments (bic, beneficiary,
remittance info). Recipient account validated as IBAN.
FIO API docs 6.3.3. Stricter mandatory set than euro payments
(bic, full beneficiary address, remittanceInfo1, detailsOfCharges,
paymentReason). Recipient account is any account number, not
necessarily IBAN.
Mandatory fields per type and required batch order (domestic,
euro, foreign).
Bank rejects import unless types are ordered domestic, euro,
foreign (FIO API docs 6.3). Stable sort keyed by XML element NAME,
so custom Transaction subclasses order correctly too. Iterator
keeps insertion order, only the export is sorted.
@martenb martenb changed the title fix: make optional DomesticTransaction properties nullable Add Euro and Foreign Transactions, refactor Domestic Transactions Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant