0

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 に基づいて Generate AC コマンドを作成するにはどうすればよいですか?

4

1 に答える 1

6

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 の DATA フィールドにラップします。

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]
于 2015-05-28T11:18:34.630 に答える