最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - apdu command always throws exception unspecified rfid error - Stack Overflow

programmeradmin2浏览0评论

// Step 1: Select the Visa payment application try { // byte[] aidVisa = new byte[] { (byte) 0xA0, 0x00, 0x00, 0x00, 0x03, 0x10, 0x10 }; byte[] ApduCMDVisa = new byte[] { (byte) 0xA0, // AID (Visa application AID) (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x03, (byte) 0x10, (byte) 0x10 };

        try {
            //select the payment application on the card
            byte[] responseSelect = card.executeAPDU(0x00, 0xA4, 0x04, 0x00, ApduCMDVisa, 0x00);
            // Check if the SELECT command was successful
            if (isSuccess(responseSelect)) {
                log("Visa application selected successfully.");
            } else {
                log("Failed to select Visa application.");
                return;
            }
        } catch (RFIDException e) {
            log("Error executing APDU: " + e.getMessage());
            e.printStackTrace();
发布评论

评论列表(0)

  1. 暂无评论