Command iso8583.getfield

The command iso8583.getfield is used to extract a field from the message previously analyzed.

The command iso8583.getfield is used to extract a field from a message previously analyzed in ascending order.

Parameters

  1. fieldnumber [integer]
    Number of the field to be extracted.
  2. type [string]
    Field type to be extracted from the message, which can be string or integer.
  3. variablevalue [string ou integer]
    Variable where the extracted value will be stored.
  4. variablereturn [integer]
    Variable that will store the return code, where:
    • 0: Field extracted successfully
    • -801: Invalid parameter
    • -802: Function error
    • -803: Buffer overrun
    • -805: No field
    • -806: Msg error

Example

In the example above, after processing the transaction and analyzing the ISO message returned by the authorizer, as shown in the example iso8583.analyzemessage, it is possible to start retrieving the field values of the message with the command iso8583.getfield.

ATTENTION!

The field extraction must be done in ascending order.