使用 paypal api 进行地址验证服务

发布于 2024-08-10 18:54:44 字数 156 浏览 0 评论 0原文

我们想要为在线支付交易实现 paypal api。我们成功地做到了这一点,但现在我们想要根据最终用户提供的 CC 详细信息来验证帐单地址。

我们读了一些文章,发现我们可以使用 PAYPAL AVS 来实现同样的目的。谁能告诉我们,如何在 PAYPAL NVP API 中使用此服务。

We wanted to implement paypal api for the online payment transaction. Which we did successfully, but now we want to verify the Billing Address against the CC details provided by the end user.

We read some article and found that we can use PAYPAL AVS for the same. Can anyone tell us, how we can use this service in PAYPAL NVP API.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

在梵高的星空下 2024-08-17 18:54:44

如果您在请求中包含用户的街道和邮政编码,API 将自动返回 AVS 响应。

我们的 NVP 示例:

$nvpStr .= '&FIRSTNAME='.$firstName.'&LASTNAME='.$lastName.'&STREET='.$street.'&CITY='.$city.'&STATE='.$state.'&ZIP='.$zip.'&COUNTRY='.$countryCode;

在您的响应数组中,您将拥有 $resArray['AVSADDR']$resArray['AVSZIP']。它将为每个发送 Y/N/空值。只有“N”表示不匹配。空白响应并不一定意味着失败。我建议阅读开发人员指南以获取有关此问题的更多信息:https: //cms.paypal.com/cms_content/US/en_US/files/developer/PP_PayflowPro_Guide.pdf

需要记住的一些事项是:

  1. 如果 'AVSADDR''AVSZIP' 返回“N”,它仍将处理事务。您需要检查并确保凭据正确,除非您使用 PayPal 的欺诈保护(不包括在内)。即使如此,这样做也是个好主意。

  2. 如果您采用auth/delayed capture方法,您可以在授权期间检查'AVSADDR''AVSZIP',而无需向用户的CC收取任何费用来验证.

  3. 如果您还没有这样做,最好也通过将 '&CVV2=' 添加到您的 NVP 来检查 'CVV2MATCH'。 p>

  4. 如果您处于“沙盒”模式,则在 CVV2、地址和邮政编码中使用某些数字将触发“Y”、“N”或空白响应,具体取决于您使用的值。这些都列在 PDF 文件中。

If you include the user's street and zip in your request, the API will return an AVS response automatically.

A sample piece of our NVP:

$nvpStr .= '&FIRSTNAME='.$firstName.'&LASTNAME='.$lastName.'&STREET='.$street.'&CITY='.$city.'&STATE='.$state.'&ZIP='.$zip.'&COUNTRY='.$countryCode;

In your response array, you will have $resArray['AVSADDR'] and $resArray['AVSZIP']. It will send a Y/N/empty value for each. Only "N" means it does not match. A blank response isn't necessarily a failure. I recommend reading the Developer's Guide for more information on that matter: https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_PayflowPro_Guide.pdf

Some things to keep in mind are:

  1. If either or both the 'AVSADDR' and 'AVSZIP' return "N" it will still process the transaction. It's up to you to check and make sure the credentials are correct, unless you are using PayPal's fraud protection (not included). Even still, it's a good idea to do so.

  2. If you the auth/delayed capture method, you can check the 'AVSADDR' and 'AVSZIP' during authorization without having to charge anything to the user's CC to verify.

  3. In case you're not already, it's a good idea to also check the 'CVV2MATCH' by adding '&CVV2=' to your NVP.

  4. If you are in 'sandbox' mode, using certain numbers in the CVV2, Address, and ZIP will trigger a "Y", "N", or blank response, depending on which values you use. These are listed in the PDF file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文