Global

Methods

# decode(buffer, config) → {object|object}

Convert an ISO 8583 message buffer to JSON, Refer to configuration
Parameters:
Name Type Description
buffer buffer ISO 8583 encoded buffer
config object Custom conf configurations. Can be { lenHeaderEncoding: 'utf8'/'hex', bitmapEncoding: 'utf8'/'hex', secondaryBitmap: false/true, }

View Source ISO8583.ts, line 552

ISO 8583 JSON
object
Object with property error
object
Examples
new Main().getIsoJSON(buffer, config) -> {...}
new Main().getIsoJSON(buffer, config) -> {error: 'some error message'}

# encode() → {buffer|object}

View Source ISO8583.ts, line 611

ISO 8583 encoded Buffer
buffer
Object with property error
object
Examples
new Main(SomeValidMessage,customFormats, []).getBufferMessage() -> <Buffer 01 11 30 31 30 30 f2 ...
new Main(SomeInvalidMessage,customFormats, []).getBufferMessage() -> {error: 'some error message'}

# getBitMapHex_127_ext() → {string|object}

Gets the bitmap of fields 127.0 to 127.63

View Source ISO8583.ts, line 419

The bitmap of fields 127.0 to 127.63 in binary form
string
Object with property error
object
Examples
new Main(SomeValidMessage,customFormats, []).getBitMapHex_127_ext() -> 8000008000000000
new Main(SomeInvalidMessage,customFormats, []).getBitMapHex_127_ext() -> {error: 'some error message'}

# getBitMapHex_127_ext_25() → {string|object}

Gets the bitmap of fields 127.25.0 to 127.63

View Source ISO8583.ts, line 447

The bitmap of fields 127.25.0 to 127.25.63 in binary form
string
Object with property error
object
Examples
new Main(SomeValidMessage,customFormats, []).getBitMapHex_127_ext_25() -> fe1e5f7c00000000
new Main(SomeInvalidMessage,customFormats, []).getBitMapHex_127_ext_25() -> {error: 'some error message'}

# getBmpsBinary() → {string|object}

Gets the bitmap of entire message field 0 to 127

View Source ISO8583.ts, line 386

The bitmap of fields 0-127 in binary form
string
Object with property error
object
Examples
new Main(SomeValidMessage,customFormats, []).getBmpsBinary() -> 1111001000111.....
new Main(SomeInvalidMessage,customFormats, []).getBmpsBinary() -> {error: 'some error message'}

# getBufferMessage(buffer, config) → {buffer|object}

Parameters:
Name Type Description
buffer buffer ISO 8583 encoded buffer
config object Custom conf configurations
Deprecated:
  • will be removed in next version. Use encode instead

View Source ISO8583.ts, line 590

ISO 8583 encoded Buffer
buffer
Object with property error
object
Examples
new Main(SomeValidMessage,customFormats, []).getBufferMessage() -> <Buffer 01 11 30 31 30 30 f2 ...
new Main(SomeInvalidMessage,customFormats, []).getBufferMessage() -> {error: 'some error message'}

# getIsoJSON(buffer, config) → {object|object}

Convert an ISO 8583 message buffer to JSON, Refer to configuration ::Deprecated
Parameters:
Name Type Description
buffer buffer ISO 8583 encoded buffer
config object Custom conf configurations. Can be { lenHeaderEncoding: 'utf8'/'hex', bitmapEncoding: 'utf8'/'hex', secondaryBitmap: false/true, }
Deprecated:
  • Will be removed in the next version, use decode instead

View Source ISO8583.ts, line 521

ISO 8583 JSON
object
Object with property error
object
Examples
new Main().getIsoJSON(buffer, config) -> {...}
new Main().getIsoJSON(buffer, config) -> {error: 'some error message'}

# getMti() → {buffer|object}

Get the Message Type Identifier (MTI)

View Source ISO8583.ts, line 252

ISO 8583 encoded Buffer
buffer
Object with property error
object
Examples
new Main(SomeValidMessage,customFormats, []).getMti() -> 0100
new Main(SomeInvalidMessage,customFormats, []).getMti() -> {error: 'some error message'}

# toAdvice() → {object}

Convert an ISO 8583 message to an advise type; Append the an advise MTI.

View Source ISO8583.ts, line 87

New ISO 8583 message with an advise MTI.
object
Example
toAdvice({'0': '0100', ...}) -> {'0': '0120', ...}

# toResponse() → {object}

Convert an ISO 8583 message to a response type; Append the response MTI.

View Source ISO8583.ts, line 72

New ISO 8583 message with a response MTI.
object
Example
toResponse({'0': '0100', ...}) -> {'0': '0110', ...}

# toRetransmit() → {object}

Convert an ISO 8583 message to a retransmit type; Append the retransmit MTI.

View Source ISO8583.ts, line 57

New ISO 8583 message with a retransmit MTI.
object
Example
toRetransmit({'0': '0100', ...}) -> {'0': '0101', ...}

# validateMessage() → {boolean|boolean}

Check if message is valid.

View Source ISO8583.ts, line 169

true
boolean
false
boolean
Examples
new Main(SomeValidMessage,customFormats, []).validateMessage() -> true
new Main(SomeInvalidMessage,customFormats, []).validateMessage() -> false