我如何验证对我指定的 notifyURL 的 PayPal IPN POST 请求确实来自 PayPal?
我的意思不是将数据与我之前发送的数据进行比较,而是如何验证此 PayPal 请求来自的服务器/IP 地址确实有效?
最佳答案
The IPN protocol consists of three steps:
- PayPal sends your IPN listener a message that notifies you of the event
- 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
- 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/