How to parse the DE 55 and print the TLV

927 views
Skip to first unread message

Karimullah Syed

unread,
Mar 25, 2019, 1:02:46 PM3/25/19
to jPOS Users
Dear All,


String emvData="84667DD7C0F1F32A02606588789A57A7A9EEE1583544CB8A6B140D071924D35D949ED5ED7A54B69A84667DD7C0F1F32A02606588789A57A7A9EEE1583544CB8A0723DB6DF0FCE6CF0000000000000000";


I need to parse the above emv data which come from the terminal (ingenico,verifone) in DE 55 to my jpos application,
How do i parse the EMV tags Tag length Value,how to print the tag values with the above emv data in the java example.

Appreciated, if some one shares the snippet of java code for parse the emv data.looking for the java snippet code.it will really help me a lot.

Thanks
Karimullah Syed.

Alejandro Revilla

unread,
Mar 25, 2019, 8:43:25 PM3/25/19
to jPOS Users

This ICC data seems weird (is it truncated?), but you can use code like this:

import org.jpos.iso.*;
import org.jpos.tlv.*;

byte[] emvData = ISOUtil.hex2byte("84667DD7C0F1F32A02606588789A57A7A9EEE1583544CB8A6B140D071924D35D949ED5ED7A54B69A84667DD7C0F1F32A02606588789A57A7A9EEE1583544CB8A0723DB6DF0FCE6CF0000000000000000");

TLVList tlv = new TLVList();
tlv.unpack (emvData);
tlv.dump (System.out, "");

It seems you have tag 08 and F0 there.





--
--
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 post to this group, send email to jpos-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/5d7ee4d0-c44b-416d-a351-e677ed70e373%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chinwendu Ochonma

unread,
Jul 5, 2022, 5:01:10 AM7/5/22
to jPOS Users
When I execute the code above with a different ICC data, it outputs the xml below, is that what is referred to as TLV format ?

If it is the TLV format, how do I retrieve into a variable and how can I pass it to a field 55 in an ISO message ?

<tlvlist>
   <tag id='9f26' value='5C2B1447476C64A7' />
   <tag id='9f27' value='80' />
   <tag id='9f10' value='0110A080002A0000C32700000000000000FF' />
   <tag id='9f37' value='56B7BFA0' />
   <tag id='9f36' value='1080' />
   <tag id='95' value='0080248800' />
   <tag id='9a' value='220704' />
   <tag id='9c' value='00' />
   <tag id='9f02' value='000000002000' />
   <tag id='5f2a' value='0566' />
   <tag id='82' value='3800' />
   <tag id='9f1a' value='0566' />
   <tag id='9f34' value='420300' />
   <tag id='9f33' value='E0F8C8' />
   <tag id='9f35' value='22' />
   <tag id='9f1e' value='3030303030303031' />
   <tag id='84' value='A0000000041010' />
   <tag id='9f09' value='0004' />
   <tag id='9f03' value='000000000000' />
   <tag id='5f34' value='00' />
</tlvlist>

Alejandro Revilla

unread,
Jul 6, 2022, 9:16:55 PM7/6/22
to jpos-...@googlegroups.com
You call m.set(55, tlv.pack());



Reply all
Reply to author
Forward
0 new messages