Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Retrieves Track Capabilities.
public string getCapTracks()
Parameters: None Return Value:
String representing Track Capabilities:
Bit 0 = 1 / Track 1 supported,
Bit 1 = 1 / Track 2 supported,
Bit 2 = 1 / Track 3 supported, All other bits = 0.
Retrieves CRC from card data.
public long getCardDataCRC()
Parameters: None Return Value:
Card data CRC
Retrieves CRC from card data.
public string getCardExpDate ()
Parameters: None Return Value:
String representing card expiration date.
Retrieves Issuer Identification Number (IIN) from card data.
public string getCardIIN()
Parameters: None
Return Value: String representing card IIN.
Retrieves Last 4 digits of card number from card data.
public string getCardLast4()
Parameters: None
Return Value:
String representing card last 4 digits.
Retrieves card name from card data.
public string getCardName()
Parameters: None Return Value:
String representing card name.
Retrieves PAN from card data.
public string getCardPAN()
Parameters: None
Return Value: String representing card PAN.
Retrieves PAN length from card data.
public int getCardPANLength()
Parameters: None
Return Value: PAN length.
Retrieves Service Code.
public string getCardServiceCode()
Parameters: None
Return Value: String representing service code.
Retrieves the card status.
public string getCardStatus()
Parameters: None Return Value:
String representing the card status.
Card Status
This is a string value which indicates the card status. The following table defines the possible values.
Get stored key serial number. This 10-byte Binary field contains the DUKPT Key Serial Number used to encrypt the encrypted fields in this message. This 80-bit field includes the Initial Key Serial Number in the leftmost 59 bits and a value for the Encryption Counter in the rightmost 21 bits. If no keys are loaded, all bytes will have the value 0x00.
public string getKSN()
Parameters: None Return Value:
Return stored key serial number.
Get device model name.
public string getDeviceName()
Parameters: None
Value
Description
00
The card was swiped in the withdrawal direction.
01
The card was swiped in the insertion direction.
Return device model name.
Clears buffered data retrieved from the reader.
public void clearBuffers()
Parameters: None
Return Value: None
Retrieves battery level.
public long getBatteryLevel()
Parameters: None Return Value:
Battery Level (0 to 100)
Retrieves swipe count.
public long getSwipeCount()
Parameters: None
Return Value:
Long value representing swipe count. If the value is less than zero, it indicates the device does not support tracking of the number of card swipes.
Retrieves MagnePrint Capabilities.
public string getCapMagnePrint()
Parameters: None Return Value:
String representing MagnePrint capabilities:
0 = No MagnePrint,
1 = Short MagnePrint,
2 = Long MagnePrint
Retrieves MagnePrint Encryption Capabilities.
public string getCapMagnePrintEncryption()
Parameters: None Return Value:
String representing MagnePrint Encryption capabilities:
0 = No Encryption,
1 = Same as MagStripe (8122), other values TBD.
If absent, the default value is 1.
Retrieves MagneSafe 2.0 Encryption Capabilities.
public string getCapMagneSafe20Encryption ()
Parameters: None
Return Value:
String representing MagneSafe 2.0 Encryption Capabilities. 0 = Not supported, other values TBD.
Retrieves MagneStripe Encryption Capabilities.
public string getCapMagStripeEncryption()
Parameters: None Return Value:
String representing MagStripe Encryption Capabilities. 0 = No Encryption, 1 = TDES DUKPT / PIN Variant, other values TBD
Retrieves MSR Capabilities. public string getCapMSR() Parameters: None
Return Value:
String representing MSR Capabilities. 0 = No MSR, 1 = MSR.
After creating an instance of the MTSCRA class in your custom software project, use the methods described in this section to communicate with SCRA device.
This method initiates the discovery of devices that are visible to the host using the specified connection interface. The DeviceListReceived() event will provide information regarding the available devices once the discovery process is completed.
public void requestDeviceList(MTConnectionType connectionType)
Parameters:
Parameter
Return Value: None
This method sets the connection type of the device.
public void setConnectionType(MTConnectionType connectionType)
Parameters:
The following table shows the connection types supported by the various programming interfaces:
The following table shows the connection types supported by the various SCRA devices:
Return Value: None
This method sets the address of the device.
public void setAddress(string deviceAddress)
Parameters:
Return Value: None
This method sets the device ID.
public void setDeviceID(string deviceID)
Parameters:
Return Value: None
This method opens connection to the device. If you use the MagTek Universal Windows SDK and USB Card reader with PID 0011, please refer to section 2.5 How to remove POS HID Magnetic Stripe Reader.
public void openDevice()
Parameters: None
Return Value: None
This method closes the connection to the device.
public void closeDevice()
Parameters: None
Return Value: None
This method returns whether the device is connected or not.
public bool isDeviceConnected()
Parameters: None Return Value:
Return true if the device is connected. Otherwise, return false.
This method returns whether the device supports EMV or not.
public bool isDeviceEMV()
Parameters: None Return Value:
Return true if EMV is supported by the device. Otherwise, return false.
This method returns whether the device is an OEM device or not.
public bool isDeviceOEM()
Parameters: None Return Value:
Return true if device is OEM. Otherwise, return false.
Get stored masked tracks data. If decodable track data exists for a given track, it is located in the Masked Track Data field that corresponds to the track number. The length of each Masked Track Data field is fixed at 112 bytes, but the length of valid data in each field is determined by the Masked Track Data Length field that corresponds to the track number. Masked Track Data located in positions greater than indicated in the Masked Track Data Length field are undefined and should be ignored.
The Masked Track Data is decoded and converted to ASCII and then it is masked. The Masked Track Data includes all data starting with the start sentinel and ending with the end sentinel. Much of the data is masked; a specified mask character is sent instead of the actual character read from the track. Which characters are masked depends on the format of the card. Only ISO/ABA (Financial Cards with Format Code B) and AAMVA cards are selectively masked; all other card types are either entirely masked or sent totally in the clear. There is a separate masking property for ISO/ABA cards and AAMVA cards. See the ISO Track Masking property and the AAMVA Track Masking property for more information. See 99875475 for a description on how ISO/ABA and AAMVA cards are identified.
Each of these properties allows the application to specify masking details for the Primary Account Number and Driver’s License / ID Number (DL/ID#), the masking character to be used, and whether a correction should be applied to make the Mod 10 9 (Luhn algorithm) digit at the end of the number be correct.
public string getMaskedTracks()
Parameters: None Return Value:
Return stored masked tracks data string.
Get stored track1 data. This field contains the encrypted track data for track 1.
public string getTrack1()
Parameters: None Return Value:
Return stored track1 data string.
Get stored track2 data. This field contains the encrypted track data for track 2.
public string getTrack2()
Parameters: None Return Value:
Return stored track2 data string.
X
X
X
Universal Windows Platform
X
Bluetooth
BulleT
USB
BulletT DynaMag DynaMAX eDynamo mDynamo DynaWave tDynamo
iDynamo 5 Gen III
Serial
DynaWave
Description
connectionType
MTConnectionType value: MTConnectionType.Audio, MTConnectionType.BLE, MTConnectionType.BLEEMV, MTConnectionType.Bluetooth, MTConnectionType.USB, MTConnectionType.Serial, MTConnectionType.Net, MTConnectionType.Net_TLS12, MTConnectionType.Net_TLS12_Trust_All
Parameter
Description
connectionType
MTConnectionType value: MTConnectionType.Audio, MTConnectionType.BLE, MTConnectionType.BLEEMV, MTConnectionType.Bluetooth, MTConnectionType.USB, MTConnectionType.Serial, MTConnectionType.Net, MTConnectionType.Net_TLS12, MTConnectionType.Net_TLS12_Trust_All
Connection Type / Programming Interface
Audio
Bluetooth LE
Bluetooth LE EMV
Bluetooth
USB
UART
.NET Framework
X
Connection Type
SCRA Device
Audio
aDynamo uDynamo
Bluetooth LE
DynaMAX
Bluetooth LE EMV
eDynamo tDynamo
Parameter
Description
deviceAddress
String value of the address.
Parameter
Description
deviceID
String value of the device ID.
X
public string getTrack3 ()
Parameters: None Return Value:
Return stored track3 data string.
Get stored masked track1 data.
public string getTrack1Masked()
Parameters: None Return Value:
Return stored masked track1 data string.
For an ISO/ABA card, the PAN is masked as follows:
The specified number of initial characters is sent unmasked. The specified number of trailing characters is sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the PAN are set to zero; one of them will be set such that last digit of the PAN calculates an accurate Mod 10 check of the rest of the PAN as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the PAN are set to the specified mask character.
The Card Holder’s name and the Expiration Date are transmitted unmasked.
All Field Separators are sent unmasked.
All other characters are set to the specified mask character.
For an AAMVA card, the specified mask character is substituted for each of the characters read from the card.
Get stored masked track2 data.
public string getTrack2Masked()
Parameters: None Return Value:
Return stored masked track2 data string.
For an ISO/ABA card, the PAN is masked as follows:
The specified number of initial characters are sent unmasked. The specified number of trailing characters are sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the PAN are set to zero; one of them will be set such that last digit of the PAN calculates an accurate Mod 10 check of the rest of the PAN as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the PAN are set to the specified mask character.
The Expiration Date is transmitted unmasked.
All Field Separators are sent unmasked.
All other characters are set to the specified mask character.
For an AAMVA card, the DL/ID# is masked as follows:
The specified number of initial characters are sent unmasked. The specified number of trailing characters are sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the DL/ID#PAN are set to zero; one of them will be set such that last digit of the DL/ID# calculates an accurate Mod 10 check of the rest of the DL/ID# as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the DL/ID# are set to the specified mask character.
The Expiration Date and Birth Date are transmitted unmasked.
All other characters are set to the specified mask character.
Get stored masked track3 data.
public string getTrack3Masked()
Parameters: None Return Value:
Return stored masked track3 data string.
For an ISO/ABA card, the PAN is masked as follows:
The specified number of initial characters are sent unmasked. The specified number of trailing characters are sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the PAN are set to zero; one of them will be set such that last digit of the PAN calculates an accurate Mod 10 check of the rest of the PAN as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the PAN are set to the specified mask character.
All Field Separators are sent unmasked.
All other characters are set to the specified mask character.
For an AAMVA card, the specified mask character is substituted for each of the characters read from the card.
Supported on uDynamo only. This 128-byte Binary field contains the MagnePrint data. Only the number of bytes specified in the MagnePrint data length field are valid. The least significant bit of the first byte of data in this field corresponds to the first bit of MagnePrint data. If the Enable/Disable MagnePrint property is set to disable MagnePrint, this field will not be sent.
public string getMagnePrint()
Parameters: None
Return Value:
Return the MagnePrint data.
Supported on uDynamo only.
public string getMagnePrintStatus()
Parameters: None Return Value:
Returns the MagnePrint status.
This Binary field represents 32 bits of MagnePrint status information. Each character represents 4 bits (hexadecimal notation). For example, suppose the characters are: “A1050000”:
Nibble
1
2
3
4
5
6
7
8
Usage Legend:
D = Direction
F = Too Fast
L = Too Slow
M = MagnePrint capable
N = Too Noisy
R =Revision
This four-byte field contains the MagnePrint status. The MagnePrint status is in little endian byte order. Byte 1 is the least significant byte. Byte 1 LSB is status bit 0. Byte 4 MSB is status bit 31. MagnePrint status is defined as follows:
Bit 0 = MagnePrint-capable product (usage M)
Bits 1-15 = Product revision & mode (usage R)
Bit 16 = STATUS-only state (usage S)
Bit 17 = Noise too high or “move me” away from the noise source (used only in STATUS) (usage N)
Bit 18 = Swipe too slow (usage L)
Bit 19 = Swipe too fast (usage F)
Bit 20 = Unassigned (always set to Zero)
Bit 21 = Actual Card Swipe Direction (0 = Forward, 1 = Reverse) (usage D)
Bits 22-31 = Unassigned (always set to Zero)
If the Enable/Disable MagnePrint property is set to disable MagnePrint, this field will not be sent.
Get stored device serial number. This 16-byte ASCII field contains the device serial number. The device serial number is a NUL (zero) terminated string. So the maximum length of the device serial number, not including the null terminator, is 15 bytes. The device’s serial number can also be retrieved and set with the device serial number property explained in the property section of this document. This field is stored in non-volatile memory, so it will persist when the unit is power cycled.
public string getDeviceSerial()
Parameters: None Return Value:
Return stored device serial number.
Not suported on Audio Reader. This 8-byte Binary field contains the encrypted version of the current Session ID. Its primary purpose is to prevent replays. After a card is read, this property will be encrypted, along with the card data, and supplied as part of the transaction message. The clear text version of this will never be transmitted. To avoid replay, the application sets the Session ID property before a transaction and verifies that the Encrypted Session ID returned with card data decrypts to the value set.
public string getSessionID()
Parameters: None Return Value:
Return the Session ID
Retrieves the card encode type.
public string getCardEncodeType()
Parameters: None Return Value:
String representing the card encode type.
Card Encode Type
This is a string value which indicates the type of encoding that was found on the card. The following table defines the possible values.
Retrieves data field count.
public int getDataFieldCount()
Parameters: None
Return Value:
Data field count
Retrieves SHA-x hash code.
public string getHashCode()
Parameters: None Return Value:
String representing SHA-x hash code.
Retrieves device configuration.
public string getDeviceConfig(string configType)
Parameters:
configType can be one of:
8180: Send TLV Version on Power Up
8181: Send Discovery on Power Up
8280: Send Card name
8281: Send Card IIN
Return Value:
String representing device configuration.
Retrieves encryption status. This two-byte Binary field contains the Encryption Status. The Reader Encryption Status is sent in big endian byte order. Byte 1 is the least significant byte. Byte 1 LSB is status bit 0. Byte 2 MSB is status bit 15.
public string getEncryptionStatus()
Parameters: None Return Value:
String representing decryption status as a 2-byte binary field.
Bit 0 = DUKPT Keys exhausted (1=exhausted, 0=keys available)
Bit 1 = Initial DUKPT key Injected, always set to One (Primary DUKPT Key)
Bit 2 = Encryption Enabled, always set to One
Retrieves firmware version.
public string getFirmware()
Parameters: None
Return Value:
String representing firmware version.
Retrieves MagTek device serial number.
public string getMagTekDeviceSerial()
Parameters: None
Return Value:
String representing MagTek device serial number.
Retrieves response data.
public string getResponseData()
Parameters: None
Return Value:
String representing response data.
Retrieves response type.
public string getResponseType()
Parameters: None
Return Value:
String representing response type. For Audio Reader, always “C101”.
Retrieves the value of the specified tag.
public string getTagValue(string tag, string data)
Parameters: None
tag
Tag to search for
Return Value: String representing tag value.
8282: Send Card Last 4 Digits of PAN
8283: Send Card Expiration
8284: Send Card Service Code
8285: Send Card PAN Length
Bit 4 = Reserved (always set to zero)
Bit 5 = Reserved (always set to zero)
Bit 6 = Reserved (always set to zero)
Bit 7 = Reserved (always set to zero)
Bit 8 = Reserved (always set to zero)
Bit 9 = Initial DUKPT key injected (Secondary DUKPT Key)
Bit 10 = DUKPT Key used for encryption, 0=Primary, 1=Secondary
Bit 11 = DUKPT Key Variant used to encrypt data, 0=PIN Variant, 1=Data Variant/Bidirectional
Bits 12–15 = Unassigned (always set to Zero)
Data to search from
Value
Encode Type
Description
00
ISO/ABA
ISO/ABA encode format. At least one track in ISO/ABA format, Track 3 not AAMVA format.
01
AAMVA
AAMVA encode Track 3 is AAMVA format. Tracks 1 and 2 are ISO/ABA if correctly decoded.
02
Reserved
03
Blank
The card is blank. Only occurs if all tracks decode without error and without data.
04
Other
The card has a non-standard encode format. For example, ISO/ABA track 1 format on track 2.
05
Undetermined
The card encode type could not be determined because no tracks could be decoded. (Combination of Error tracks and Blank Tracks, at least one Error track).
06
None
No decode has occurred. This type occurs if no magnetic stripe data has been acquired since the data has been cleared or since the reader was powered on. This reader only sends an Input report when a card has been swiped so this value will never occur.
Value
A
1
0
5
0
0
0
0
Bit
7
6
5
4
3
2
1
0
1
5
1
4
1
3
Value
1
0
1
0
0
0
0
1
0
0
0
Usage*
R
R
R
R
R
R
R
M
R
R
R
1
2
1
1
1
0
9
8
2
3
2
2
2
1
2
0
1
9
1
8
1
7
1
6
3
1
3
0
2
9
2
8
2
7
2
6
2
5
2
4
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
R
R
R
R
R
0
0
D
0
F
L
N
S
0
0
0
0
0
0
0
0
Retrieves TLV version.
public string getTLVVersion()
Parameters: None
Return Value:
String representing TLV version as a two-byte hex string.
Retrieves track decode status. This is a one-byte value, which indicates the status of decoding track 1. Bit position zero indicates if there was an error decoding track 1 if the bit is set to one. If it is zero, then no error occurred. If a track has data on it that is not noise, and it is not decodable, then a decode error is indicated. If a decode error is indicated, the corresponding track data length value for the track that has the error will be set to zero and no valid track data will be supplied.
public string getTrackDecodeStatus()
Parameters: None Return Value:
Track Decode Status. Consists of three 2-byte hex values representing the decode status for tracks 1, 2, and 3 (respectively from left to right). Values are:
00 = Track OK
01 = Track read Error
02 = Track is Blank
Retrieves SDK version.
public string getSDKVersion()
Parameters: None Return Value:
The version information of the SDK.
Send command to device.
public int sendCommandToDevice(string command)
Parameters:
Return Value:
0 = Success
9 = Error
15 = Busy
This function starts an EMV L2 transaction for smart card.
public int startTransaction(
byte timeLimit,
byte cardType,
byte option,
Parameters:
Return Value:
0 = Success
9 = Error1
15 = Busy
This function sets the user selection result. It should be called after receiving the OnUserSelectRequest event which is triggered after the user makes a selection.
public int setUserSelectionResult(byte status, byte selection)
Parameters:
Return Value:
0 = Success
9 = Error
15 = Busy
This function sends to the device the transaction decision from acquirer.
public int setAcquirerResponse(byte[] response)
Parameters:
Return Value:
0 = Success
9 = Error
15 = Busy
This function cancels a transaction while waiting for the user to insert a card.
public int cancelTransaction ()
Parameters: None Return Value:
0 = Success
9 = Error
15 = Busy
Send extended command to device.
public int sendExtendedCommand(string command)
Parameters:
Return Value:
0 = Success
9 = Error
15 = Busy
Retrieves features for the device.
public MTDeviceFeatures getDeviceFeatures()
Parameters: None
Return Value:
Retrieves power management value for the device.
public String getPowerManagementValue()
Parameters: None
Return Value: Returns the PM value associated with the device.
byte[] amount,
byte transactionType,
byte[] cashBack,
byte[] currentCode,
byte reportingOption)
Parameter
Description
command
Command string to send to the device.
Parameter
Description
Card Type to Read:
0x01 = Magnetic Stripe (as alternative to EMV L2, card swipe causes abort of EMV L2)
0x02 = Contact chip card
0x03 = Magnetic Stripe and Contact chip Card. 0x04 = Contactless chip card
0x05 = Magnetic Stripe and Contactless chip card. 0x06 = Contact chip card and Contactless chip card.
0x07 = Magnetic Stripe, Contact chip card, Contactless chip card.
Refer to Supported Device Features for supported devices.
Parameter
Description
timeLimit
Specifies the maximum time, in seconds, allowed to complete the total transaction. This includes time for the user to insert the card, choose a language, choose an application, and online processing. If this time is exceeded, the transaction will be aborted, and an appropriate Transaction Status will be available. Value 0 is not allowed.
cardType
Card Type to Read:
0x01 = Magnetic Stripe (as alternative to EMV L2, card swipe causes abort of EMV L2)
0x02 = Contact chip card
0x03 = Magnetic Stripe and Contact chip Card. 0x04 = Contactless chip card
0x05 = Magnetic Stripe and Contactless chip card. 0x06 = Contact chip card and Contactless chip card.
0x07 = Magnetic Stripe, Contact chip card, Contactless chip card.
Refer to Supported Device Features for supported devices.
option
0x00 = Normal 0x01 = Bypass PIN 0x02 = Force Online
0x04 = Acquirer not available (Note: prevents long timeout on waiting for host approval) (causes “decline” to be generated internally if ARQC is generated)
To use Quick Chip mode, set the most significant bit to ‘1’.
0x80 = Quick Chip, Normal 0x81 = Quick Chip, Bypass PIN 0x82 = Quick Chip, Force Online
Refer to Supported Device Features for supported devices.
Parameter
Description
Status
Indicates the status of User Selection:
0x00 – User Selection Request completed, see Selection Result 0x01 – User Selection Request aborted, cancelled by user
0x02 – User Selection Request aborted, timeout
selection
Indicates the menu item selected by the user. This is a single byte zero based binary value.
Parameter
Description
response
The first two bytes (most significant byte first) indicate the total length of the following byte array. The byte array contains the ARQC Response message. See Appendix C for ARQC Response Message Format.
Parameter
Description
command
Hexadecimal string of the byte array for the extended command.
The first two bytes represent the value of the extended command.
The next two bytes (most significant byte first) indicate the total length of the following data in bytes.
public class MTDeviceFeatures
{
bool MSR;
bool Contact;
bool Contactless;
bool PINPad;
bool MSRPowerSaver;
bool BatteryBackedClock;
bool SRED;
bool SignatureCapture;
bool ManualEntry; }Parameter
Power Management
BulleT KB BulleT SPP
PM1
cDynamo
Dynamag, Dynamag Duo, USB Enc IntelliHead V5
amount
Amount Authorized (EMV Tag 9F02, format n12, 6 bytes) in hex string.
For example: “000000000999”, means 9.99 dollars.
transactionType
Valid values:
0x00 = Purchase (listed as “Payment” on ICS)
0x01 = Cash Advance (not supported for this reader)
0x02 or 0x09 = Cash back (0x09 only supported when using contactless) 0x04 = Goods (Purchase)
0x08 = Services (Purchase)
0x10 = International Goods (Purchase) 0x20 = Refund
0x40 = International Cash Advance or Cash Back 0x80 = Domestic Cash Advance or Cash Back
cashBack
Cash back Amount (if non-zero, EMV Tag 9F03, format n12, 6 bytes) in hex string.
For example: “000000001000”, means 10.00 dollars.
currencyCode
Transaction Currency Code (EMV Tag 5F2A, format n4, 2 bytes) Sample Valid values:
0x0840 – US Dollar 0x0978 – Euro 0x0826 – UK Pound
reportingOption
This single byte field indicates the level of Transaction Status notifications the host desires to receive during the course of this transaction.
0x00 = Termination Status only
(normal termination, card error, timeout, host cancel)
0x01 = Major Status changes
(terminations plus card insertions and waiting on user)
0x02 = All Status changes
(documents the entire transaction flow)
Dynasty
PM3
DynaMAX
PM2
DynaPAD
DynaWave
eDynamo
PM3
Flash
PM1
iDynamo
iDynamo 5
IDynamo 5 Gen III
Home Banking (Dynamo LCD)
kDynamo
PM5
mDynamo
P-series and I-65 w/V5
pDynamo
PM6
sDynamo
SPI Encrypting IntelliHead V5
tDynamo
PM5
UART Enc IntelliHead V5
uDynamo
PM4
U-Finity
PM1