在没有 PCI 合规性的情况下集成支付网关时的注意事项

Dos and Don'ts while integrating payment gateway without PCI Compliance

我想就在我的网站中集成支付网关进行一些澄清,因为我们公司没有 PCI DSS 合规性想知道将卡详细信息传递给支付网关通过JavaScript代码?

I know we should not save or store this information, or pass it to our server. And we are not doing this as well.

我们计划使用 Razorpay 提供的 JavaScript file 集成 Razorpay 支付网关。这个 JS 文件提供了通过调用方法 createPayment 创建支付的功能,我们必须在其中传递支付数据。以下是示例数据:

var paymentData = {
      email: email,
      contact: '9999999999',
      method: 'card',
      'card[name]': cardName,
      'card[number]': cardNumber,
      'card[cvv]': cardCvv,
      'card[expiry_month]': cardExpiryMonth,
      'card[expiry_year]': cardExpiryYear
};

代码流程是这样的:

  1. 我们呈现输入字段以输入卡详细信息
  2. 从JavaScript
  3. 中读取每个输入字段中的数据
  4. 构建需要传递给支付网关的数据对象
  5. 调用支付网关提供的方法JavaScript并将对象作为参数传递给此函数

所以我的问题是这种合法正确的实施方式?此外,我无法在 Razorpay 中看到与此类实现相关的任何文档。但他们现在也确实为这种方法提供支持。

在不符合 PCI DSS 的情况下实施支付网关时,是否需要注意任何其他边缘情况,请告诉我。

Let me start with a disclaimer that I'm not an expert in PCI compliance. This is my working knowledge to function as a developer and may not be entirely accurate. I recommend using this as a starting point to do more research.

合法 将取决于上下文。在美国,任何联邦立法均未要求遵守 PCI。相反,PCI 合规性是通过与商家服务提供商签订合同来强制执行的。例如,这里是 ProPay 文档的摘录:

All merchants must be compliant with the Payment Card Industry Data Security Standard (PCI DSS). For merchants that are integrating into the ProPay API, which includes the handling and transmission of card data directly, merchants are required to validate that they have completed the appropriate PCI DSS requirements.

如果您想通过 ProPay 处理付款,您有义务遵守 PCI 要求。如果你要使用 ProPay,在你们关系早期的某个时候,他们会要求通过填写证明你符合 PCI DSS 标准中概述的所有要求的文件来正式洗礼你接受 PCI DSS 标准。较小的商家可以选择通过完成自我评估问卷或 SAQ(发音为 "sack")来宣誓效忠。较大的商家将不得不聘请一些 QSA 顾问代表他们提交报告 - 我知道甚至更少

您可以选择填写哪个 SAQ,具体取决于您接触的信用卡数据。如果您绝对无法控制信用卡数据的获取方式,则可以完成 SAQ A。如果您有资格完成 SAQ A,那么自我评估所需的工作应该会非常简单。

SAQ A-EP 与 SAQ A 类似,但有更多许多 的自我评估要求。供参考:SAQ A has 4 pages of questions, SAQ A-EP30页的问题。 SAQ A 的问题较少,因为当您没有接触信用卡数据时,许多问题根本不相关。

对于您的具体示例:您正在使用的图书馆听起来像 负责进入 DOM 以从 [=10] 中提取信用卡数据=]是创造的。由于第 2g 部分中的这一要求,这使您没有资格完成 SAQ A:

The entirety of all payment pages delivered to the consumer’s browser originates directly from a third party PCI DSS validated service provider(s).

SAQ A-EP(同样是第 2g 部分)允许您创建捕获数据的页面,只要您实际上没有将其提交到您的网络服务器即可:

Merchant’s e-commerce website does not receive cardholder data but controls how consumers, or their cardholder data, are redirected to a PCI DSS validated third-party payment processor;

...

All elements of payment pages that are delivered to the consumer’s browser originate from either the merchant’s website or a PCI DSS compliant service provider(s);

因此,如果您要使用想要使用 SAQ 验证您的 PCI 合规性的支付网关,您将有义务填写冗长、糟糕的 SAQ A-EP 表格,而不是 SAQ A cakewalk。

奇怪的是,Razorpay's landing page 建议他们 要求商家符合 PCI。我对这种说法持怀疑态度,但如果他们 真的 不需要 PCI 合规性,那么您可能不需要追求它。我不建议违抗 PCI...但如果他们从不要求您验证您的 PCI 合规性,您将永远不必填写 SAQ A 或 SAQ A-EP。