| IDTech Universal SDK 1.0.35.027 API reference for C++

Implement the Callback Function

There are two callbacks to implement, one for MSR and one for EMV:

void MSR_callBack(int type, IDTMSRData cardData){
printf("\nMSR Callback\n");
switch (type){
case MSR_callBack_type_ERR:
printf("Callback MSR cancelled\n");
break;
case MSR_callBack_type_RETURN_CODE:
printf("Callback MSR data received\n");
break;
case MSR_callBack_type_TIMEOUT:
printf("MSR Callback Timeout\n");
break;
default:
break;
}
}
void EMV_callBack(int device_type, int device_state, unsigned char * data, int dataLen,IDTTransactionData* cardData,EMV_Callback* emvCallback, int transactionResultCode){
switch(device_state)
{
case EMVCallback:
printf ("EMV Callback\n");
break;
case TransactionData:
printf ("Transaction Data Callback\n");
break;
case TransactionFailed:
printf("Transaction Failed Callback");
break;
}
}