[英]always getting 6a82 and 6d00 for reading visa emv card
i am reading data from visa card but always getting response 6a82 and 6d00 for PSE. 我正在从签证卡中读取数据,但始终会收到PSE的响应6a82和6d00。 I am using smartcardio and following are the commands Select PSE: 00A404000E315041592E5359532E444446303100
我正在使用smartcardio,以下是命令Select PSE:00A404000E315041592E5359532E444446303100
Processing code: 80A8000002830000 处理代码:80A8000002830000
Below code works fine for paypak (a Pakistan payment card claiming EMV compatibility) but for visa its not working. 以下代码可用于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();
}
Support for PSE for contact is optional - both for cards as well as for terminals. PSE的接触支持是可选的-卡和终端均支持。 From the terminal/kernel perspective only LoA (List of AIDs) method is obligatory.
从终端/内核的角度来看,仅LoA(AID列表)方法是必需的。 As described in detail by EMV Book 1 chapter 12.3, when PSE is missing (status word 6A82), terminal should build candidate list using List of AIDs method basing on its configuration.
正如EMV书1第12.3章中详细描述的那样,当缺少PSE(状态字6A82)时,终端应根据其配置使用AID列表方法构建候选列表。 I don't know when you are getting 6D00, but you don't perform application selection correctly, so I guess you are firing the commands like GPO and GenAC with no application selected.
我不知道何时获得6D00,但是您没有正确执行应用程序选择,因此我猜您是在未选择应用程序的情况下触发了GPO和GenAC之类的命令。 The code you are quoting is very wrong - it does not handle any errors, does not select application correctly, it does not check for PDOL presence, does not read records with CDOL1, does not build DOLs.
您引用的代码是非常错误的-它不会处理任何错误,不会正确选择应用程序,不会检查PDOL是否存在,不会使用CDOL1读取记录,也不会生成DOL。 Quite honestly it may work by coincidence only.
老实说,它可能只是巧合而已。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.