How to create packager xml for field 55 to pack for Amex.

708 views
Skip to first unread message

Syed Hassan

unread,
Dec 30, 2016, 6:37:13 AM12/30/16
to jPOS Users

Hi Team,

I am trying to create packager xml to pack field 55(ICC) and send it to Amex format.field values will be fileName,fileVersion Number followed by subfields.

When used below snippet,

<isofield
      id="55"
      length="259"
      name="integration circuit card system"
      class="org.jpos.iso.IFE_LLLCHAR"/>

 Since it is requires version name and number followed by subfileds.

Also I tried with below xml code snippet.

<isofieldpackager
      id="55"
        name="integration circuit card system"
      length="259"
      class="org.jpos.iso.IFE_LLLCHAR"
      emitBitmap="false"
      tagMapper="org.jpos.iso.packager.TTTDecimalTagMapper"
      packager="org.jpos.iso.packager.GenericSubFieldPackager">
         
          <isofield
          id="0"
          length="4"
          name="ICC HEADER VERSION NAME"
          class="org.jpos.iso.IFE_CHAR"/>...

out put for both remains with below values(File name is constant AGNS and version 001).but it is appended with some special char !!.

American Express Application Cryptogram (re)computation.


 Subfield 1 - ICC Header Version Name                         = "\x01\x04AG"


 Subfield 2 - ICC Header Version Number                       = 'D5 E2'


 Subfield 3 - Application Cryptogram                          = '02 37 F0 F0 F0 F1 FF 50'


 Recalculated Application Cryptogram                          = '91 69 88 B1 16 AC CF 04

Kindly suggest how to remove that extra and send it AGNS in file name field..

Syed Hassan

unread,
Dec 30, 2016, 7:34:45 AM12/30/16
to jPOS Users
I have tried with below code snippet as well.

<isofieldpackager id="55" length="999" name="ICC Data" class="org.jpos.iso.IFE_LLLBINARY" packager="org.jpos.iso.packager.GICCSubFieldPackager">
      <isofield
          id="0"
          length="8"
          name="DUMMY"
          class="org.jpos.iso.IF_CHAR"/> 
 <isofield
          id="1"
          length="8"
          name="9F26"
          class="org.jpos.iso.IFEP_LLLBINARY"/>

But same out put as below.

American Express Application Cryptogram (re)computation.


 Subfield 1 - ICC Header Version Name                         = "\x01???"


 Subfield 2 - ICC Header Version Number                       = '4E 53'


 Subfield 3 - Application Cryptogram                          = '02 04 30 30 30 31 9F 26'

Kindly suggest.

Victor Salaman

unread,
Dec 30, 2016, 7:38:12 AM12/30/16
to jpos-...@googlegroups.com
Hi:

Follow the GCAG Spec. Amex's field 55 contains a header and then the specified tags in order as written in the spec, not as TLV. 

/V

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/4506953b-a6ea-47e9-944c-9b2e86cc4817%40googlegroups.com.

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

integrater

unread,
Dec 30, 2016, 9:09:18 AM12/30/16
to jPOS Users
Thanks Victor,

Yes,I have GCAG Spec,header information containsVLI(Num ebcdic),header name(alf ebcdic) and file version(bcd) then followed by sub fileds.

Als you mean we should not do TLV packing for this sub fileds ..right ?

currently I am packing as TLV tag and sending it. kindly share if any sample packager xml for for this kind ?
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.

Andy Orrock

unread,
Dec 30, 2016, 9:21:12 AM12/30/16
to jpos-...@googlegroups.com
No shortcut here: You have to manage through code thanks to AMEX's cherry-picking ways

You do this:

  <isofield
      id="55"
      length="255"
      name="INTEGRATED CARD CIRCUIT SYSTEM RELATED DATA"
      class="org.jpos.iso.IFE_LLLBINARY"/>

Then, do this:

        StringBuffer bit55 = new StringBuffer();
        bit55.append("C1C7D5E20001");

Then, make your way through your incoming list (from the device) doing something like this to build your outbound data:

    // List of fields that should be send inside Bit 55 on request
    // 9F26 - Application Cryptogram - Cryptogram returned by the ICC in response of the GENERATE AC command
    // 9F10 - Issuer Application Data - Contains proprietary application data for transmission to the issuer in an online transaction
    // 9F37 - Unpredictable Number - Value to provide variability and uniqueness to the generation of a cryptogram
    // 9F36 - Application Transaction Counter (ATC) - Counter maintained by the application in the ICC (incrementing the ATC is managed by the ICC)
    // 95   - Terminal Verification Results (TVR) - Status of the different functions as seen from the terminal
    // 9A   - Transaction Date - Local date that the transaction was authorised
    // 9C   - Transaction Type - Indicates the type of financial transaction, represented by the first two digits of ISO 8583:1987 Processing Code
    // 9F02 - Amount, Authorised (Numeric) - Authorised amount of the transaction (excluding adjustments)
    // 5F2A - Transaction Currency Code - Indicates the currency code of the transaction according to ISO 4217
    // 9F1A - Terminal Country Code - Indicates the country of the terminal, represented according to ISO 3166
    // 82   - Application Interchange Profile - Indicates the capabilities of the card to support specific functions in the application
    // 9F03 - Amount, Other (Numeric) - Secondary amount associated with the transaction representing a cashback amount
    // 5F34 - Application PAN Sequence Number - Identifies and differentiates cards with the same PAN
    // 9F27 - Cryptogram Information Data - Indicates the type of cryptogram and the actions to be performed by the terminal
    private static final String TAG_BIT_55_REQ_LIST = "9F26.9F10.9F37.9F36.95.9A.9C.9F02.5F2A.9F1A.82.9F03.5F34.9F27";

....anything that matches is in.  Anything that doesn't match that list is out.

--------
Andy

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.

integrater

unread,
Dec 30, 2016, 11:37:46 AM12/30/16
to jPOS Users
Thanks Andy,

I have done the required changes.out put of this is as below.looks like it is not got converted to expected format.

Subfield 1 - ICC Header Version Name                         = "\x0C\x1C';"


 Subfield 2 - ICC Header Version Number                       = '20 00'
--------
Andy

Andy Orrock

unread,
Dec 30, 2016, 11:57:30 AM12/30/16
to jpos-...@googlegroups.com
Note that when I told you:

bit55.append("C1C7D5E20001");

...that I'm providing you with hex equivalent of 4 *EBCDIC* byes + 2-byte BCD version number.  You are going to have to manage -- in your code -- an understanding of the nuances of each of those fields -- AMEX intermingles EBCDIC + binary here (it sucks, but that's how they did it).  Unfortunately, you can't just plop sh-t into AMEX's Field 55 and hope for the best.

--------
Andy

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.

Syed Hassan

unread,
Dec 30, 2016, 2:01:02 PM12/30/16
to jpos-...@googlegroups.com
Thanks Andy,
Header name and filne number are populating as expected.



You received this message because you are subscribed to a topic in the Google Groups "jPOS Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jpos-users/0wioWQjS8SA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jpos-users+unsubscribe@googlegroups.com.

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

Andy Orrock

unread,
Dec 30, 2016, 2:33:28 PM12/30/16
to jpos-...@googlegroups.com
Good news!

Yeah, feel your pain: AMEX's implementation is weird: a fixed-field representation of what should be natively TLV.  Feels like a hijacking. Interfaces other than AMEX roll with TLV.

--------
Andy

Reply all
Reply to author
Forward
0 new messages