问题描述
在 IPN 文档,它会说检查电子邮件地址以确保这不是欺骗"之类的内容.但我不知道在这种情况下该怎么做,以及我如何告诉 PayPal 我想拒绝交易.例如.我寄回了 400 而不是 200?或者以其他方式更改 POST 数据?
In the documentation for IPN, it says things like "Check email address to make sure that this is not a spoof". But I cannot see what to do when that is the case, and how I tell PayPal I want to reject a transaction. E.g. do I sent back a 400 instead of a 200? Or alter the POST data in some other way?
或者我只是忽略这条消息?(问题在于 PayPal 会不断重试,这对我们来说是浪费带宽,但也意味着用户需要更长的时间才能听到付款失败.)
Or do I just ignore the message? (The problem with that is that PayPal will keep re-trying, which is wasted bandwidth for us, but also means it takes longer for the user to hear about the payment failure.)
背景:我意识到将其发送回 PayPal 并返回 VERIFIED
消息可以处理大多数安全问题.但就我而言,custom
字段中有一些唯一的 ID 信息.如果缺少,或未针对数据库进行验证,我想拒绝付款.我希望我的客户看到它失败了,所以他们知道去使用一个新的表格.另一种方法是接受付款,然后必须涉及一个手动过程,试图找出付款的来源,然后可能进行手动退款.(这样做的其他原因可能是库存在他们看到网站上的产品并点击购买之间的瞬间售罄.)
Background: I realize sending it back to PayPal and getting the VERIFIED
message back handles most security issues. But in my case, there is some unique ID information in the custom
field. If that is missing, or does not validate against the DB, I want to reject the payment. I want my customer to see it failed, so they know to go and use a fresh form. The alternative is to accept the payment, and then have to involve a manual process trying to work out who the payment came from, and then possibly do a manual refund. (Other reasons to do this might be that the inventory has sold out in the split second between them seeing a product on the site and clicking BUY.)
推荐答案
付款没有失败.PayPal 会通知您付款成功:不会询问您是否愿意接受.在这个阶段你不能拒绝它.
The payment didn't fail. PayPal is notifying you that the payment succeeded: not asking you whether you want to accept it. You can't reject it at this stage.
这篇关于如何明确拒绝 IPN 请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!