smartcard - 无法生成正确的应用程序密码

标签 smartcard apdu emv

我成功获得生成命令响应

[9F02 06   (Amount, authorized, numeric)]:   000000003000 
[9F03 06   (Amount, other, numeric)]:        000000000000 
[9F1A 02   (Terminal country code)]:         0826 
[95 05     (Terminal verification results)]: 0000000000
[5F2A 02   (Transaction currency code)]:     0826 
[9A 03     (Transaction date)]:              150724 (2015-05-28)
[9C 01     (Transaction type)]:              00 
[9F37 04   (Unpredictable number)]:          12345678

命令是

80 AE 4000 1D 000000003000 000000000000 0826 0000000000 0826 150724 00 12345678 00

响应成功

8012800008d2715ae1b83027db06020103a0b0009000

Cryptogram Information Data : 00
Application Transaction Counter : 0008
Application Cryptogram : d2715ae1b83027db
Issuer Application Data : 06020103a0b000

一切都很好,但是每当我在测试环境中执行事务时,我都会得到

The Application Cryptogram was incorrect.

如有任何帮助,我们将不胜感激。

最佳答案

首先,在您的数据样本中,打包 YYMMDD 格式的“交易日期”与人类可读格式 (YYYY-MM-DD) 中的值不同。日期不同。

如果您发送了错误的交易数据或与此 ARQC 无关的交易数据,您将无法在主机环境中进行密码验证。

Because of using Amount 30.00 with Amex test cases, the card detected as "AEIPS 20 TEST CARD" from Amex Global set.

Recalculation of ARQC using the "Transaction data" gave me the same value as in your card response - 0x9F26 = "d2715ae1b83027db". So, it is confirmed.

ARPC in this case will be "3784BAE0B266DF17".

经过认证的测试环境或 Amex 测试系统 (ATS) 本身可以为您提供 ARQC/ARPC 重新计算详细信息。确保测试环境是否可以验证您的卡品牌。

问题通常出现在财务消息和交易数据中,开发人员错误地打包以进行外部测试主机验证。 (如您最初的请求。)

对从卡、终端到主机系统的交易进行全面跟踪,您将了解数据丢失的位置。

关于smartcard - 无法生成正确的应用程序密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31610533/

相关文章:

python - 扫描智能卡时如何检测事件

.net - 我们是否需要始终在机器上安装根证书?

smartcard - Java 卡 : Send long response with T=0

android - 使用 Android NFC 向 Java Card 发送超过 261 个字节

java - getATR() 不会重置 javax.smartcardio 中的智能卡

java - 在 Jcard 上部署 javacard 小程序

android - 将 Nfca 用于 Android 应用程序的 TagLostException

emv - 从 emv 卡中获取 IBAN 号码

contactless-smartcard - emv标签0x9F37不可预测的数字长度

java - 如何获得持卡人姓名