贝宝IPN未呼叫问题 [英] Paypal IPN not calling Issue

查看:87
本文介绍了贝宝IPN未呼叫问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到有关Paypal IPN无法在我的一台服务器上被解雇的问题.下面是方案.

I am having some problem regarding Paypal IPN not getting fired on one of my server. Below is the scenario.

1)我有两个站点,站点A(旧)在服务器X上,站点B(新)在服务器X上,两个站点都具有相同的Paypal快速结帐表单提交和IPN代码. 2)网站A顺利运行并提交了Paypal Express结帐表格,并且IPN被正确触发. 3)但是在站点B中,尽管我们的表单已正确提交且付款成功,但IPN并未被触发.

1) I have two sites site A(old) is on server X and site B(new) on server Y.Both the sites having identical Paypal express checkout form submission and IPN code. 2) Site A is running smoothly with paypal express checkout form submission and IPN is get fired correctly. 3) But with Site B, though our form gets submitted correctly and payment is successful, IPN is not getting fired.

更多信息: 我检查了Paypal的业务A/c,了解添加IPN所在的IP/域可能需要的任何功能.

More information : I checked Paypal`s business A/c for any of functionality that may needed to add IP/domain where IPN is located.

我还向贝宝(Paypal)支持人员查询,他们说从2014年3月25日起,他们已告知要将贝宝的API相关IP地址添加到我们的服务器防火墙中.我们已经添加了这些IP地址,但是仍然无法正常工作.

I have also checked with Paypal support where they says that from 25 March 2014 they have told to add Paypal`s API related IP address to our servers firewalls. We had done with adding those IP address but still this is not working.

  URL : https://ppmts.custhelp.com/app/answers/detail/a_id/14/related/1/session/L2F2LzEvdGltZS8xNDAxMTcyODkwL3NpZC9VbENEUWhWbA%3D%3D

希望以下信息足以满足您的需求.请提出我们中是否有人需要解决的解决方案.

Hope following information is sufficient for you. Please suggest if any one of us have some solution to overcome.

谢谢.

推荐答案

不幸的是,我没有太多有关特定问题的信息可以使用,因此可以将其作为《 IPN故障排除指南》以备将来参考:)

Unfortunately, there's not much issue specific information for me to work with, so lets make this an IPN Troubleshooting Guide for future reference :)

检查给定帐户的IPN功能状态-

Check the IPN feature status for the given account -

https://www.paypal.com/cgi- bin/customerprofileweb?cmd = _profile-ipn-notify (先登录到您的帐户,然后单击链接以转到IPN设置)

https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-ipn-notify (login to your account first, then follow the link to be taken to the IPN Settings)

替代:

  • 登录到PayPal.com
  • 打开个人资料->我的销售偏好
  • 找到即时付款通知"选项

IPN可以处于四种状态:

There are four states IPN can be in:

  • 已启用->如果系统提示您选择设置,则IPN为 启用,并且如果在服务器中传递了通知URL,则将发送IPN. 结帐请求.

  • Enabled --> If you're prompted to choose your settings, IPN is enabled and IPNs will be sent if a notify URL is passed in the checkout request.

启用并设置了默认URL->如果显示通知URL",并且将邮件传递"设置为启用,则每次在不指定IPN URL的情况下都将使用默认URL.结帐请求(例如,eBay交易将发送到默认URL,因为eBay的Express Checkout集成未传递通知URL)

Enabled with Default URL Set --> If a "Notification URL" is displayed and "Message delivery" is set to enabled, the default URL will be used every time you do not specify a different IPN URL in the checkout request (e.g. eBay transactions will be sent to the default URL because eBay's Express Checkout Integration does not pass a notify URL)

已禁用->您从未设置默认URL,但是在事务中传递的IPN URL引发了太多错误.您应该会看到一个空的地址字段,并且选中了不接收IPN消息(已禁用)"选项.

Disabled --> You never set the default URL, but IPN URL passed in your transactions has been throwing too many errors. You should see the empty Address field and the option "Do not receive IPN messages (Disabled)" being checked.

使用默认URL设置禁用->在某个时间点配置了默认IPN URL,但是由于默认URL或动态URL失败,因此已禁用IPN功能.您将看到URL和消息传递=禁用"

Disabled with Default URL Set --> a default IPN URL was configured at some point in time, but due to failures on the default URL or on the dynamic URLs, the IPN feature has been disabled. You will see the URL and "Message Delivery = Disabled"

为什么贝宝(PayPal)禁用IPN传送?

PayPal希望您的服务器以HTTP-200 OK消息响应.如果我们收到不同的响应代码,则会启动重试机制. IPN消息总共发送16次,每次尝试之间的时间间隔增加.如果一个URL的错误达到某个阈值,则会自动禁用IPN.您将收到一封电子邮件,发送到贝宝帐户上列出的主要电子邮件地址,警告您即将停用

PayPal expects your server to respond with a HTTP-200 OK message. If we receive a different response code, a retry mechanism is set in motion. The IPN message is sent a total of 16 times with increasing time frames between each attempt. If the errors for one URL reach a certain threshold, IPN is disabled automatically. You will receive an e-mail message to the main e-mail address listed on the PayPal Account, that warns you of an impending deactivation

  1. 如果启用了IPN,请在它将显示您服务器发回的最后一个HTTP响应代码,您可以过滤失败/重试的消息.

    It'll show you the last HTTP Response Codes your server is sending back and you can filter for failed / retrying messages.

    检查 http://en.wikipedia.org/wiki/List_of_HTTP_status_codes 来查看状态的意思.

    Check http://en.wikipedia.org/wiki/List_of_HTTP_status_codes to see what the status means.

    如果没有HTTP响应代码,则说明存在较低级别的连接问题. 最常见的原因是:

    If there is not HTTP Response code, there's a connection issue on a lower level. Most frequently caused by:

    • 防火墙
    • SSL连接问题(尝试使用HTTP)
    • 黑洞布线

    如果您认为所有配置均正确,请查看 https://ppmts .custhelp.com/app/answers/detail/a_id/733

    If you feel that everything is configured correctly, check out https://ppmts.custhelp.com/app/answers/detail/a_id/733

    如果IPN消息标记为已发送"(已接收HTTP 200),则IPN处理的下一步是将数据发回到PayPal进行验证.您既可以在脚本中启用日志记录(将HTTP请求和响应转储到服务器上的文件中),也可以联系PayPal MTS(

    If the IPN messages are marked as "SENT" (HTTP 200 Received), the next step in IPN processing is posting the data back to PayPal for validation. You can either enable logging within the script (dump the HTTP request and response in a file on the server) - or you can contact PayPal MTS ( https://www.paypal.com/mts ) and ask what's visible on the PayPal Side.

    检查与Paypal的连接性的一个很好的测试是在Web服务器本身上运行以下命令:

    A good test to check the connectivity to paypal is to run the following command on the webserver itself:

    curl -d"cmd = _notify-validate" -v https://www.paypal. com/cgi-bin/webscr

    curl -d "cmd=_notify-validate" -v https://www.paypal.com/cgi-bin/webscr

    如果您看到POST已经到达PayPal,但是PayPal对所有消息都返回INVALID:

    If you see that the POST has reached PayPal, but PayPal responds with INVALID for all messages:

    检查您的代码, https://github.com/paypal/ipn-code-samples 是很好的样本来源

    Check your code, https://github.com/paypal/ipn-code-samples is a good source of samples

    如果PayPal对某些消息做出INVALID响应,则可能是遇到编码问题.最好在 https://www下设置字符编码设置.paypal.com/cgi-bin/customerprofileweb?cmd = _profile-language-encoding -为最佳效果将它们设置为UTF8.

    If PayPal responds with INVALID to some messages, you're likely running into an encoding issue. You'd best set your Character Encoding settings under https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-language-encoding - set them to UTF8 for the best results.

    如果PayPal响应为VERIFIED,但在验证付款后脚本无法继续处理,请确保您运行TRIM()(或所用语言的等效项)以删除空格,换行符和CRLF

    If PayPal Responds with VERIFIED, but your script doesn't continue processing after validating the payment, make sure you run a TRIM() (or the equivalents in the language being used) to remove whitespace, line feeds and CRLF

    此后发生的情况取决于IPN脚本,您可能会在连接数据库时遇到错误,为某些数据或某些编码错误解析IPN消息.

    What happens afterwards is up to the IPN script you may run into errors while connecting to a database, parsing the IPN message for certain data or some coding errors.

    简而言之:如果已收到IPN消息,将其回发并进行了验证,则其他所有情况都将在服务器上的您自己的代码中发生,因此您必须开始挖掘日志文件(或确保正在收集日志)创建一个,这总是一个好主意)找出正在发生的事情.如果问题是可重现的,那么最好检查其中一个示例脚本(包括日志记录)会发生什么情况

    希望这有助于立即解决IPN问题-有关IPN的任何问题?如果您想调查Paypal方面的情况,请联系paypal.com/mts.

    Hope this helps tackling IPN issues head on - any questions regarding IPN? Contact paypal.com/mts if you want to investigate what's happening on the paypal side.

    这篇关于贝宝IPN未呼叫问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆