我使用代码https://github.com/Quixotix/PHP-PayPal-IPN
设置了一个简单的IPN但是,当我运行以下
时<?php
include('ipnlistener.php');
$listener = new IpnListener();
$listener->use_sandbox = true;
try {
$verified = $listener->processIpn();
} catch (Exception $e) {
// fatal error trying to process IPN.
exit(0);
}
if ($verified) {
if ($verified) {
mail('myemail@gmail.com', 'Verified IPN', $listener->getTextReport());
}
else {
/*
An Invalid IPN *may* be caused by a fraudulent transaction attempt. It's
a good idea to have a developer or sys admin manually investigate any
invalid IPN.
*/
mail('myemail@gmail.com', 'Invalid IPN', $listener->getTextReport());
}
}
?>
我没有从我的服务器收到任何邮件,说它从Paypal获得了IPN
答案 0 :(得分:0)
您需要详细调试,一种方法是将每行后的日志写入文件,然后检查导致问题的步骤,也可以直接浏览IPN URL并检查无效IPN的电子邮件是否正常运行。邮件服务器配置可能存在问题。