Paypal沙箱不通知localhost上的IPN处理程序?

时间:2014-08-25 17:27:36

标签: php paypal sandbox

我正在尝试获取所有全局变量并将其记录到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&notify_url=http://127.0.0.1/Mywebsite/includes/paypalipn.php"."&cancel_return=http://127.0.0.1/Mywebsite/purchase.php"."&no_note=1&currency_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文件。 有任何想法吗 ?感谢。

1 个答案:

答案 0 :(得分:0)

如果您仍在寻找解决方案,一种方法是使用Ngrokexpose您的本地网络服务器。