[solved] testing paypal ipn - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: [solved] testing paypal ipn (/showthread.php?tid=42284) |
[solved] testing paypal ipn - El Forum - 06-02-2011 [eluser]SPeed_FANat1c[/eluser] Hi, I am having trouble testing this thing. The function works when I access it from browser. But when I try to test it with ipn simulator, then I get an error IPN delivery failed. HTTP error code 500: Internal Server Error and have no idea what is wrong. And I made a non CI test function for IPN, and tested it with simulator and it was succesful. Is there a way to get more information about the error, some log somewhere or something, why the delivery failed? Edit: something was wrong with the function code itself, when I commented it all out then I get IPN successfully sent message. I thought that it has so send the IPN for any code in the function. Will now debug the code in parts and try to catch the bug. [solved] testing paypal ipn - El Forum - 06-02-2011 [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) 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) 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 [solved] testing paypal ipn - El Forum - 06-02-2011 [eluser]SPeed_FANat1c[/eluser] this line was causing problems: Code: 'browser' => $_SERVER['HTTP_USER_AGENT'], [solved] testing paypal ipn - El Forum - 06-02-2011 [eluser]InsiteFX[/eluser] If your using session library with database you need to change the user_agent field in the table from varchar(50) to varchar(120) they changed it but did not update the docs. InsiteFX [solved] testing paypal ipn - El Forum - 06-02-2011 [eluser]SPeed_FANat1c[/eluser] thanks for the info. But if that was for making the $_SERVER['HTTP_USER_AGENT'] know, that didn't work. This item is still not set. But that is not the problem, I just check with isset function and act accordingly. BTW - now another problem - the payment status is always 'pending'? Is this a bug in paypal testing tools or I don't know something? Edit: found why was it pending - the seller was not configured to convert the currency automatically, so it was pending until the seller manually converts the currency. |