New issue 9 by rich...@flafreeit.com: modified header between length and MTI
http://code.google.com/p/iso8583py/issues/detail?id=9
There are acquirers out there who have modified the ISO8583 from the spec.
(redefineBit works great), however, some acquirers also insert a header of
their own design between the initial length indicator and the MTI.
For example, the original....
[LL] [MTI] [bitmap1]...
where the vendor wants to see:
[LL] [HEADER] [MTI] [bitmap1]...
Since I'm already overriding __init__() in order to redefine some of the
BITs, I could also override this function... Wouldn't it be better to
provide the header in a param as part of the init? or maybe as part of the
getter/setter?
Comment #1 on issue 9 by igo...@gmail.com: modified header between length
and MTI
http://code.google.com/p/iso8583py/issues/detail?id=9
This is a generic ISO8583 library.
So we cannot adapt to each vendor that "change" the spec.
To help users that have problems like that, we can generate the ISO8583
easy, and before send throw the socket the "official ISO8583" we get the
ASCII package, add the header and the size, example:
HEADER = 'WHIT'
iso = ISO8583()
iso.setMTI('0800')
(...)
isoASCII = iso.getRawIso()
vendorIso = HEADER + isoASCII
# Example: big-endian
netIso = struct.pack('!h',len(vendorIso))
netIso += vendorIso
# Now can send netIso to the vendor ...
Please refer PyDocPage's manual to understand getNetworkISO.