Unable to generate correct application cryptogram

偶尔善良 提交于 2019-12-07 23:43:26

问题


I am successfully getting Generate Command response

[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

And the command is

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

With sucessful response

8012800008d2715ae1b83027db06020103a0b0009000

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

Everything is good, but whenever I perform transaction in the test environment I get

The Application Cryptogram was incorrect.

Any help would be appreciated.


回答1:


First of all in your data sample "Transaction date" in packed YYMMDD format is not the same value as in human readable format (YYYY-MM-DD). Dates are different.

If you sent incorrect transaction data or transaction data not related to this ARQC you will fail Cryptogram validation at the host environment.

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".

Certified test environments or Amex Test System (ATS) itself can provide you the ARQC/ARPC recalculation details. Sure if test environment can validate your card brand.

Issue usually in the financial message and Transaction data inside which developers incorrectly packed for external test host validation. (As in your original request.)

Take full trace of transaction from card, thru terminal to host system and you will get where is data misplacement.



来源:https://stackoverflow.com/questions/31610533/unable-to-generate-correct-application-cryptogram

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!