简体   繁体   English

贝宝多次致电网站

[英]Paypal repeatedly calling site

a touch of background. 淡淡的背景。

I work for a restaurant, I code somewhat but nothing special and never used paypal before. 我在一家餐厅工作,我编写一些代码,但没什么特别的,以前从未使用过贝宝。 My boss got a website done which seemed to get passed around whislt a lot and the whole website (whilst working) is a horrible mess. 我的老板完成了一个网站,看起来似乎通过了很多次,整个网站(虽然正在运作)真是一团糟。

The Problem: Our orders keep repeating (whilst money doesn't, thankfully) as an IP from 173.0.81.1 . 问题:作为173.0.81.1中的IP,我们的订单不断重复(幸运的是,没有钱)。

The code is in this format ww.website.com/paypal -> controller@paypal 代码的格式为ww.website.com/paypal-> controller @ paypal

function paypal{ getdetails and to database then the exact code from https://developer.paypal.com/docs/classic/ipn/gs_IPN/ } 函数paypal {getdetails并存入数据库,然后从https://developer.paypal.com/docs/classic/ipn/gs_IPN/ }获取确切的代码

Notably $fp = fsockopen('tls://www.sandbox.paypal.com', 443, $errno, $errstr, 30); 值得注意的是$ fp = fsockopen('tls://www.sandbox.paypal.com',443,$ errno,$ errstr,30);

Should it still be using sandbox? 是否仍应使用沙箱?

After an order processes and we get paid, paypal keeps connecting to website.com/paypal, for days after, which makes the order keep adding to the database. 在处理订单并获得付款后,PayPal会在几天后继续连接到website.com/paypal,这使订单不断添加到数据库中。 I did notice they had forgotten to do fclose($fp); 我确实注意到他们忘了做fclose($ fp); but after adding there is no change. 但添加后没有任何变化。

Is the code missing something, has paypal updated and can you give me any help? 代码中是否缺少某些内容,贝宝已更新,您能给我任何帮助吗?

Thank you in advance guys, feel free to ask for more details 预先感谢您,随时询问更多详细信息

As @frz3993 eluded to, PayPal is sending IPN notifications to the listener URL configured in the account (or in the payment request), but that script must be failing even though it's updating the database successfully. 就像@ frz3993一样,PayPal将IPN通知发送到在帐户(或付款请求)中配置的侦听器URL,但是该脚本即使成功更新数据库也必须失败。 As such, PayPal's system keeps re-sending it because it thinks it failed. 因此,PayPal的系统会继续发送它,因为它认为它已失败。

Check your IPN History in the PayPal account to see if it shows 500 errors. 在PayPal帐户中检查您的IPN历史记录,以查看是否显示500个错误。 Sounds like it will. 听起来会这样。 Then you'll want to check your PHP error logs on the server to see what's going wrong when that particular script runs. 然后,您将需要检查服务器上的PHP错误日志,以查看运行该特定脚本时出了什么问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM