gpt4 book ai didi

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

转载 作者:可可西里 更新时间:2023-11-01 12:24:00 25 4
gpt4 key购买 nike

我如何验证对我指定的 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com