Closed krishishah closed 3 years ago
@krishishah bitmap dynamically reads all bitmaps from the message as following:
I see that DE 65 is 1 bit (in some specs) but not sure what's the value of it.
May I ask you to share your code (you can do this privately) so I can better understand why it panics?
@krishishah I've fixed a tiny issue related to JSON Marshalling here https://github.com/moov-io/iso8583/pull/87
maybe it will fix your issue? :)
@alovak it's actually 8 bytes on the official ISO spec and for the scheme we are integrating against as well. It indicates the presence of a 3rd segment of the message.
The scheme we are integrating against always has it populated as 0 but the only code change we made was to add it to the message spec as a Bitmap field against index 65.
Your change fixed the issue, great work!
The official ISO8583 spec consists of an extended bitmap in DE 65. In practice, this is left empty in the vast majority of the use cases. JSON marshaling panics on a nil pointer reference on specs with this field defined.
In particular, it panics here because the underlying
utils.Bitmap
is nil at runtime:Adding a nil check before referencing the underlying bitmap fixes this issue.
Does this library have support for extended bitmaps?