0
----ISO MESSAGE-----
  MTI : 0200
    Field-2 : 169991000501589186
    Field-3 : 301000
    Field-4 : 000001000000
    Field-7 : 0620104505
    Field-11 : 177
    Field-12 : 104505
    Field-13 : 0620
    Field-15 : 1115
    Field-18 : 0000
    Field-24 : 001
    Field-28 : 00000000
    Field-32 : 1158943000
    Field-33 : 06000001
    Field-35 : 279991000501589186=0903121550
    Field-37 : 082400096515
    Field-41 : 0540
    Field-42 : 000540
    Field-43 : kkk
    Field-49 : 586
    Field-52 : 12345678

this is iso message breakdown of this binary series as you see this binary 01110010 00111010 01000001 00010001 10101000 11100000 00111111 00000000 the field from 51 to 56 is active when we activate(enable) 49 field and 52 field simultaneously then bitmap goes wrong using jpos

Youcef LAIDANI
  • 55,661
  • 15
  • 90
  • 140
user3621756
  • 13
  • 2
  • 6
  • Can you show the code that is generating that message in jpos? – Andrés Alcarraz Jun 20 '17 at 08:59
  • public static byte[] bitSet2byte (BitSet b, int bytes) { int len = bytes * 8; byte[] d = new byte[bytes]; for (int i=0; i> 3] |= 0x80 >> i % 8; //TODO: review why 2nd & 3rd bit map flags are set here??? if (len>64) d[0] |= 0x80; if (len>128) d[8] |= 0x80; return d; } – user3621756 Jun 20 '17 at 09:03
  • I don't see anything jpos related there, and please add it correctly formated to your question, and also you the parts involving jpos. And that are calling that function, that too generic to be able to provide you with something – Andrés Alcarraz Jun 20 '17 at 09:04
  • For the record you don't need to set bitmap in jpos. It generates it for you when you set the fields. – Andrés Alcarraz Jun 20 '17 at 09:09
  • Yes You are right but my question is i have defined above fields jpos generate bitmap against these field when i check the bitmap in binary format then it change the bitmap case is only when we define 49 field and 52 field simultenously.rest of fields bitmap working fine – user3621756 Jun 20 '17 at 09:13
  • So please can you show the code in order to investigate? – Andrés Alcarraz Jun 20 '17 at 09:16
  • I think you are getting into a trouble that you don't need to have, jPOS handles bitmaps automatically and they do that quite right. – apr Jun 20 '17 at 17:23

1 Answers1

0

@user3621756:

From your code above, what I infer is you are taking the field values wrong, ISO field bitmap representation is IFA_LLNUM for field 2 (PAN) will be 16|9991000501589186.

16 is the field length not the data itself and so field 35 (track 2 data for card).

Have kept the pipe to differentiate the length and the field value

MTI : 0200
    Field-2 : 169991000501589186
    Field-3 : 301000
    Field-4 : 000001000000
    Field-7 : 0620104505
    Field-11 : 177
    Field-12 : 104505
    Field-13 : 0620
    Field-15 : 1115
    Field-18 : 0000
    Field-24 : 001
    Field-28 : 00000000
    Field-32 : 1158943000
    Field-33 : 06000001
    Field-35 : 279991000501589186=0903121550
    Field-37 : 082400096515
    Field-41 : 0540
    Field-42 : 000540
    Field-43 : kkk
    Field-49 : 586
    Field-52 : 12345678 

Bitmaps are generated by ISOMsg class when you invoke the method .pack(), but you can also do reverse by .unpack, in the end pack should give you the right Message with bitmaps, and unpack should get you the correct field values.

If your bitmap is incorrect you shall receive errors while you unpack.

RalfFriedl
  • 1,134
  • 3
  • 11
  • 12
Ronald N
  • 1
  • 1