feat(iso): add MessageErrorIndicator for DE-018 wire encoding#684
Merged
Conversation
Introduces MessageErrorIndicator in org.jpos.iso for structured encoding/decoding of the DE-018 Message Error Indicator field. - Inner enum ErrorCode: ISO 8583:2023 Table D.15 error codes 0001-0013 - Inner enum Severity: REJECTED (00) / WARNING (01) - Inner class FieldError: one 14-byte error set with factory methods: - primitiveError() -- primitive DE errors - constructedError() -- sub-element errors in constructed DEs - compositeError() -- dataset/tag errors in composite DEs - withRawCode() -- private/national-use error codes - pack()/unpack() round-trip: byte-accurate to ISO 8583:2023 §DE-018 - Integrates with ISOMsg via ISOBinaryField(18, mei.pack()) - Full unit test suite: 15 tests covering all error types, severity, round-trips, edge cases and ISOMsg integration
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.
Introduces
MessageErrorIndicatorinorg.jpos.isofor structured encode/decode of the ISO 8583 DE-018 (Message Error Indicator) field.API
Inner types
ErrorCode— ISO 8583:2023 Table D.15 codes 0001–0013;of(int)for private/national-use codesSeverity—REJECTED(00) /WARNING(01)FieldError— one 14-byte error set with factory methods for primitive, constructed, and composite DE errorsWire format
14 bytes per error set: N2 severity + N4 error code + N3 DE number + N2 sub-element + B1 dataset id + B2 dataset bit/tag. Up to 10 sets, up to 140 bytes total.
Tests
15 unit tests covering all error types, severity, round-trips, edge cases, and
ISOMsgintegration.