Daamon Posted July 5, 2016 Share Posted July 5, 2016 Hi, We're having an ongoing sporadic issue where the Order Status isn't being updated to "Processing" after receiving payment through PayPal - sometimes it works (as in sets "Processing" automagically) and sometimes it doesn't. We've contacted PayPal and got the following response: "From my investigation, I found that you are using CubeCart for your website. I found that CubeCart is using our Instant Payment Notification (IPN) system to display payment information on merchant's CubeCart panel, I would suggest checking your IPN postback logs to confirm if you got a successful IPN validation from PayPal. Basically, for each payment, PayPal sends an IPN request to merchant's IPN URL, which is in CubeCart system, and CubeCart needs to send a postback to PayPal to validate the IPN information. If this step fails, then CubeCart won't be able to see any details including payment status. And, I found that IPN messages for all transaction in your account has successfully sent to CubeCart backend system. In order to solve this issue, you need to reach out CubeCart technical support team to investigate this issue more further as I can that all of your IPN message was successfully sent to CubeCart. Probably there might be an issue where CubeCart got delayed in converting IPN message into Order details in your admin panel." Based on this, I did some Googling and digging around in these forums and found a suggestion to change some code in CubeCart (relating to the IPN URL I think) from & to &. But this hasn't fixed our issue. I don't know where to look for the IPN postback logs (I've searched that too, but no luck) nor do I really know what I'm looking for... Any ideas? Cheers in advance. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 5, 2016 Share Posted July 5, 2016 I don't do PayPal, but looking at the code that the standard PayPal "gateway" (as opposed to "plugin") uses, CubeCart tells PayPal to use this address for the IPN:/index.php?_g=rm&type=gateway&cmd=call&module=PayPal When PayPal contacts your store with these key/value pairs in the querystring, CubeCart uses the PayPal gateway code (the "call" function) to send back the data that PayPal provided about the order. So, if you have access to your site's web access logs, you will be able to see if/when PayPal did send the IPN. What the web access logs will not show is the extra data PayPal sent (called the "POST" payload), nor how CubeCart responded. However, the "call" function will use CubeCart's "Request" capability to send that POST data back to PayPal. This is the "postback validation" mentioned in the PayPal tech's response. Fortunately, CubeCart did not tell the "Request" function to not log the postback validation and PayPal's response. This Request/Response can be seen in CubeCart's admin, Request Log. Please find a log entry dated the day and time of an order that did not move from Pending to Processing having made a successful transaction by PayPal. Quote Link to comment Share on other sites More sharing options...
Daamon Posted July 5, 2016 Author Share Posted July 5, 2016 Hi again @bsmither... We received 8 orders yesterday: 4 went to "Processing" as expected, 4 stayed at "Pending" when they shouldn't. In the "Request Log" there's 8 entries for yesterday which have a perfect correlation between Processing / Response Received = Verified and Pending / Response Received = "Error: cURL Error (6): name lookup timed out". A quick Google search on "cURL Error 6" returned mixed solutions... Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 5, 2016 Share Posted July 5, 2016 "Name lookup timed out." Hmm... You may want to bark at your hosting provider and complain the DNS lookups are taking too long. In the meantime, let's try this: In the file /classes/request.class.php, near line 60, find: public function __construct($url, $path = '/', $port = 80, $return_headers = false, $return_transfer = true, $timeout = 15, $cache = false) { Change just the $timeout value to 45. Quote Link to comment Share on other sites More sharing options...
Daamon Posted July 6, 2016 Author Share Posted July 6, 2016 Cheers - we'll get onto the host provider and I've made the change to the timeout value. We'll wait for a few orders to come through and see how we go... Quote Link to comment Share on other sites More sharing options...
Daamon Posted July 10, 2016 Author Share Posted July 10, 2016 Hi. We've had about a dozen orders through in recent days (since my last post) and all have been automatically updated from Pending to Processing after a successful PayPal payment - so looks like the timeout tweak worked. We got on to our hosting provider who's looking into things from their end too. Thanks for your help! Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted July 10, 2016 Share Posted July 10, 2016 Fingers crossed! As always, if you have future issues with this - I'll take the resolved off. Quote Link to comment Share on other sites More sharing options...
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.