php - 验证 IPN 调用是否来自 PayPal?

标签 php security paypal paypal-ipn

我如何验证对我指定的 notifyURL 的 PayPal IPN POST 请求确实来自 PayPal?

我的意思不是将数据与我之前发送的数据进行比较,而是如何验证此 PayPal 请求来自的服务器/IP 地址确实有效?

最佳答案

The IPN protocol consists of three steps:

  1. PayPal sends your IPN listener a message that notifies you of the event
  2. Your listener sends the complete unaltered message back to PayPal; the message must contain the same fields in the same order and be encoded in the same way as the original message
  3. PayPal sends a single word back, which is either VERIFIED if the message originated with PayPal or INVALID if there is any discrepancy with what was originally sent

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNIntro

关于php - 验证 IPN 调用是否来自 PayPal?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4848227/

相关文章:

paypal - 做直接支付 api : no response from paypal sandbox

单击按钮时 PHP 问题更新数据库

java - 修改 Java Applet 的变量

php - 在php循环时显示两列html表格

c# - 如何在 .NET 中对每次调用进行证书固定?

javascript - Meteor.userId 是可变的

android paypal 支付网关集成问题

api - Paypal Restful API 可用性澳大利亚

javascript - JQuery 3 和 Bootstrap 的自动完成

javascript - 如何使用 JSON 多维数组进行编码