我正在将应用程序从PayPal迁移到Payza(以前的AlertPay)。当我直接从浏览器运行代码来测试令牌处理时,它会显示在日志中并得到正确的响应:token = 47TXhMVgdPrmV3n5aauIZ5CC0MrytYXWjID81pjVnQsEhkSUklPXT3clXZ4SFUFOL5WqepRUpBz5SKomoyPuDw ==&令牌无效。当我直接在浏览器中运行完整的IPN响应时,我会收到失败但没有可见的错误。
但是,当我从Payza生成一个事务或重新发送IPN时,它没有显示在日志中,而且我收到500内部服务器错误。我在CI配置文件中打开了允许查询字符串。
class PayzaIPN {
function validate_ipn($payzaIPN ='',$logId = null) {
define("IPN_V2_HANDLER", "https://secure.payza.com/ipn2.ashx");
define("TOKEN_IDENTIFIER", "token=");
$_POST['token'] = '';
$token = urlencode($_POST['token']);
$token = TOKEN_IDENTIFIER.$payzaIPN;
$response = '';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, IPN_V2_HANDLER);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $token);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
curl_close($ch);
if(strlen($response) > 0)