Add Euro and Foreign Transactions, refactor Domestic Transactions - #20
Open
martenb wants to merge 6 commits into
Open
Add Euro and Foreign Transactions, refactor Domestic Transactions#20martenb wants to merge 6 commits into
martenb wants to merge 6 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.