Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
F9<len>/* container for ARQC Response data */
DFDF25 (IFD Serial Number)<len><val>
FA<len>/* Container for generic data */
70<len>/* Container for ARQC */
8A<len> approval
Further objects as needed...F9<len>/* container for MAC structure and generic data */
DFDF54 (MAC KSN)<len><val>
DFDF55 (Mac Encryption Type><len><val>
DFDF25 (IFD Serial Number)<len><val>
FA<len>/* Container for generic data */
70<len>/* Container for ARQC */
8A<len> approval
Further objects as needed... (ARQC padding, if any, to be a multiple of 8 bytes)
CBC-MAC (4 bytes, use MAC variant of MSR DUKPT key that was used in ARQC request, from
message length up to and including ARQC padding, if anyFD<len>/* container for generic data */
DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
<tags defined by DFDF02 >
. Note: Sensitive Data cannot be defined in DFDF02
.
DFDF4D(Masked T2 ICC Data)
DFDF52 - Card Type Used
F8<len>/* container tag for encrypted data */
DFDF56(Encrypted Transaction Data KSN)<len><val>
DFDF57(Encrypted Transaction Data Encryption Type)<val>
FA<len>/* container for generic data */
DF30(Encrypted Tag 56 TLV, T1 Data)<len><val>
DF31(Encrypted Tag 57 TLV, T2 Data)<len><val>
DF32(Encrypted Tag 5A TLV, PAN)<len><val>
DF35(Encrypted Tag 9F1F TLV, T1 DD)<len><val>
DF36(Encrypted Tag 9F20 TLV, T2, DD)<len><val>
DF37(Encrypted Tag 9F61 TLV, T2 CVC3)<len><val>
DF38(Encrypted Tag 9F62 TLV, T1,PCVC3)<len><val>
DF39(Encrypted Tag DF812A TLV, T1 DD)<len><val>
DF3A(Encrypted Tag DF812B TLV, T2 DD)<len><val>
DF3B(Encrypted Tag DFDF4A TLV, T2 ISO Format)<len><val>
DF40(Encrypted Value only of DFDF4A, T2 ISO Format)<len><val> FC<len>/* container for encrypted generic data */
<tags defined by DFDF02 >
.
F9<len>/* container for MAC structure and generic data */
DFDF54(MAC KSN)<len><val>
DFDF55(MAC Encryption Type)<len><val>
DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
70<len>/*container for ARQC */
DFDF53<len><value>/*fallback indicator */
5F20<len><value>/*cardholder name */
5F30<len><value>/*service code */
DFDF4D<len><value>/* Mask T2 ICC Data */
DFDF52<len><value>/* card type */
F8<len>/*container tag for encryption */
DFDF59(Encrypted Data Primitive)<len><Encrypted Data val (Decrypt data to read tags)>
DFDF56(Encrypted Transaction Data KSN)<len><val>
DFDF57(Encrypted Transaction Data Encryption Type)<val>
DFDF58(# of bytes of padding in DFDF59)<len><val>
(Buffer if any to be a multiple of 8 bytes)
CBC-MAC (4 bytes, always set to zeroes)














MTSCRANET.MTSCRA listMTSCRA = new MTSCRANET.MTSCRA();
listMTSCRA.setConnectionType(MTConnectionType.USB);
listMTSCRA.OnDeviceList() += listMTSCRA_OnDeviceList;
listMTSCRA.requestDeviceList(MTConnectionType.USB);
listMTSCRA_OnDeviceList(
object sender,
MTConnectionType connectionType,
List<MTDeviceInformation> deviceList)
{
//Handle deviceList
}MTSCRANET.MTSCRA listMTSCRA = new MTSCRANET.MTSCRA();
listMTSCRA.setConnectionType(MTConnectionType.USB);
listMTSCRA.OnDeviceList() += listMTSCRA_OnDeviceList;
MTDeviceInformation listDeviceInfo;
listMTSCRA.requestDeviceList(MTConnectionType.USB);
listMTSCRA_OnDeviceList(
object sender,
MTConnectionType connectionType,
List<MTDeviceInformation> deviceList)
{
//Handle deviceList
For Each (dev in deviceList)
{
}
listDeviceInfo.Add(dev)
}
MTSCRANET.MTSCRA msr1 = new MTSCRANET.MTSCRA();
MTSCRANET.MTSCRA msr2 = new MTSCRANET.MTSCRA();
MTSCRANET.MTSCRA msr3 = new MTSCRANET.MTSCRA();
msr1.setConnectionType(MTConnectionType.USB);
msr1.setAddress(dev.Address); msr1.openDevice();
if (! msr1.isDeviceConnected())
{
msr1.openDevice();
}
msr2.setConnectionType(MTConnectionType.USB);
msr2.setAddress(dev.Address);
msr2.openDevice();
if (! msr2.isDeviceConnected())
{
msr2.openDevice();
}
msr3.setConnectionType(MTConnectionType.USB);
msr3.setAddress(dev.Address);
msr3.openDevice();
if (! msr3.isDeviceConnected())
{
msr3.openDevice();
}
if (mMTSCRA != null)
{
mMTSCRA.closeDevice();
}if (! mMTSCRA.isDeviceConnected())
{
}if (! mMTSCRA.isDeviceConnected())
{
mMTSCRA.CardDataReceived += OnCardDataReceived;
mMTSCRA.openDevice();
}
public void OnCardDataReceived(Object sender)
{ // Display last 4 digits of the card
CardLast4.Text = mMTSCRA.getCardLast4();
}if (mMTSCRA.isDeviceConnected())
{
// Send discovery command
mMTSCRA.sendCommandToDevice(“C10206C20503840900”, 0);
}FE<len>/* container for generic data
*/ DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
F0<len>/* Transaction Results */
F1<len>/* container for Status Data */
… /* Status Data tags */
DFDF1A - Transaction Status (See DFDF1A descriptions)
DFDF1B - Additional Transaction Information (always 0)
DFDF52 - Card Type Used
F2<len>/* container for Batch Data */
… /* Batch Data tags defined in DFDF17 */
…/* Note: Sensitive Data cannot be defined in DFDF17*/
F3<len>/* container for Reversal Data, if any */
… /* Reversal Data tags defined in DFDF05 */
…/* Note: Sensitive Data cannot be defined in DFDF05*/
F7<len>/* container for Merchant Data */
… /* < Merchant Data tags */
F8<len>/* container tag for encrypted data */
DFDF56(Encrypted Transaction Data KSN)<len><val>
DFDF57(Encrypted Transaction Data Encryption Type)<val>
FA<len>/* container for generic data */
DF30(Encrypted Tag 56 TLV, T1 Data)<len><val>
DF31(Encrypted Tag 57 TLV, T2 Data)<len><val>
DF32(Encrypted Tag 5A TLV, PAN)<len><val>
DF35(Encrypted Tag 9F1F TLV, T1 DD)<len><val>
DF36(Encrypted Tag 9F20 TLV, T2, DD)<len><val>
DF37(Encrypted Tag 9F61 TLV, T2 CVC3)<len><val>
DF38(Encrypted Tag 9F62 TLV, T1,PCVC3)<len><val>
DF39(Encrypted Tag DF812A TLV, T1 DD)<len><val>
DF3A(Encrypted Tag DF812B TLV), T2 DD<len><val>
DF3B(Encrypted Tag DFDF4A TLV, T2 ISO Format)<len><val>
DF40(Encrypted Value only of DFDF4A, T2 ISO
Format)<len><val>F9<len>/* container for MAC structure and generic data */
DFDF54(MAC KSN)<len><val>
DFDF55(MAC Encryption Type)<len><val>
DFDF25(IFD Serial Number)<len><val>
FA<len>/* container for generic data */
F0<len>/* Transaction Results */
F1<len>/* container for Status Data */
… /* Status Data tags */
F8<len>/* container tag for encryption */
DFDF59(Encrypted Data Primative)<len><Encrypted Data val>
(Decrypt data to read tags)
DFDF56(Encrypted Transaction Data KSN)<len><val>
DFDF57(Encrypted Transaction Data Encryption Type)<val>
DFDF58(# of bytes of padding in DFDF59)<len><val>
F7<len>/* container for Merchant Data */
… /* < Merchant Data tags */
(Buffer if any to be a multiple of 8 bytes)
CBC-MAC (4 bytes, always set to zeroes)// #1
MTSCRA m_SCRA = new MTSCRA();
// Delegate the MTSCRA Events.
m_SCRA.OnDisplayMessageRequest += OnDisplayMessageRequest;
.
// Assign parameters.
byte timeLimit = 0x3C;
byte cardType = 0x07;
byte option = 0x00;
byte[] amount = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x15, 0x00 };
byte transactionType = 0x00; // Purchase
byte[] cashBack = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
byte[] currencyCode = new byte[] { 0x08, 0x40 };
byte reportingOption = 0x02; // All Status Changes
// Start transaction.
long result = m_SCRA.startTransaction(
timeLimit,
cardType,
option,
amount,
transactionType,
cashBack,
currentCode, reportingOption);
// #2
protected void OnDisplayMessageRequest(obj sender, byte[] data)
{
String message;
// Get the message.
if (data != NULL)
{
message = System.Text.Encoding.UTF8.GetString(data);
}
// A data size of 0 is an instruction to clear the display.
if (data.Length == 0)
{
// Clear the display.
}
}// #3
protected void OnUserSelectionRequest(object sender, byte[] data)
{
/* data[0] – selection type
data[1] – timeout
data[2..n] – remainder contains zero-terminated string items */
// display/retrieve user selection.
.
// set status and selection result.
m_SCRA.setUserSelectionResult(status, selection);
}// #4
protected void OnARQCReceived(object sender, byte[] data)
{
/* data[0..1] – ARQC length
data[2..n] – remainder contains the ARQC TLV object */
// #4a Forward ARQC to Processor.
/* An application function to forward the ARQC
to a Processor for approval. */
proccesorResponse = sendARQCToProcesor(data);
/* No need to send ARQC Response if transaction option
had enabled Quick Chip mode. */
if (isQuickChipEnabled())
{
return;
}
// #4b Set Acquirer Response.
// An application function to build Acquirer Response.
buildAcquirerResponse(processorResponse);
// Set Acquirer Response.
m_SCRA.setAcquirerResponse(response);
}// #5
protected void OnDisplayMessageRequest(obj sender, byte[] data)
{
String message;
// Get the message.
if (data != NULL)
{
message = System.Text.Encoding.UTF8.GetString(data);
}
// A data size of 0 is an instruction to clear the display. if (data.Length == 0)
{
// Clear the display.
}
}// #6
protected void OnTransactionResult(obj sender, byte[] data)
{
/* data[0] – Signature Required
data[1..2] – Batch Data length
data[3..n] – remainder contains the Batch Data TLV object */
// Parse the TLV from data[].
.
// Abstract Approval status from TLV tag “DFDF1A”.
.
// Abstract Signature Required status from TLV tag data[0].
.
}
public class MTDeviceFeatures
{
bool MSR;
bool Contact;
bool Contactless;
bool PINPad;
bool MSRPowerSaver;
bool BatteryBackedClock;
bool SRED;
bool SignatureCapture;
bool ManualEntry; }