2015-05-28 22 views
0
AC命令

我已經成功地檢索CDOL1這是EMV - 無法生成CDOL1

9F02 06 - Authorised amount of the transaction (excluding adjustments) 
9F03 06 - Secondary amount associated with the transaction representing a cashback amount 
9F1A 02 - the country of the terminal 
95 05 - Status of the different functions as seen from the terminal 
5F2A 02 - the currency code of the transaction 
9A 03 - Local date that the transaction was authorised 
9C 01 - the type of financial transaction 
9F37 04 - Value to provide variability and uniqueness to the generation of a cryptogram 

如何創建基於此CDOL1的生成AC命令?

回答

4

基於CDOL1你下一步將組裝CDOL1相關數據(即由CDOL1該標籤引用的數據對象值的表):

[9F02 06 (Amount, authorized, numeric)]: 000000001000 (that's 1.00) 
[9F03 06 (Amount, other, numeric)]:  000000000000 (that's 0.00) 
[9F1A 02 (Terminal country code)]:   0040 (Austria) 
[95 05  (Terminal verification results)]: 0000000000 (or whatever TVR you need) 
[5F2A 02 (Transaction currency code)]:  0978 (Euro) 
[9A 03  (Transaction date)]:    150528 (2015-05-28) 
[9C 01  (Transaction type)]:    00 (whatever transaction type need) 
[9F37 04 (Unpredictable number)]:   12345678 

你會然後包數據到的數據字段的GENERATE AC命令APDU:

80 AE 5000 1D 000000001000 000000000000 0040 0000000000 0978 150528 00 12345678 00 

響應於此,你要麼得到包裹在標籤77(格式2),其由多個數據對象的響應消息數據字段。例如。如果不執行CDA,這可能是這樣的:

77 xx 
    [Cryptogram Information Data]  9F27 01 80 
    [Application Transaction Counter] 9F36 02 001B 
    [Application Cryptogram]   9F26 08 B31B2D16 69860BD5 
    [Issuer Application Data]   9F10 yy ... 
9000 [SW: success] 

或者你也可以得到包裹在標籤80(格式1)響應消息的數據字段。在這種情況下,該值是隱式數據對象的連續清單(標籤+長度字段不存在):

80 xx 
    [9F27 01 (Cryptogram Information Data)]:  80 
    [9F36 02 (Application Transaction Counter)]: 001B 
    [9F26 08 (Application Cryptogram)]:   9F26 08 B31B2D16 69860BD5 
    [9F10 yy (Issuer Application Data)]:   ... 
9000 [SW: success] 
+0

好了,可以請你再從這個響應 80128000 1bb31b2d 1669860b d506010a 03a0f000 9000 檢索數據這將是非常有用的 –

+0

非常感謝你的回覆,GENERATE AC命令正在MC和VC上工作,但它給AMEX卡上的6A81。 CDOL和上面一樣,有什麼理由? –

+0

我不熟悉EMV的AMEX特定協議變體,所以不,我不能告訴你哪裏可能有錯誤/不同。 –