4

我正在为一个网站构建一个 IPN 扩展,但目前使用的购物车的服务提供商有选项Notify_URL集(在 paypal 提交表单中)用于它自己的内部处理(这有点缺陷)。如果在 PayPal 卖家资料中设置了 IPN URL,将同时使用还是只使用一个?

4

2 回答 2

6

在这个问题上似乎有些混乱。有些人声称两者都会起作用。他们声称它应该在这种情况下通知两者。尽管看起来对于基于订阅的付款,PayPal 只会使用您在 PayPal 个人资料中设置的 IPN URL。

但是,在官方 PayPal 文档中:

您可以为特定付款指定 IPN 侦听器;这是接收与自适应支付相关的 IPN 的唯一方式。在这种情况下,PayPal 会将 IPN 消息发送到特定按钮或 API 操作的通知 URL 中指定的侦听器,而不是您的配置文件中指定的侦听器。

这似乎表明 notify_url 将覆盖配置文件设置。我认为最好遵循 PayPal 文档,然后一些可能会起作用的东西,即使它不打算这样做。

资料来源:贝宝文档

还值得注意的是,如果您在 PayPal 帐户中禁用 IPN,则两者都不起作用。

于 2012-07-05T18:03:10.910 回答
1

我认为自上次回答以来文档可能已经更改。我也很好奇什么是优先的:notify_url或者你的个人资料的IPN url。从文档:

或者,您可以覆盖 URL 来为特定付款指定另一个侦听器。

这里的措辞有点混乱,但似乎即使您在个人资料中关闭了 IPN,如果您notify_url在付款中传递了一个值,它仍然会被发送。我加粗的:

The IPN message will always be sent to your notification URL unless receiving IPN messages has been disabled. Even though you have not enabled receiving IPN messages in your Profile or you have reset your preference by turning off IPN messages, PayPal still sends IPN messages to the notification URL you specify for a specific payment.

I have seen this work first hand, which is why I investigated it more to make sure it was working correctly. My IPN History told me "your IPN notifications are turned off," prompting me with a link to turn it on. However, below that was a history. The reason was because I was passing in my desired notify_url with the transaction.

So @johnmadrak's statement, "It's also worth noting that if you disable IPNs in your PayPal account, neither will work," is actually not true. Even if you've turned the setting off in your profile, passing in a notify_url still works.

于 2015-12-19T01:37:32.130 回答