
MTSCRA Callback Messages 11 - 19
OnDeviceExtendedResponse (EMV Device Only)
This message occurs when an extended response is received from the device.
Parameter
Description
obj
Byte array 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.
OnDeviceState (EMV Device Only)
This message occurs when the device changes state.
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Device State
0x00 = Idle 0x01 = Session
0x02 = Wait For Card 0x03 = Wait For PIN
0x04 = Wait For Selection
0x05 = Displaying Message
0x06 = Test (Reserved for future use)
0x07 = Manual Card Entry
0x08 = Wait for Signature Capture (SC-S Only | SC-F Only)
0x09 = Wait Cardholder Entry
0x0A = Chip Card
0x0B = ICC Kernel Test
0x0C = EMV Transaction
0x0D = Show PAN
Offset
Field Name
Bit 7
6
5
4
3
2
1
0
1
Session State
Pwr Chg
RFU
RFU
RFU
Card Data
MSRP AN
EXPAN
Amt
The bits of Session State mean the following:
Pwr Chg:
1 = Power Change Occurred (occurs on Power up or after a USB resume)
Card Data:
1 = Card Data Available
MSR PAN:
1 = PAN Parsed from Card
EXPAN:
1 = External PAN Sent
Amt:
1 = Amount sent
Offset
Field Name
Value
2
Device Status
0x00 = OK. Otherwise, the possible values are listed below:
Bit 7 = Device Error Status:
1 = Device Error
Bit 6 = Authentication Status:
0 = Not Authenticated
1 = Authenticated
Bit 5 = 0
Bit 4 = Tamper:
0 = Normal
1 = Tamper Detected
Bits [3,2] = MSR Key Status:
00 = MSR Key OK
01 = MSR Key Exhausted
10 = No MSR Key
11 = MSR Key Not Bound
Bits [1,0] = PIN Key Status:
00 = PIN Key OK
01 = PIN Key Exhausted
10 = No PIN Key
11 = PIN Key Not Bound
Offset
Field Name
Bit 7
6
5
4
3
2
1
0
3
Device Certificate Status
MSR CRL
PIN CRL
TLS (RSA)C
ert
Manufa cturer Unbind
MSR
Key Loader CA
Device CA
Device CA
0 = Certificate does not exist in the device
1 = Certificate exists in the device
OnCardStatus (EMV Device Only)
This message occurs when the card status has changed.
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Operation Status
1
Card Status
2
Card Type
1.4 OnCardData (EMV Device Only)
This message occurs when the device sends card data.
Parameter
Description
obj
Byte array containing the data received from the device.
OnPINResponse (EMV Device Only)
This message occurs when the device sends the response to a PIN request.
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Operation Status
1
PIN BLOCK
Format
0000 0000 = ISO Format 0 (PAN Required)
0000 0001 = ISO Format 1 (No PAN Required)
0000 0011 = ISO Format 3 (PAN Required)
0000 0100 = ISO Format 4 (Not Supported)
2
PIN BLOCK
Encryption Type
0xxx xxxx = Fixed key
1xxx xxxx = DUKPT key
xx00 xxxx = TDES
xx01 xxxx = AES128
xx10 xxxx = AES256
xxxx xx00 = Data variant
xxxx xx01 = PIN variant
xxxx xx10 = MAC variant
3 - 14
PIN KSN.
PIN KSN.
If fixed PIN Key is used, KSN is all zeroes.
14 - 21
EPB
Encrypted PIN Block (EPB). If PIN entry was successful, this contains the PIN data, encrypted using the PIN variant of the current PIN DUKPT working key. Format after decryption depends on the PIN Option the host specified, and on the device’s Session State:
If the Session State indicates there is no PAN available (from card swipe or sent via command), the device creates the EPB using ISO Format 1.
If there is a PAN, the device creates the EPB using the PIN Option the host specified in the command.
OnSignatureState (EMV Device Only)
This message occurs when the signature state has change.
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Operation Status
1
Reserved
2
Signature length (low byte)
3
Signature length (high byte)
OnSignature (EMV Device Only)
This message occurs when the device sends the response to a signature request.
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Message
This Signature is an array of bytes.
OnEncryptedDataState (EMV Device Only)
This message occurs when the encrypted data state has changed.
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Operation Status
1
Reserved
2
Input Data length (low byte)
3
Input Data length (high byte)
OnEncryptedData (EMV Device Only)
This message occurs when the device returns encrypted data.
Parameter
Description
obj
Byte array containing the data received from the device.
Offset
Field Name
Value
0
Operation Status
1 - 10
KSN.
KSN.
If fixed Key is used, KSN is all zeroes.
11 - n
Encrypted Input Data
The encrypted data encrypted using the DATA variant of the current DATA DUKPT working key.
Last updated

