8

I'm trying to read the data off a contactless Visa Paywave card.

For the Paywave, I have to submit a SELECT using PPSE (2PAY.SYS.DDF01) instead of PSE (1PAY.SYS.DDF01).

The EMV book 1, section 11.3.4, table 43 only describes how to interpret the response for a successful SELECT command using PSE. Does anyone know or can refer me to a source that shows how to process the data returned from a successful SELECT command using PPSE?

Here's my request APDU:

00A404000e325041592e5359532e444446303100

Here's the response:

6F2F840E325041592E5359532E4444463031A51DBF0C1A61184F07A0000000031010500A564953412044454249548701019000

I understand tag 84, tag 85, tag BF0C from the response. According to the examples for reading PSE, I should be able to just send GET PROCESSION OPTIONS (to get the AIP and AFL) with PDOL = null after this successful response as follows: 80A80000830000.

But request 80A80000830000 returns error code 6985 - Command not allowed; conditions of use not satisfied.

I also tried reading all the files after successfully selecting the PPSE by traversing through every single SFI (0-30) and every single record (0-16) of each SFI. Yes, I also did the 3 bit shift and bitwise-OR the SFI with 0x4. But I got no data.

I'm stuck, any help that would point me into getting some info from my Paywave card would be appreciated!

4

6 回答 6

3

2PAY.SYS.DDF01 用于非接触式(例如 NFC)卡,而 1PAY.SYS.DDF01 用于接触式卡。

  1. 成功(SW1 SW2 = 90 00)读取 PSE 后,您应该只搜索返回的 FCI 模板中的必填字段 SFI(标签 88)。

  2. 使用 SFI 作为起始索引,您必须从起始索引开始读取记录,直到获得 6A83 (RECORD_NOT_FOUND)。例如,如果您的 SFI 为 1,您将使用 record_number=1 执行 readRecord。那可能会成功。然后将 record_number 增加到 2 并再次执行 readRecord。增加到 3 .... 重复此操作,直到您获得 6A83 作为您的状态。

  3. 读取的记录将是 ADF(至少 1 个)。然后,您必须将读取的 ADF 名称与您的终端支持的名称以及基于 ASI(应用程序选择指标)的名称进行比较。最后,您将获得一份可能的 ADF 列表(候选列表)

所有上述步骤 (1-3) 都记录在 EMV 规范的第 12.3.2 Book1 v4.3 章中。

您必须做出最终选择(第 12.4 章第 1 册)

阅读规范书 1 第 12.3 - 12.4 章了解所有详细步骤。

于 2018-02-07T22:22:33.560 回答
2

您似乎有点混淆了流程,您想要:

  • 发送 1PAY 或 2PAY,对于我测试过的所有卡实际上并不重要。这将返回卡上可用的 AID 列表。或者,如果您知道它在那里,您可以直接选择 AID,但好的做法是先检查。

  • 获取响应 1PAY/2PAY 返回的 AID 列表,在 PayWave 的情况下,如果您发送 2PAY,这可能是 A0000000031010,但如果您发送 1PAY,您可能会得到更多。

  • 选择一种发回的 AID(或您已经知道的 AID)。

  • 然后循环通过发送读取记录命令的 SFI 和记录以获取数据。

您不必在发送读取记录命令之前发送获取处理选项,即使现在这是正常的事务流程。

于 2013-08-05T18:21:56.383 回答
0

如果您也对万事达卡感兴趣,您可以使用 triangle.io 的 API 来执行此操作。它是免费的,可以为您读取 MasterCard 和 Visa 非接触式卡,这正是您想要的。

请注意,直接从卡上读取所有文件,虽然它会给你你想要的数据,但并不是真正遵循 EMV 数据流。选择应用程序后,您应该执行“获取处理选项”,然后构建 PDOL 和其余的魔法。

http://www.triangle.io

免责声明:我为 triangle.io 工作

于 2013-08-02T23:31:04.443 回答
0

我认为您正在寻找的信息可以从这个 VISA 网站获得。但前提是您是 VISA 的注册和/或许可合作伙伴。

编辑:查看下生成的 TLV 结构BF0C

tag=0xBF0C, length=0x1A
    tag=0x61, length=0x18
        tag=0x4F, length=0x07, value=0xA0000000031010 // looks like an AID to me
        tag=0x50, length=0x0A, value="VISA DEBIT"
        tag=0x87, length=0x01, value=0x01

我猜您需要先选择A0000000031010才能获得处理选项。

于 2013-02-25T13:11:51.840 回答
0

我正在选择应用程序 2PAY.SYS.DDF01。当我应该选择 AID = 0xA0000000031010 时。应用程序 2PAY.SYS.DDF01 下似乎没有记录。

但是应用程序 0xA0000000031010 下有 1 条记录。拿到这个应用程序后,我执行了 READ RECORD,第一条记录给了我 PAN 和我想要的所有信用卡信息。

谢谢大家插话。

于 2013-02-26T02:33:53.243 回答