Command iso8583.transactmessage

Knowledge of ISO-8583 is required to use this command.

Parameters

  1. channel [string]
    Size that will be added. Available channels:
    • NONE: No size added
    • NAC: 2 binary bytes (x01 x00 or 0000-0001 0000-0000)
    • NCC: 2 bytes on the format BCD (x02 x56)
    • RAW: 4 binary bytes (x00 x00 x01 x00 ou 0000-0000 0000-0000 0000-0001 0000-0000)
    • ASCII: 4 ASCII bytes (x30 x32 x35 x36 or 0256)
  2. header [string]
    Header used to route and ensure the message integrity, added to the beginning of the message.
  3. trailler [string]
    Trailer used to route and ensure the message integrity, added to the end of the message.
  4. isomsg [string]
    ISO8583 message including the ISO data (message fields).
  5. variableresponse [string]
    ISO8583 message with the data sent by the host authorizer.
  6. variablereturn [integer]
    Variable that will store the return code, where:
    • 0: Size of the response message
    • -1: Channel unknown or not implemented
    • -2: Failed to connect to the host or while attempting to dial
    • -3: Failed to send send the message to the host authorizer
    • -4: Failed to receive the size of the response message
    • -5: Failed to receive the response message

Example

The command iso8583.transactmessage is used to add the size, header, trailer and send the ISO message to the authorizer.

In the example above, the function transactIsoMessage was created to handle the host communication through the command preconnect, and also to send the ISO message to the authorizer through the command iso8583.transactmessage.

The ISO8583 message is stored on the variable sMsgIso8583 and ready to be sent. The information regarding the header and trailer are going to be stored on the variables to be defined, according to the parameters defined on the command iso8583.transactmessage, assuming that the host authorizer is expecting this behavior.

When successfully finishing the transaction, the ISO8583 message received from the host will be stored on the variable sReceiveMsgISO, with the data according to the bitmap specification.