Posted: October 3, 2014 at 9:40 am
{WP 4.0, EE4 4.3.1.p no add-ons, http://www.ninthdistrictpta.org] Two registrations paid with PayPal so far – in EE4 PAYMENT DETAILS the GATEWAY shows PayPal, but the GATEWAY RESPONSE field is blank. In both cases, I had to manually open the registration and click the APPLY PAYMENT button to get them to the APPROVED status. In PayPal, in both cases the IPN log shows SENT and even RESENT after I resent the messages. My site’s /transactions/ page says “No IPN (or incomplete IPN) received.” I have double-checked all the settings that I can find. PayPal says “sent it” & EE4 says “didn’t get it” as far as I can tell. Any tips on troubleshooting? |
|
When you navigate to thee transactions page your are not supplying an IPN with your request, therefore you will always see ‘No IPN (or incomplete IPN) received.’ when you visit that page manually. Is the Paypal Account you are using a verified Business/Premier account? Have you set the response URL for the IPN’s within your Paypal Account? Instructions are here: https://eventespresso.com/wiki/how-to-set-up-paypal-ipn/#paypal Also, 4.4.3 is the latest version of Event Espresso 4, I would recommend making a full site backup (all files and the database) and then updating to the latest version. |
|
“using a verified Business/Premier account” – Yes, Business. “Have you set the response URL for the IPN’s within your Paypal Account?” Yes, and double checked, to http://www.ninthdistrictpta.org/transactions/. Also made sure IPN Messages are enabled in PP. “you will always see ‘No IPN (or incomplete IPN) received.’ when you visit that page manually” – then why have that message? It makes us think something might happen… Something like “Move along, nothing to see here, and don’t monkey with this page” would be much more useful. I get no error messages or any other outward indications that something is wrong that I can find in PP or EE4, other than the absence of the desired result. |
|
Further to the above, looking into the PP IPN message log, that says “DELIVERY STATUS: SENT” and “HTTP RESPONSE CODE: 200” which I take to mean that the IPN message was sent, some serve responded with “200 OK.” Right? Where do I look next? |
|
Also, in EE4 “Use the Debugging Feature and the PayPal Sandbox” is set to “NO” And just for the record, I am overall very happy with EE4, and have managed to fix some of my own problems without outside assistance 🙂 |
|
Hi Michael, I did a little digging on your site and noticed you are running W3 Total Cache. Your site is serving up a cached copy of the transactions page which will prevent the IPN’s from registering. You’ll need to set all of EE’s critical pages on the do not cache list, we have instructions on how to do this here: https://eventespresso.com/wiki/setup-nocache-exclusion-rules-event-espresso/ Once you have done that be sure to Purge/Delete the cache. |
|
Ah ha – there’s some useful information! That’s a very helpful wiki article – did I miss some place that pointed to that? I’m pretty sure it’s not mentioned on the IPN troubleshooting page. Anyway, no-cache not set as instructed, page cache is flushed and I’ve made a note of this in case I ever go thru this again – we’ll see what happens with the next registration. Thanks! |
|
It was not mentioned on the IPN troubleshooting page no, I think the reason for this is the issues caused from caching are not specific to the IPNs but dynamically generated content as a whole. However I do think it would be a good idea to include a reference to caching within those troubleshooting steps so have updated that document, thank you. |
|
Excellent, hopefully the next person with this problem can benefit from my experience now – thanks! |
|
IPN is still not working for PayPal payments… – per earlier guidance, W3TC is set to not cache the EE4 pages, including /transactions/ and CloudFlare (also used) set to never cache the same pages. – I can see the client’s payment in my PP account. – IPN log says the IPN message was sent with a status code of 200, which I believe means “OK” – In EE4, the Payment DEtails says in big red letters “No payments have been applied to this transaction yet.” – Per some EE4 doc, I FTP’ed into ninthdistrictpta.org/wp-content/uploads/espresso/logs looking for the error log, but there’s nothing there except an .htaccess file. So, any advice for troubleshooting? or where to look for clues? I’m approaching a registration deadline this Friday, so I’m expecting traffic to spike; I’d like to not have to manually Apply Payment on every on-line registration… |
|
Hi Michael, Caching may still be the cause of the issue. Here’s what’s at the bottom of the source of the registration page: Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/
What this means is the page is being cached, and the database is too. Caching both of these can interfere with the payment status (which is recorded to the database) being updated by Instant Payment Notification from PayPal. In most cases (especially if you’re on a shared host) Database caching should be kept disabled. There’s a good guide on how to set up W3 total cache here that explains more: http://www.wpbeginner.com/plugins/how-to-install-and-setup-w3-total-cache-for-beginners/ |
|
I had W3TC set almost exactly as specified in the reference article, except that I had database cacheing ON. To make it simple, I deactivated the W3TC plugin completely. That and my CDN are now completely out of the string. If I can get something working, I will turn functions back on one by one. I didn’t mention earlier, but I get the same problems in sandbox mode. Thanks! |
|
Hi, Thanks for temporarily deactivating W3 Total cache. Could you also move Cloudflare into development mode so that its caching features are off? — |
|
I deactivated Cloudflare last night – completely, off, deleted, gone. W3TC “and my CDN [CloudFare] are now completely out of the string.” Has not been a PayPal payment attempt since. |
|
Hi Michael, Another thing to check is if there is server level caching going on, like Varnish. If you’re hosted on a DreamPress account, it’s going to have the Varnish caching mechanism set up, and I’m not certain that can be turned off. Can you find out if Varnish is being used and if so, do you have access to a different server that you can test the IPN with? |
|
Support staff at DreamHost says yes, Varnish is in use, and is an integral part of the DreamHost service I pay for. In other words they don’t know of a way to turn Varnish off. I’d have to say for a plugin (EE4) to make rules about the low-level features of hosting doesn’t sit well with me. Or if that has to be the case, then that should have been disclosed CLEARLY in the pre-sales stage. I’m overall very happy with the DreamHost service, so not eager to part ways. That all said, I have another, shared server, although still on DreamHost, that’s reserved for development – will take a day or two, but I can clone the production site over there. While I do that, maybe you guys can think a little more on the problem? DH support staff did flush Vanish so we’ll have a “clean slate” for testing. |
|
Hi Michael, We have a page on caching here: https://eventespresso.com/wiki/setup-nocache-exclusion-rules-event-espresso/ Here is a simplified version of caching: Caching takes a copy of a page and makes it available for quick delivery for period of time before refreshing that cache (to ensure its up to date). That works fine for static content that does not change often such as blog posts and WordPress pages. However, registration checkout is a dynamic experience as its an ecommerce platform. That is the registration information will be different for each person that is registering. Therefore, you could use W3 Total Cache, WP Super Cache, and other caching services as long as you exclude the Event Espresso pages. These caching rules also applies to other ecommerce platforms for WordPress: https://easydigitaldownloads.com/docs/wp-super-cache/ Some web hosts also offer the ability to turn off caching from their end for various areas of your site: http://wpengine.com/support/wpengine-ecommerce/ — |
|
|
It may be something other than caching, as well. http://www.linuxjournal.com/content/speed-your-web-site-varnish?page=2,1 points out that POST requests are excluded from Varnish caching, and the IPN message from Paypal is a POST request. They point out that Varnish has excellent logging capabilities, so it should not be hard to set that up, run an IPN test, and see if the request comes through. You can use the re-send IPN message from your Paypal account, set up live logging on Varnish and Apache, and watch the server’s response in real time. |
@Lorenzo – I understand the concept completely, and have been using it successfully for on this domain a long time. If you will read back thru this thread, you will see that earlier I was referred to that same wiki piece about the no-cache rules, I set up the don’t-cache rules and still had a failure. All caching is is now disabled and waiting for the next customer.
Let’s all keep thinking! Hope to have a clone set up in a dev server shortly. |
|
Hi, Varnish is a type of caching and it can be adjusted on the server level. The problem is that we don’t know the settings that are in use. From the searches that I’ve found, Varnish cannot be turned off through the DreamPress service. They can “purge” the cache but this is not the same as turning it off or excluding certain pages from it. Let us know if you see different results on a different site that isn’t running under Varnish. — |
|
Ok guys – I’m maybe not the average noob user here, so let me summarize what I hear from the various sources: DreamHost – doesn’t think Vanish should be a problem. If you want me to tell them this is their problem, let me know, but I’ll probably need some hard facts. Didn’t sounds like I’m likely to get much control or insight into Varnish. Sidney from EE – thinks the POST IPN message should flow right thru Varnish – no problem. He thinks the problem “may be something other than caching” which makes a great deal of sense to me based on results so far. Lorenzo – still pointing at Varnish, and hints about changing hosting companies. Right now, I’m a happier with DreamHost than EE4, so if we can’t figure this out and something get’s replaced, it’s a lot more likely to be EE4 than DreamHost. As I’m starting to not believe in the cache theory, I think late tonight I’m going to turn CloudFlare back on, with the appropriate Do Not Cache page rules of course. I’m feeling the effects from not having some of their security features – another reason reason I don’t like all these things turned off. I’ll leave W3TC off for now, as I think I don’t get much bang for that buck. Keep thinking! In 10 days I’ll be past the current event and will have a little more ability to experiment on the production server. |
|
Hi Michael, Here’s the general PayPal IPN Troubleshooting tips from PayPal: We have also seen it happen where security features can have the unintended effect of blocking the IPN and causing a failure to update the Payment status. There are a number of causes that relate to security features, and I’ll give you some links where more information is published (outside of what we’ve published, so you can see it’s not always an Event Espresso issue) :
Another security-related cause we’ve seen in the past is an improperly set up (or missing) CAcert.pem file on the server. What happens then is the IPN isn’t being blocked, but the IPN validation fails. My guess is that shouldn’t be an issue on a modern host on DreamPress, but I’ll mention it here anyway just in case. |
|
That sounds like some useful info, I’ll go to work on those. Meanwhile, here’s a few responses: – never used the Bad Behavior plugin, so that’s not an issue DreamHost is not a tiny niche player in hosting – could I be the only person with this configuration (and problem)? |
|
Hi Michael, I included Bad Behavior as an example. Other security solutions are capable of doing the same thing. You’re correct that DreamHost is not a tiny niche player in hosting, and many of our customers are successfully using DreamHost + the PayPal IPN. |
|
@Josh – Security was a new theory, so I deactivated what I use (WordFence). Had no effect on the problem – IPNs still didn’t get thru. Good thought tho. |
|
There have been 25 posts on this thread, so I thought I’d recap the current situation: My theory – I have a setting wrong somewhere, rather than a cache problem. Unfortunately nothing I can find hints at any problem. |
|
Update – dev site up on shared server, to the extent I can an exact copy of the prod site. Made sandbox registration but “No payments have been applied to this transaction yet. Click “Apply Payment” below to make a payment.” Problem unchanged again but we know now it’s not DreamPress. 🙁 |
|
On a related topic, I went looking for EE4 log files – found a reference for where to look, ftp’ed in…nothing there at all…no files. That sent me off searching support for log file problems which led me to this one https://eventespresso.com/topic/paypal-payments-payments-incomplete-2/ (ignore page 2 – hijacked to unrelated topics). That user as it turns out was having something like my IPN problem, and my log file MIA problem. Long story made short, I changed file permissions in the Logs folder to 777, and now there’s at least a log file, although didn’t seem to cure my primary problem as that individual claimed. Any thoughts? |
|
My initial thought after reading your update is maybe you can try using a sandbox PayPal account in Event Espresso PayPal sandbox mode. This will give you more debug info. |
|
And my update 1pm update says I cloned the prod site to a different server and switched over to PayPal Sandbox – same unfortunate result, but now I have a ton of log info that I don’t know what to do with. |
|
You can forward the debug info to support @ eventespresso.com. Along with that, please be sure that the sandbox account has the PayPal IPN activated. It’s disabled by default. |
|
One log file was sent yesterday, to the support@ address. |
|
Hi Michael, We got it, and Sidney has followed up with you via email. |
|
Hi Michael, Sidney’s testing has revealed that the error is on the validation part of the IPN:
The validation is likely failing because of the escaped single quotes in the item_name field. If you remove the single quotes from the ticket name it will likely validate. |
|
|
I just got it to work on your dev site by changing lines 368-371 of EE_Paypal_Standard.class.php from
to:
|
Woo HOO! I was able to successfully register someone. Got the right feedback email, and payment status is “approved” without my intervention. So, what’s next? The event I was working on was last Saturday & I don’t have another event for a while, so I’m good with waiting for a formal release, presuming that’s your plan. If need be, I could use the patched EE_Paypal_Standard.class.php but I’d prefer to stick with formal releases. Thanks! Even with this I’m telling people you have a great product. |
|
Hi Michael, I can recommend sticking with the release (no patch) and if you start a new event before the next update is released, please be sure to not include single quotes/apostrophes in the ticket name + event name. |
|
Hi Michael, |
|
The support post ‘How is PayPal IPN supposed to work in EE4?’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.