How to remove left and right padding for IFB_LLNUM

95 views
Skip to first unread message

Karimullah Syed

unread,
Nov 26, 2021, 2:20:25 AM11/26/21
to jPOS Users
Hi AlejandroRevilla,

Hoping your doing good.

My Concern is regarding removing the left and right padding of zero for IFB_LLNUM

For one of our acquirer we are using IFB_LLNUM(37,"Track 2 Data",false) for DE 35.
When we are using this its right padding zero at the last.

Ex: My actual data is length (37) and Track2 data 375318290000935257=23066261240166200000  from Terminal 

Length : 37 
Track2 data : 5318290000935257=23066261240166200000

But when trying to print the Hexa dump for the above we are able to see the padding zero at the end 375318290000935257d230662612401662000000

Please check below Hexa dump

HexaDump :
02003020058020c012040000000000000200000005890051001100375318290000935257d230662612401662000000333337313833343739353335303233322020202020202083417a30006291200151820239008407a0000000041010950500000480009a032111259c01009f3501225f2a0203565f3401009f02060000000200009f03060000000000009f090200029f10120110a04001220000000000000000000000ff9f1a0203569f1e0831313930383930389f26081037f402d408d59a9f2701809f3303e0f8c89f34034203009f360204b69f3704588895049f4104000012329f5301520006303030323739

Now our acquirer is claiming why are sending the extra zero is appending

Request you to please help on the same. How to remove the extra zero in the right or left.

Thanks,
Karimullah Syed

Alejandro Revilla

unread,
Nov 26, 2021, 4:20:25 PM11/26/21
to jpos-...@googlegroups.com
IFB_LLNUM packs the message using BCD. BCD uses four-bits per digit (called a nibble, it's basically half a byte).

In order to transmit an odd number of nibbles (37 in this case), you need to agree how to pad the missing one, either to the left, or to the right.

It's customary to use a '0' with padding from the left, and an 'F' when padding to the right.

Change that 'false' to 'true', and you should be ready to go.

I'd strongly suggest you to use the GenericPackager with a suitable XML configuration, it's quite easier to handle.



--
--
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/0447ef6c-c503-47af-93ba-cc2bb754263an%40googlegroups.com.

Karim Syed

unread,
Dec 1, 2021, 5:04:28 AM12/1/21
to jpos-...@googlegroups.com
Hi  AlejandroRevilla,

Thanks a ton for your response.

Here the padding is false and the zero is appending at the right,

But our Acquirer or host wants the F at the right.

Ex : 
When I made false in the padding then 375318290000935257d230662612401662000000 {Padding at right}
When I made true in the padding then  3705318290000935257d23066261240166200000 {Padding at left}

But Host or Server wants the F at the right
Ex :
 375318290000935257d23066261240166200000F { Expectation}

Request you to suggest.






--




Thanks & Regards
Karimullah Syed
Contact no : +91 9036588861

 

Alejandro Revilla

unread,
Dec 1, 2021, 8:39:26 AM12/1/21
to jPOS Users
If leftPadding is false, it should add an 'F' exactly in this line: https://github.com/jpos/jPOS/blob/master/jpos/src/main/java/org/jpos/iso/BCDInterpreter.java#L62

Perhaps you can create a test case to demonstrate the problem so we can fix it.

murtuza chhil

unread,
Dec 1, 2021, 8:52:58 PM12/1/21
to jPOS Users
Reply all
Reply to author
Forward
0 new messages