How to pack Visa acquiring spec field 56 (TLV)

566 views
Skip to first unread message

Suman Deb Nath

unread,
Sep 19, 2018, 6:37:47 PM9/19/18
to jPOS Users
Hi,

Iam new in jpos library. And finding difficulty in packaging visa field 56. can someone suggest  me how do it correctly. 

chhil

unread,
Sep 19, 2018, 10:26:35 PM9/19/18
to jpos-...@googlegroups.com
You need to write a custom class that take a string value and parses the multiple tag length values and save the tag value in a map and use it.

Here https://groups.google.com/d/msg/jpos-users/VjHm_YlclkE/KMn2rzVABgAJ is a sample of someones custom LTV. Note that its not TLV but conceptually equivalent.

If you are very adventurous you can define your packager xml to parse out the tlv for you 

Look at the test cases on how its used 

Look at how the packager is defined for TLV fields used in test cases above 
https://github.com/jpos/jPOS/blob/master/jpos/src/test/resources/org/jpos/tlv/tagged-sequence-packager.xml

My preferred way is to write a small class that parses out the TLV values into a map during unpack time. To send updated values in a responses, you would create a map with tag values and then iterate through it creating TLV for each key value pair , concatenating it and setting it in the field.

-chhil

-chhil

On Thu, Sep 20, 2018 at 4:07 AM Suman Deb Nath <suman....@gmail.com> wrote:
Hi,

Iam new in jpos library. And finding difficulty in packaging visa field 56. can someone suggest  me how do it correctly. 

--
--
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/d024dae8-5ebc-4784-9c0a-51e4cd915ee2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kogan Moonsamy

unread,
Sep 20, 2018, 3:48:22 AM9/20/18
to jpos-...@googlegroups.com
Hi,

We are currently using the TLVList library and it works well.

Regards
Kogan

Suman Deb Nath

unread,
Sep 20, 2018, 3:50:49 AM9/20/18
to jpos-...@googlegroups.com

Hi Kogan,

Can you please share me any example or sample


To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+unsubscribe@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/d024dae8-5ebc-4784-9c0a-51e4cd915ee2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

--
--
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+unsubscribe@googlegroups.com.

To post to this group, send email to jpos-...@googlegroups.com.

Kogan Moonsamy

unread,
Sep 20, 2018, 3:54:25 AM9/20/18
to jpos-...@googlegroups.com
Hi Suman,

Before I do, are you developing a Visa SMS or DMS switch?

Regards
Kogan

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/d024dae8-5ebc-4784-9c0a-51e4cd915ee2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
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.

--
--
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.

--
--
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.

Suman Deb Nath

unread,
Sep 20, 2018, 4:27:06 AM9/20/18
to jpos-...@googlegroups.com

DMS


To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+unsubscribe@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/d024dae8-5ebc-4784-9c0a-51e4cd915ee2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

--
--
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+unsubscribe@googlegroups.com.

To post to this group, send email to jpos-...@googlegroups.com.

--
--
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+unsubscribe@googlegroups.com.

--
--
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+unsubscribe@googlegroups.com.

To post to this group, send email to jpos-...@googlegroups.com.

chhil

unread,
Sep 20, 2018, 4:42:11 AM9/20/18
to jpos-...@googlegroups.com
If your field is BER (basic encoding rule) TLV then you can use TLVList else you need to write your own parser.

-chhil

Kogan Moonsamy

unread,
Sep 20, 2018, 4:42:49 AM9/20/18
to jpos-...@googlegroups.com
you will first need a list of the EMV tags valid for DE59 (You can find this on the Visa online portal). Most of them will adhere to the EMV spec, which most issuing organisations follow anyway.
Then its as easy as the following snippet:
TLVList tlvList = new TLVList();
tlvList.append(some_tag, some_value) /* To add a tag */
tlvList.deleteByTag(some_tag)

Have a look at the library for much much more...

DMS


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/d024dae8-5ebc-4784-9c0a-51e4cd915ee2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
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.

--
--
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.

--
--
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.

--
--
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.

--
--
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.

Kogan Moonsamy

unread,
Sep 20, 2018, 4:44:01 AM9/20/18
to jpos-...@googlegroups.com
Agreed Chhil... 

I know the VISA VIP spec uses Ber, so he should be fine to use TLVList.

chhil

unread,
Sep 20, 2018, 4:48:01 AM9/20/18
to jpos-...@googlegroups.com

Kogan Moonsamy

unread,
Sep 20, 2018, 4:52:02 AM9/20/18
to jpos-...@googlegroups.com
When one is new to jpos and is pressed for time, its easy to get flustered and not look at the test cases. I know because I have been there.... Good advise thou Chhil :)

Suman Deb Nath

unread,
Sep 20, 2018, 4:58:56 AM9/20/18
to jpos-...@googlegroups.com
Thanks you very much Kogan and Chhil. Its getting clear now.
Correct me if I am wrong about BER TLV:

BER TLV:(Lets take tag is C0)

Tag-> The size is 1 byte(can be more than 1 byte).  HEX number will be encoded in bytes. So C0 will be of 1 byte in size (1 byte is equal to two HEX number).

Length-> 1 byte binary, so the length will encoded as binary. Length also can be more than 1 byte 

Value-> Will be encoded as EBCDIC/ASCII 



For more options, visit https://groups.google.com/d/optout.


--
Suman Deb Nath
B.Tech in CSE ( 2009-2013)
NIT Agartala

Kogan Moonsamy

unread,
Sep 20, 2018, 5:05:25 AM9/20/18
to jpos-...@googlegroups.com
Hi Suman,

Judging by your question, I think that the best thing for you to do is to read up on BerTLV yourself and understand how it works before using it.

We dont want to re-invent the wheel by explaining something that has already been explained.

Glad I can help. Hope you come right.

Regards
Kogan

Suman Deb Nath

unread,
Sep 20, 2018, 5:20:33 AM9/20/18
to jpos-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages