tobybailey Posted January 23, 2014 Posted January 23, 2014 About 36 hours ago something changed and orders started being successfully paid for via Papal (Website Payments Pro Hosted Official on oSC 2.3) but IPN notifications stopped being processed and so the orders were never being updated to paid in the database. Weblogs our end show the IPNs arriving and on Paypal we see them appear in our IPN History as acknowledged. Some part of the verification procedure whereby we have to send back a copy of the IPN and Paypal returns "Verified" or "Invalid" is presumably failing. We get an email generated by our IPN handler saying the IPN was invalid, but a look at the code suggests that would also happen if for some reason we were not getting a response from the Paypal verification server. A week or two ago we had a period of a few hours where the same thing happened but it magically fixed itself and started working again. Does anybody have any ideas/experience on this? If so, I'd be very grateful for suggestions. Toby Quote
AngusD Posted January 24, 2014 Posted January 24, 2014 Hello, I encountered this issue too. Hopefully I've fixed it. Open your "paypal_ipn.php"-script and search for if ( ($res == 'VERIFIED') || ($res == 'INVALID') ) { $result = $res; break; } and change it to if ( (trim($res) == 'VERIFIED') || (trim($res) == 'INVALID') ) { $result = trim($res); break; } This removes the spaces at the end of the lines. I don't know where they come from, if PayPal changed something. AD Quote
tobybailey Posted January 25, 2014 Author Posted January 25, 2014 Angus, thanks. In fact I tracked this down myself this morning just before seeing your post and arrived at a similar solution. I was logging the paypal response to the verification and it sends something around the important bit I record as -------------- Content-Type: text/html; charset=UTF-8 -blank line- 8 VERIFIED 0 ------------ I wonder what the "8" and the "0" are about? On a separate note, we are using the "official" website payments pro i-framed payment solution. It works but we do get a lot of problems with customers not managing to check out due often it would seem to the iframe not appearing. I can't quite decide whether this is caused by Paypal down times, crankyness of the i-frame solution or something subtle we are doing wrong. I'd be interested to know if you are using something similar and what its reliability is like. Toby Quote
AngusD Posted January 25, 2014 Posted January 25, 2014 (edited) Hi, I don't know what the numbers represent. I called the ipn-script without valid variables and received "7 INVALID 0" (last 3 lines), so maybe 7 => INVALID; 8 => VERIFIED? But this is just a guess. We use the (customized) standard OSC-paypal-ipn payment module, no iframes. Maybe some of your customers disabled the display of iframes in their browsers? AD Edited January 25, 2014 by AngusD Quote
tobybailey Posted January 25, 2014 Author Posted January 25, 2014 IIRC Paypal's documentation says very clearly that the response contains only the word VERIFIED or INVALID. But I'd not be surprised if that was wrong. Most of our customers are not very techy, so I doubt they disable iframes. And sometimes they try again and it works - and I doubt even more that that can be due to their working out how to enable them. Possibly we should look at the solution where the customer gets taken transparently to paypal hosted (but branded by us) pages. But maybe it is just paypal unreliability - they do seem to have s surprising amount of down time. Cheers, Toby Quote
AngusD Posted January 25, 2014 Posted January 25, 2014 I believe, the bucket full of stuff comes from the fsockopen-function. If I use cURL I get only "VERIFIED" or "INVALID", nothing more. Can't tell much of PayPal's downtime. I noticed only one or two (or so) downtimes of PayPal myself. AD Quote
ozEworks Posted February 3, 2014 Posted February 3, 2014 I just wanted to note that this is happening for us on multiple sites running MS2.2 on different servers. Quote
chadcloman Posted February 6, 2014 Posted February 6, 2014 (edited) Thank you , thank you, thank you for figuring out that it was a trim issue. Spent hours on this problem for a (non-osCommerce) script that I maintain. EDIT: In my case it appears to be an extra newline, not padded spaces. But trim() works either way. Edited February 6, 2014 by chadcloman Quote Check out Chad's News.
ozEworks Posted March 18, 2014 Posted March 18, 2014 We raised this issue directly with PayPal but they denied any change had occurred. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.