ISO 8583消息转换Hexa到字符串

时间:2015-08-06 04:41:01

标签: crc iso8583

目前,我正在与通过POS机进行交易的金融机构合作。 POS机来自injenico公司。我从POS收到HEXA消息。

005B600002000002003020058020C010042100000000000200000000160021000200374520176553390700D20026011539608150000F31303030303030323130303030303030303030303030310000000000000000006303030303036

如何将此转换为8583消息。如果我进行正常转换,它会给出一个字符串:

`"‡\0S`\0\0\0\00 € À\0!\0\0\0\0\0\0\0\0\0\0!\0\07E eS9\a\0Ò\0&9`P\010000002100000000000001\0000006"`

我认为它是加密字符串。

任何人都可以给我一个关于这个转换的想法吗?

2 个答案:

答案 0 :(得分:1)

与ISO8583-1987类似的财务信息,非常类似于 Hypercom POS数据处理程序(HPDH)消息。

前两个字节是消息大小的十六进制值,然后是5个字节的TPDU头,然后是iso 8583消息本身。以下是HPDH规范中定义的数据说明。

供参考:

  • 当您向公众共享转储时,不要使用真实卡数据 不安全的。

  • 当您尝试清除DE052中的PIN块时(我猜)您丢失了一个 十六进制字符,因为这个DE062长度被移位了。它 在示例解析中已修复。

    msg:  # Hypercom POS Data Handler (HPDH) Message
     TPDU:  # Transport Protocol Data Unit
      S01: "60" # ID  // Transactions
      S02: "0002" # Address, Destination
      S03: "0000" # Address, Originator
     MTI: "0200" # Message Type ID.  // Financial Transaction Request
     DE000: "3020058020C01004" # Primary bitmap  // 3.4.11.22.24.25.35.41.42.52.62.
     BM0:  # Fields at Primary Bitmap
      DE003:  # PC
       S01: "21" # Transaction Code.  // Payment/Deposit
       S02: "00" # Account, from.  // Default
       S03: "00" # Account, to.  // Default
      DE004: "000000020000" # Amount, transaction.  // 20000
      DE011: "000016" # STAN.  // 16
      DE022:  # POS entry mode
       PAD: "0"
       S01: "02" # PAN entry mode  // MS
       S02: "1" # PIN entry capability  // PIN
      DE024: "0002" # Network International Identifier (NII)
      DE025: "00" # POS condition code  // Normal presentment
      DE035:  # Track 2 Data
       len: "37"
       val: "452017******0700D****6011539608150000F" # Track 2.
      DE041: "10000002" # CATI.
      DE042: "100000000000001" # CAIC.
      DE052: "0000000000000000" # PIN block, encoded.
      DE062:  # Private data
       len: "0006"
       val: 
        v01: "000006" # Invoice/ECR reference number
    

答案 1 :(得分:0)

Ingenico只是硬件制造商,您必须找出谁为该POS编写软件。我是客人,这是ISO 8583 v1(1987)的变种。

005B6000020000    Maybe some header for packet
0200              MTID
3020058020C01004  BITMAP (3, 4, 11, 22, 24, 25, 35, 41, 42, 52, 62)
210000            F03 Processing code in BCD      
000000020000      F04 Amount in BCD
000016            F11 STAN in BCD
0021              F22 Point of service entry mode in BCD
0002              F24 ?
00                F25 POS condition code in BCD
374520176553390700D20026011539608150000F    F35 Track2 in BCD
3130303030303032313030303030303030303030303031 F41 and F42 in ASCII
0000000000000000  F52 Pinblock (empty)
006303030303036.  F62 Some private data