[eluser]SPeed_FANat1c[/eluser]
And found where was the problem:
we have a logging function in helper:
Code:
function log_action($type, $description, $info = FALSE)
{
$CI =& get_instance();
$data = array('uid' => (isset($info['user'])) ? $info['user'] : $CI->session->userdata('user_id'),
'imone' => (isset($info['company'])) ? $info['company'] : $CI->session->userdata('imones_id'),
'tipas' => $type,
'info' => $description,
'ip' => $_SERVER['REMOTE_ADDR'],
'browser' => $_SERVER['HTTP_USER_AGENT'],
'referrer' => (@$_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "",
'data' => date("Y-m-d H:i:s")
);
$CI->db->insert('log',$data);
}
It works well everywhere. But when we use in the IPN function and run that function with simulator, it fails. Now I made the same function in the controller, slightly modiefied:
Code:
private function log_action($type, $description, $info = FALSE)
{
//$CI =& get_instance();
$data = array('uid' => (isset($info['user'])) ? $info['user'] : $CI->session->userdata('user_id'),
'imone' => (isset($info['company'])) ? $info['company'] : $CI->session->userdata('imones_id'),
'tipas' => $type,
'info' => $description,
'ip' => $_SERVER['REMOTE_ADDR'],
'browser' => $_SERVER['HTTP_USER_AGENT'],
'referrer' => (@$_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "",
'data' => date("Y-m-d H:i:s")
);
$this->db->insert('log',$data);
}
And now run the simulator - it also runs succesfully, though I don't see any new rows in database log table :/
If you have an idea why the original function from helper makes IPN delivery fail, you're welcome to tell