如何正确构造“获取处理选项"命令消息 [英] How to correctly construct Get Processing Option command message

查看:125
本文介绍了如何正确构造“获取处理选项"命令消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

EMV Book_3说:

EMV Book_3 says:

CLA:80
INS:A8
P1:00
P2:00
Lc:var
数据:处理选项数据对象列表(PDOL)相关数据
勒:00

CLA: 80
INS: A8
P1 : 00
P2 : 00
Lc : var
Data: Processing Options Data Object List (PDOL) related data
Le: 00

我的APDU命令如下:"80 A8 00 00 0C PDOL 00", 其中PDOL = "9F 66 04 9F 02 06 9F 37 04 5F 2A 02".

And my APDU Command looks like: "80 A8 00 00 0C PDOL 00", where PDOL = "9F 66 04 9F 02 06 9F 37 04 5F 2A 02".

我收到:6A 80 我正在使用的CC是Visa PayWave非接触式. 完整的FCI(文件控制信息)专有模板是:

I'm receiving: 6A 80 The CC I'm using is Visa PayWave contactless. The full FCI (File Control Information) Proprietary Template is:

"50 0C 56 69 73 61 20 43 6C 61 73 73 69 63 87 01 01 9F 38 0C 9F 66 04 9F 02 06 9F 37 04 5F 2A 02 5F 2D 04 62 67 65 6E"

我想念的是什么?正确的获取处理选项"命令是什么?

What I'm missing? What will be the correct Get Processing Option command?

推荐答案

PDOL标记表示下一个指定字节数指定的标记表示要串联到命令末尾的数据.在您的问题中,PDOL标签9f 38指定接下来的0Ch(12d)字节,指示要发送到卡的数据.你有:

the PDOL tag means that the tags specified by the next specified number of bytes represent the data to be concatenated to the end of the command. In your question the PDOL tag, 9f 38, specifies the next 0Ch (12d) bytes indicate the data to be sent to the card. You have:

  • 9f 66 04-标签9f 66表示终端交易限定符.因此,PDOL必须将4h(十六进制)个字节的终端事务限定符编码为四个字节.

  • 9f 66 04 - the tag 9f 66 represents the terminal transaction qualifiers. Thus the PDOL must have 4h (hex) bytes of the terminal transaction qualifiers coded into the four bytes.

9f 02 06-标签9f 02代表授权金额. PDOL列表中必须添加授权的数量,并将其编码为6h字节.

9f 02 06 - tag 9f 02 stands for authorized amount. The PDOL list must have the amount, authorized, coded into 6h bytes added to it.

9f 37 04-标签9f 37代表不可预测的数字,因此将其编码为4个字节并将其添加到列表中

9f 37 04 - tag 9f 37 stands for unpredictable number, thus encode such a number in 4 bytes and add it to the list

....

对其余部分进行类似的翻译.该列表必须按照从卡接收到的标签数据中指定的顺序进行,例如在您的列表中,TTQ必须排在第一位,然后是授权的e.t.c.金额.根据您的结果,数据的总大小应为4 + 6 + 4 + 2 = 16 = 10h字节.因此,最终命令的样例数据将如下所示:

Translate the rest similarly. The list must be in the order specified in the Tag data received from the card e.g. in your list, the TTQs must be first, followed by amount authorized e.t.c. From your results, the total size of the data should be 4+6+4+2= 16 = 10h bytes. Thus the final command would look like this with sample data:

                        <------the data concatenated together--------->
=> 80 a8 00 00 12 83 10 f3 20 40 00 00 00 00 01 00 00 04 04 06 03 05 08 00 

NB:请注意Lc的值12h及其后的两个字节.十六进制值0x83必须在Lc之后,并且后面的字节应该是数据的实际长度,即10h,因此Lc = 10h + 2 = 12h如上所述.不要忘记最后的Le!

NB: note the value of Lc, 12h, and the two bytes after it. The hex value 0x83 must be present right after Lc, and the byte after it should be the actual length of the data i.e. 10h, thus Lc = 10h + 2 = 12h as specified above. Don't forget the Le at the end!

这篇关于如何正确构造“获取处理选项"命令消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆