EMV规范(三)——应用初始化

一、应用初始化的目的:

通知卡片新交易开始
将交易所需的数据发送给卡片
从卡片上返回AIP和AFL
决定交易是否被允许执行

二、应用初始化步骤:

设置TVR和TSI中所有位为0
根据应用选择时从卡片中获得PDOL,利用GPO命令将卡片所需的交易数据发送给卡片
根据卡片返回的数据可以得到AIP和AFL

三、使用的命令

GPO命令:
 
GPO返回数据格式:
 
注意:API和AFL是必须返回的数据元。
 

四、PDOL

PDOL(tag '9F38',来自select AID卡片返回)。

PDOL的填充在EMV Book3的5.4 Rules for Using a Data Object List (DOL)很详细,可以了解下。我这里直接Copy原文:

"1. Read the DOL from the ICC.
2. Concatenate all data elements listed in the DOL. The following rules apply to this concatenation:
a. If the tag of any data object identified in the DOL is unknown to the terminal or represents a constructed data object, the terminal shall provide a data element with the length specified and a value of all hexadecimal zeroes.
b. If a data object is in the list and is meaningful to the terminal but represents optional static data that is absent from the terminal, the portion of the command field representing the data object shall be filled with hexadecimal zeroes.
c. If the length specified in the DOL entry is less than the length of the actual data object, the leftmost bytes of the data element shall be truncated if the data object has numeric (n 1) format, or the rightmost bytes of the data shall be truncated for any other format.
d. If the length specified in the DOL entry is greater than the length of the actual data, the actual data shall be padded:
  with leading hexadecimal zeroes if the data has numeric format
  with trailing hexadecimal 'FF's if the data has compressed numeric (cn 1) format
  with trailing hexadecimal zeroes for any other format (an, ans or b including bit combination data 1)
e. If a data object is in the list and is meaningful to the terminal but represents data that is not applicable to the current transaction, the portion of the command field representing the data object shall be filled with hexadecimal zeroes."

回头有时间再补这里啦。

五、例子

PDOL是由应用选择AID时卡片返回的。(参照上篇笔记:EMV规范(二)——应用选择)
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值