[英]always getting 6a82 and 6d00 for reading visa emv card
我正在從簽證卡中讀取數據,但始終會收到PSE的響應6a82和6d00。 我正在使用smartcardio,以下是命令Select PSE:00A404000E315041592E5359532E444446303100
處理代碼:80A8000002830000
以下代碼可用於paypak (聲稱具有EMV兼容性的巴基斯坦支付卡),但對於簽證無效。
startCardConnection("0");
String commandVisa = "00A4040007A000000003101000";
String command_PSE = "00A404000E315041592E5359532E444446303100";
String command_getProcessingOptionsVISA = "80A8000002830000";
String response;
response = executeCardCommand(command_PSE);
response = executeCardCommand(commandVisa);
readCardRecords(2);
response = executeCardCommand(command_getProcessingOptionsVISA);
response = executeCardCommand("80AE8000210000000000000000000000000586000000000005861802020000E44E4B11040001");
public static String executeCardCommand(String command) {
if (transmissionTrace)
System.out.println("SYS: Executing card command:" + command);
capdu = makeCommandAPDU(command);
TLV tagsList;
try {
if (card == null) {
System.out.println("SYS: ERR: Card not present/not responding!");
return null;
}
responsedAPDU = card.getBasicChannel().transmit(capdu);
showRes(responsedAPDU.getBytes());
tagsList = new TLV(responsedAPDU.getBytes());
allTagsTLV.getChildren().add(tagsList);
System.out.println(">>>>>>>>>>>>" + responsedAPDU.toString());
} catch (CardException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (TLVException e1) {
// TODO Auto-generated catch block
System.out.println("SYS: NO tags response. May be correct if not expecting tags.");
}
return allTagsTLV.getJson();
}
PSE的接觸支持是可選的-卡和終端均支持。 從終端/內核的角度來看,僅LoA(AID列表)方法是必需的。 正如EMV書1第12.3章中詳細描述的那樣,當缺少PSE(狀態字6A82)時,終端應根據其配置使用AID列表方法構建候選列表。 我不知道何時獲得6D00,但是您沒有正確執行應用程序選擇,因此我猜您是在未選擇應用程序的情況下觸發了GPO和GenAC之類的命令。 您引用的代碼是非常錯誤的-它不會處理任何錯誤,不會正確選擇應用程序,不會檢查PDOL是否存在,不會使用CDOL1讀取記錄,也不會生成DOL。 老實說,它可能只是巧合而已。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.