设置EMV内核金额

   public boolean setAuthorizationAmount() {
        long amountValue = getCardInput.getTransactionAmount();
        String amountString = String.format("%012d", amountValue);
        Logs.d(TAG,"amountString "+ amountString);
        byte[] amountBytes = tools.hexStringToByte(amountString);
        // 构建TLV数据,将9F06、长度06、六个字节的金额拼接起来
        byte[] tlvData = new byte[9];
        tlvData[0] = (byte)0x9F;
        tlvData[1] = 0x02;
        tlvData[2] = 0x06;
        System.arraycopy(amountBytes, 0, tlvData, 3, 6);
        Logs.d(TAG,"tlvData " +tools.hexString(tlvData));
        ret = EMV_SetTLVDataList(tlvData, tlvData.length);
        Logs.d(TAG, "Step "  + ++step +" " +ret);
        return ret == EMV_OK;
    }

设置EMV内核金额_第1张图片

你可能感兴趣的:(java,前端,服务器)