Message class

ISO-8583 Message.

Constructors

Message(String mti)
Main constructor.
Message.ack({required String terminalId, DateTime? dateTime})
Creates an ack Message with Processig Code of 00 00 04.
factory
Message.conntectionTest({DateTime? dateTime})
Creates a connection-test Message with Processig Code of 41 00 00.
factory
Message.dispose({DateTime? dateTime})
Creates a dispose Message with Processig Code of 00 00 01.
factory
Message.eot({required String terminalId, DateTime? dateTime})
Creates an eot Message with Processig Code of 00 00 07.
factory
Message.nack({required String terminalId, DateTime? dateTime})
Creates a nack Message with Processig Code of 00 00 05.
factory
Message.parse(Uint8List data)
Parses a Message from the input byte-array.
factory
Message.purchase({required int amount, DateTime? dateTime})
Creates a purchase Message with Processig Code of 00 00 00.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
mti String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
terminalId String?
Gets the pos device terminal id (field 41).
no setter

Methods

clone() Message
Clones the message into a new instance.
encode({List<int>? macKey}) Uint8List
Encodes a Message object to a Uint8List. Optionally adds MAC to the field 64.
get(int field) Uint8List?
Gets a data element for index.
mac(List<int> key) Uint8List
Calculates the MAC for current Message.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(int field, List<int> value) → void
Sets a data element with index.
setDate(int field, DateTime value) → void
Sets a data element with index for a Date field.
setTime(int field, DateTime value) → void
Sets a data element with index for a Time field.
toJson() Map<String, Object>
Converts the Message object to JSON.
toString() String
A string representation of this object.
override
unset(int field) → void
Unset a data element for index.

Operators

operator ==(Object other) bool
The equality operator.
inherited