0
我有一個小網站,我使用paypal收取訂閱。 我自己使用我在博客上發現的PHP代碼,因爲官方文檔是IMO根本不清楚的。PayPal IPN不打電話給我的腳本
自12月6日以來,它看起來像貝寶不想再打電話給我的PHP腳本(我指定在我的表格的notify_url url)。 我沒有改變我的代碼或服務器上的任何東西,所以沒有人知道它爲什麼停止工作? 我知道這不是一個PHP代碼問題,因爲我可以在apache的日誌中看到該腳本未被調用(並且我添加了一些調試行,可以在文件中寫入)。
這裏是我的表格的副本:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="cmd" value="_xclick-subscriptions" type="hidden">
<input name="business" value="[email protected]*****.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>
我已經把這個在我的paypal.php文件的開頭就一定要看看有什麼事情發生:
file_put_contents('/tmp/paypaldetail',date('d-m-Y H:i:s').':[debug] '.print_r($_POST,true)."\r\n",FILE_APPEND);
中當我打電話在我的瀏覽器的網址我得到一個空的結果,但仍然是東西..
26-12-2011 19:29:16:[debug] Array
(
)
感謝您的想法;)
12月6日之前它是否正常工作? – 2011-12-26 19:02:43
是的,它確實,訂閱,甚至在第一個月後付款。 – Quentin 2011-12-26 19:15:16
我會看看Apache的訪問日誌,它會告訴您是否以及何時訪問該頁面,並且會告訴您其腳本是否或者它是否真的沒有被教皇擊中 – 2011-12-26 19:15:27