Closed codedius closed 11 months ago
@codedius Thanks for reporting this. At the moment I really don't have the bandwidth to look into this. I will be glad if you can open a PR to address it. Bear in mind that the fix should cater for a general use not for your use case. Thanks
@codedius I will have to close this issue because there is no activity. Feel free to reopen it.
@codedius I would like to know whether you have an opportunity to fix this. I am reopening the issue.
Hi @Tochemey !
Trying to use your lib with the UK FasterPayments (FPS) integration and there's might be an issue:
Message: 9804000001020000000089118000000000000000007 (Type 9804, ASCII, BCD bitmap)
FPS has their own implemetation of the ISO8583 and fields of the message above are:
The problem with the 125 field that is conditional and it might be in the message (with the secondary bitmap) but might be not (therefore secondary bitmap is also absent). So the description of the lib says:
And it works perfectly with fields up to 64 even though they are not presented in the message. But once I have field 125 in my parsing template and it is not presented in the message AND secondary bitmap is not presented as well the parsing crashes with the message in my case:
System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') Actual value was 124.'
If I remove 125 from parsing template, then it works.
What I want is be able to put any conditional fields in the parsing template regardless of bitmap they are belong and get correct message with posibility to check whether conditional fields parsed or not. Looks like the lib relies on the bitmaps presented, so If there are no field AND no bitmap it crashes.
Seems like it's MessageFactory.cs, Line 588:
if (bs.Get(i - 1))