For the complete documentation index, see llms.txt. This page is also available as Markdown.
Page cover

MTSCRA Events

OnDeviceList

This event occurs when device information is available.

public event DeviceListHandler OnDeviceList

public delegate void DeviceListHandler(object sender, MTConnectionType connectionType, List<MTDeviceInformation> deviceList)

Parameter

Description

Sender

Object representing the publisher of the event

connectionType

MTConnectionType value: MTConnectionType.Audio, MTConnectionType.USB

deviceList

A list of MTDeviceInformation objects

OnDeviceConnectionStateChanged

This event occurs when the connection state of the device is changed.

public event DeviceConnectionStateHandler

OnDeviceConnectionStateChanged

public delegate void DeviceConnectionStateHandler(object sender, MTConnectionState state)

Parameter

Description

sender

Object representing the publisher of the event

state

MTDeviceState value indicating the state of the device:

Disconnected Connecting Error Connected Disconneting

OnCardDataState

This event occurs when the state of the card information is changed.

public event CardDataStateHandler OnCardDataState

public delegate void CardDataStateHandler(object sender, MTCardDataState state)

Parameter

Description

sender

Object representing the publisher of the event

state

MTCardDataState value indicating the state of the card data:

DataNotReady DataReady DataError

OnDataReceived

This event occurs when card information is received from the device.

public event DataReceivedHandler OnDataReceived

public delegate void DataReceivedHandler(object sender, IMTCardData cardData)

Parameter

Description

sender

Object representing the publisher of the event

cardData

IMTCardData object containing the card information received

OnDeviceResponse

This event occurs when a response is received from the device.

public event DeviceResponseHandler OnDeviceResponse

public delegate void DeviceResponseHandler(object sender, string data)

Parameter

Description

sender

Object representing the publisher of the event

data

String representing data received

OnTransactionStatus (EMV Device Only)

This message occurs when transaction status update is received from the EMV device.

Parameter

Description

sender

Object representing the publisher of the event

data

Byte array containing the data received from the device. See table below for descriptions of the data.

0 Event

Indicates the event that triggered this notification:

· 0x00 = No events since start of transaction

· 0x01 = Card Inserted (Contact Only)

· 0x02 = Payment method communication or data error

· 0x03 = Transaction Progress Change

· 0x04 = Waiting for User Response

· 0x05 = Timed Out

· 0x06 = End of Transaction

· 0x07 = Host Cancelled Transaction

· 0x08 = Card Removed (Contact Only)

1 Current Transaction Time remaining

Indicates the remaining time available, in seconds, for the transaction to complete. If the transaction does not complete within this time, it will be aborted.

2 Current Transaction Progress Indicator

This one-byte field indicates the current processing stage for the transaction:

· 0x00 = No transaction in progress

· 0x01 = Waiting for cardholder to present payment

· 0x02 = Powering up the card

· 0x03 = Selecting the application

· 0x04 = Waiting for user language selection (Contact Only)

· 0x05 = Waiting for user application selection (Contact Only)

· 0x06 = Initiating application (Contact Only)

· 0x07 = Reading application data (Contact Only)

· 0x08 = Offline data authentication (Contact Only)

· 0x09 = Process restrictions (Contact Only)

· 0x0A = Cardholder verification (Contact Only)

· 0x0B = Terminal risk management (Contact Only)

· 0x0C = Terminal action analysis (Contact Only)

· 0x0D = Generating first application cryptogram (Contact Only)

· 0x0E = Card action analysis (Contact Only)

· 0x0F = Online processing

· 0x10 = Waiting online processing response

· 0x11 = Transaction Complete

· 0x12 = Transaction Error

· 0x13 = Transaction Approved

· 0x14 = Transaction Declined

· 0x15 = Transaction Cancelled by MSR Swipe (MSR Only)

· 0x16 = EMV error - Conditions Not Satisfied (Contact Only)

· 0x17 = EMV error - Card Blocked (Contact Only)

· 0x18 = Application selection failed (Contact Only)

· 0x19 = EMV error - Card Not Accepted (Contact Only)

· 0x1A = Empty Candidate List

· 0x1B = Application Blocked

3-4 Final Status

TBD

OnDisplayMessageRequest (EMV Device Only)

This message occurs when the EMV device has a display message to present to the user.

Parameter

Description

sender

Object representing the publisher of the event

data

Byte array containing the display message. If the length is zero, the request to clear the display.

OnUserSelectionRequest (EMV Device Only)

This message occurs when the EMV device has a user selection message to present to the user.

Parameter

Description

sender

Object representing the publisher of the event

data

Byte array containing the data received from the device. See table below for descriptions of the data.

0

Selection Type

This field specifies what kind of selection request this is:

· 0x00 – Application Selection

· 0x01 – Language Selection

1

Timeout

Specifies the maximum time, in seconds, allowed to complete the selection process. If this time is exceeded, the host should send the User Selection Result command with transaction will be aborted and an appropriate Transaction Status will be available. Value 0 is not allowed.

2

Menu Items

This field is variable length and is a collection of “C” style zero terminated strings (maximum 17 strings). The maximum length of each string is 20 characters, not including a Line Feed (0x0A) character that may be in the string. The last string may not have the Line Feed character.

The first string is a title and should not be considered for selection.

It is expected that the receiver of the notification will display the menu items and return (in the User Selection Result request) the number of the item the user selects. The minimum value of the Selection Result should be 1 (the first item, #0, was a title line only). The maximum value of the Selection Result is based on the number of items displayed.

OnARQCReceived (EMV Device Only)

This message occurs when ARQC is received from the EMV device.

Parameter

Description

sender

Object representing the publisher of the event

data

Byte array containing the data received from the device. See table below for descriptions of the data.

0 Message Length

Two-byte binary, most significant byte first. This gives the total length of the ARQC message that follows.

2 ARQC Message

Byte array containing the ARQC Message. See Appendix B for ARQC Message Format.

OnTransactionResult (EMV Device Only)

This message occurs when transaction result is received from the EMV device.

Parameter

Description

sender

Object representing the publisher of the event

data

Byte array containing the data received from the device. See table below for descriptions of the data.

0

Signature Required

This field indicates whether a card holder signature is required to complete the transaction:

· 0x00 – No signature required

· 0x01 – Signature required

If a signature is required, it is expected that the host will acquire the signature from the card holder as part of the transaction data.

1

Batch Data Length

Two-byte binary, most significant byte first. This gives the total length of the ARQC message that follows.

3

Batch Data

Byte array containing the Batch Data. See Appendix D for Batch Data Format.

OnEMVCommandResult (EMV Device Only)

This message occurs when an EMV command result is received from the EMV device.

Parameter

Description

sender

Object representing the publisher of the event

data

Byte array containing the result code received from the device. See table below for descriptions of the result code.

  • 0x0000 = Success, the transaction process has been started

  • 0x0381 = Failure, DUKPT scheme is not loaded

  • 0x0382 = Failure, DUKPT scheme is loaded but all of its keys have been used

  • 0x0383 = Failure, DUKPT scheme is not loaded (Security Level not 3 or 4)

  • 0x0384 = Invalid Total Transaction Time field

  • 0x0385 = Invalid Card Type field

  • 0x0386 = Invalid Options field

  • 0x0387 = Invalid Amount Authorized field

  • 0x0388 = Invalid Transaction Type field

  • 0x0389 = Invalid Cash Back field

  • 0x038A = Invalid Transaction Currency Code field

  • 0x038B = Invalid Selection Status

  • 0x038C = Invalid Selection Result

  • 0x038D = Failure, no transaction currently in progress

  • 0x038E = Invalid Reporting Option

  • 0x038F = Failure, transaction in progress, card already inserted

  • 0x0390 = Device Has No Keys

  • 0x0391 = Invalid Device Serial Number

  • 0x0396 = Invalid System Date and Time

OnDeviceExtendedResponse (EMV Device Only)

This message occurs when an extended response is received from the device.

Parameter

Description

Obj

Hexadecimal string containing the extended response data received from the device.

The first two bytes represent the result codes for the extended command. The next two bytes (most significant byte first) indicate the total length of the following data in bytes.

Last updated