7.8 Sample Project Tutorial
55
description)
return;
}
if emvData.resultCodeV2 != EMV_RESULT_CODE_V2_NO_RESPONSE {
appendMessageToLog(
"EMV_RESULT_CODE_V2_RESPONSE: "
+ String(describing: emvData.resultCodeV2))
}
if
emvData.resultCodeV2 == EMV_RESULT_CODE_V2_GO_ONLINE {
appendMessageToLog(
"ONLINE REQUEST"
)
}
if
emvData.resultCodeV2 == EMV_RESULT_CODE_V2_START_TRANS_SUCCESS {
appendMessageToLog(
"Start success: authentication required"
)
}
if
emvData.resultCodeV2 == EMV_RESULT_CODE_V2_APPROVED || emvData.resultCodeV2 ==
EMV_RESULT_CODE_V2_APPROVED_OFFLINE {
appendMessageToLog(
"APPROVED"
);
}
if
emvData.resultCodeV2 == EMV_RESULT_CODE_V2_MSR_SUCCESS {
appendMessageToLog(
"MSR Data Captured"
)
}
if
emvData.cardType == 0 {
appendMessageToLog(
"CONTACT"
)
}
if
emvData.cardType == 1 {
appendMessageToLog(
"CONTACTLESS"
)
}
if
emvData.unencryptedTags != nil {
appendMessageToLog(
"Unencrypted Tags: "
+ String(describing: emvData.unencryptedTags))
}
if
emvData.encryptedTags != nil {
appendMessageToLog(
"Encrypted Tags: "
+ String(describing: emvData.encryptedTags))
}
if
emvData.maskedTags != nil {
appendMessageToLog(
"Masked Tags: "
+ String(describing: emvData.maskedTags))
}
if
emvData.hasAdvise {
appendMessageToLog(
"Response has advise request"
)
}
if
emvData.hasReversal {
appendMessageToLog(
"Response has reversal request"
)
}
}
• Implement protocol delegate lcdDisplay:() to receive LCD messages, and automatically select 1st menu
item/language when presented with choices. Normal operation would require a choice be made by card
holder. Reference:
Implement Optional Delegate Protocols
func lcdDisplay(_ mode: Int32, lines: [AnyObject]!) {
var str =
""
if
lines != nil {
for
s in lines {
str += s as! String
str +=
"
\
n"
}
}
switch
mode {
case
0x10:
lcdTextView.text =
""
case
0x03:
lcdTextView.text = str
case
0x01, 0x02, 0x08:
().emv_callbackResponseLCD(mode, selection: 1)
default
:
break
}
}
IDTech iOS SDK Guide for NEO2 #80152802-001