Configuring packager for a variable length subfield like Mastercard Field 126.7

38 views
Skip to first unread message

adnaan...@gmail.com

unread,
Dec 29, 2022, 9:38:13 AM12/29/22
to jPOS Users
The last subfield (126.7) of Mastercard Field 126 is a variable length subfield. But it doesn't contain length bytes at the start of the subfield. How can I configure a packager for this?

Below is what I have configured, but it creates problem in parsing when the length of Field-126.7 is less than 26. Please guide.



<isofieldpackager id="126" length="50" class="org.jpos.iso.IFA_LLLCHAR" packager="org.jpos.iso.packager.GenericSubFieldPackager" emitBitmap="false" maxValidField="7" name="Switch Private Data">
<isofield id="0" length="1" class="org.jpos.iso.IF_NOP" name="NOT PRESENT" />
<isofield id="1" length="3" class="org.jpos.iso.IF_CHAR" name="Settlement Service Data" />
<isofield id="2" length="10" class="org.jpos.iso.IF_CHAR" name="Single Message System Private Data 1" />
<isofield id="3" length="1" class="org.jpos.iso.IF_CHAR" name="Cross-Border Transaction Indicator" />
<isofield id="4" length="1" class="org.jpos.iso.IF_CHAR" name="Currency Indicator" />
<isofield id="5" length="3" class="org.jpos.iso.IF_CHAR" name="Fraud Score" />
<isofield id="6" length="6" class="org.jpos.iso.IF_CHAR" name="Fraud Risk Indicator" />
<isofield id="7" length="26" class="org.jpos.iso.IF_CHAR" name="Single Message System Private Data 2" />
</isofieldpackager>

adnaan...@gmail.com

unread,
Jan 4, 2023, 8:17:28 AM1/4/23
to jPOS Users
Can anyone help on this?

Mark Salter

unread,
Jan 4, 2023, 1:58:30 PM1/4/23
to jpos-...@googlegroups.com
It is a private field, can you correct the definition of this field to include a length?

Can you share why the field will be shorter than defined? Perhaps it is absent rather than shorter?

If you cannot change/correct the whole field structure, then you can deal with the field as a whole instead of the subfield and breaking up manually based on the number of bytes available.


-- 
Mark


Sent from Proton Mail mobile



-------- Original Message --------
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/2aa6f905-84a1-4f48-80ca-31a383276e82n%40googlegroups.com.
signature.asc
Reply all
Reply to author
Forward
0 new messages