我正在尝试获取所有全局变量并将其记录到log.txt文件中。 它在真正的网络服务器上工作得很好,但是当我在localhost上使用它时,似乎它没有通知我的IPN处理程序。
购买网址:
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_xclick&amount=".urlencode($row['price'])."&business=".urlencode($paypalemail)."&item_name=".urlencode($row['name'])."&item_number=".urlencode($row['ID']."_".$_SESSION['ID'])."&return=http://127.0.0.1/Mywebsite/purchase.php"."&rm=2¬ify_url=http://127.0.0.1/Mywebsite/includes/paypalipn.php"."&cancel_return=http://127.0.0.1/Mywebsite/purchase.php"."&no_note=1¤cy_code=USD
paypalipn.php:
<?php
define("_VALID_PHP", true);
file_put_contents("log.txt", print_r($GLOBALS, true)."\r\n", FILE_APPEND);
?>
当我通过Paypal沙箱完成购买时,虽然没有创建log.txt文件。 有任何想法吗 ?感谢。