The following breaks out the EMV flow chart into code. When enabling QuickChip mode, host does not send the ARPC to the device to complete the transaction. Events are shown separately and in the order received.
// Assign parameters. ITransaction transaction; transaction.Amount = “1.00”;
transaction.CashBack = “0.00”;
transaction.EMVOnly = true;
int PaymentMethodes = = PAYMENT_METHOD_MSR | PAYMENT_METHOD_CONTACT | PAYMENT_METHOD_CONTACTLESS;
transaction.PaymentMethods = PaymentMethods; transaction.QuickChip = true;
transaction.QuickChip = true; // QuickChip mode enabled.
// Start transaction.
bool result = device->startTransaction(transaction);virtual void OnEvent(EventType eventType, IData data)
{
string message
switch (eventType);
{
case EVENT_TYPE_DisplayMessasge:
// Get the message.
message = data.StringValue; // “Present Card”
}
}virtual void OnEvent(EventType eventType, IData data)
{
vector<unsigned car> ARQC;
switch (eventType);
{
case EVENT_TYPE_AuthorizationRequest:
// Forward ARQC to processor.
/* data.ByteArray[0..1] – ARQC length
data.ByteArray [2..n] – remainder contains the ARQC TLV object */
}
}public void OnEvent(EventType eventType, IData data)
{
string message;
switch (eventType);
{
case EVENT_TYPE_DisplayMessage:
// Display approval message.
message = data.StringValue;
// A data size of 0 is an instruction to clear the display.
if (data.StringValue.length() == 0)
{
// Clear the UI display.
}
}
}virtual void OnEvent(EventType eventType, IData data)
{
string message;
switch (eventType);
{
case EVENT_TYPE_TransactionResult:
/* data.ByteArray[0] – Signature Required
data.ByteArray [1..2] – Batch Data length
data.ByteArray [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].
}
}

