简体   繁体   English

贝宝IPN不调用我的脚本

[英]Paypal IPN not calling my script

I have a small website where I use paypal for reccuring subscriptions. 我有一个小型网站,在这里我使用贝宝来获取订阅。 I did the PHP code myself using what I found on blogs as the official documentation is IMO not clear at all. 我自己使用博客中的内容进行了PHP代码编写,因为IMO的官方文档根本不清楚。

Since the 6th December, it looks like paypal doesn't want to call my php script anymore (I specify the url in the notify_url of my form). 自12月6日以来,贝宝似乎不再希望调用我的php脚本(我在表格的notify_url中指定了该网址)。 I didn't change anything in my code or on the server so does anyone got an idea why it stopped working ? 我没有在代码中或服务器上进行任何更改,所以没有人知道为什么它停止工作吗? I know this is not a php code issue because I can see in apache's logs the script is not called (and I added some debug lines that write in a file to be sure). 我知道这不是PHP代码问题,因为我可以在apache的日志中看到未调用该脚本的情况(并且我添加了一些调试行以确保可以写入文件)。

Here is a copy of my form: 这是我表格的副本:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="cmd" value="_xclick-subscriptions" type="hidden">
<input name="business" value="paypal@*****.com" type="hidden">
<input name="item_name" id="item_name" value="************" type="hidden">
<input name="a3" id="a3" value="6.99" type="hidden">
<input name="p3" value="1" type="hidden">
<input name="t3" value="M" type="hidden">
<input name="src" value="1" type="hidden">
<input name="sra" value="1" type="hidden">
<input name="no_shipping" value="1" type="hidden">
<input name="custom" id="custom" value="11" type="hidden">
<input name="return" value="http://*****.com/account" type="hidden">
<input name="cancel_return" value="http://*****.com/account" type="hidden">
<input name="notify_url" value="http://paypal.*****.com/paypal.php" type="hidden">
<input name="no_note" value="1" type="hidden">
<input name="currency_code" value="EUR" type="hidden">
<input name="lc" value="US" type="hidden">
<input src="images/x-click-but20.gif" name="submit" alt="Subscribe with Paypal Now !" border="0" type="image">
</form>

I've put this at the begining of my paypal.php file to be sure to see if anything happens: 我将其放在我的paypal.php文件的开头,以确保是否发生任何事情:

file_put_contents('/tmp/paypaldetail',date('d-m-Y H:i:s').':[debug] '.print_r($_POST,true)."\r\n",FILE_APPEND);

Of course when I call the url in my browser I get an empty result but still something .. 当然,当我在浏览器中调用url时,会得到一个空的结果,但还是有一些..

26-12-2011 19:29:16:[debug] Array
(
)

Thanks for your ideas ;) 谢谢你的想法;)

I have had a similar problem. 我有类似的问题。 Try this: Login to paypal, -> Profile -> My Selling Tools -> update (Block Payments) -> Block accidental payments click 'no'. 尝试以下操作:登录到Paypal,->个人资料->我的销售工具->更新(批量付款)->阻止意外付款,单击“否”。

Then test it again to see if the IPN will execute your script. 然后再次测试以查看IPN是否将执行您的脚本。 You may want to change it back later so that is does block accidental payments. 您可能需要稍后再将其更改,以防止意外付款。

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

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