Support

Home Forums Event Espresso Premium Checkout Does not complete causing a Server 504 Gateway timeout

Checkout Does not complete causing a Server 504 Gateway timeout

Posted: April 4, 2019 at 3:53 pm

Viewing 17 reply threads


cperez35

April 4, 2019 at 3:53 pm

When i try to checkout from purchasing any class on my site the server timesout. An example would be: https://academyflorida.com/events/mos-excel-2016-database-features-and-pivottables-boot-camp-19/
1) add a quantity
2) add to event cart
3) proceed to payment options
4) I fill in my CC information and click on proceed to finalize registration and the site just hangs until I eventually, get a Server 504 Timeout message. I’m using Quickbooks payments and have a successful connection to my online QuickBooks account. I have contacted my web host “Kinsta” and they say it appears to be a plugin issue. Here are some of the pics and information they have sent to me.


cperez35

April 4, 2019 at 4:03 pm

Links to pics https://1drv.ms/f/s!AhKXSEeNQ3v8gr4DU33Dz84yBdcRcg


Josh

  • Support Staff

April 4, 2019 at 4:12 pm

Hi,

The 504 timeout after submitting the payment information to Quickbooks sounds like a communication issue between your site and Quickbooks. If you go to Event Espresso > Payment Methods > Logs, then check the last few log entries, are there any error codes from Quickbooks included there?


cperez35

April 5, 2019 at 9:57 am

Yes I do see the following error under payment details in the gateway response box: QuickBooks Card Authorization/Capture Error: PMT-4002 number is required.

I added a screenshot to the onedrive link above


Tony

  • Support Staff

April 5, 2019 at 11:15 am

Hi there,

The word doc containing a screenshot isn’t actually of the payment logs, that’s a screenshot of the EE Transaction, which contains a ‘Gateway Response’ field showing an error, but within the payment method logs it should have more details.

Note use please a .JPG file rather than an image within a doc, it compresses the image. You can open Paint, paste and save as JPG (or PNG) then add that file directly.

Go to Event Espresso -> Payment methods -> Logs.

In the list, you’ll find log entries for each payment attempted on your site and every single payment can create multiple log entries so you may have many entries.

Find the log entries for 8829 (the Transaction included in the .doc file) and then click on the log entry ID’s on the left of the table, not the TXN Id on the right. You’ll then have more information for each of the requests sent to and received from Quickbooks.

Does that show any additional details on that error?


cperez35

April 5, 2019 at 11:51 am

I just updated the link with the screenshots (JPEGS) or the QuickBooks errors I’m receiving


Tony

  • Support Staff

April 5, 2019 at 12:14 pm

If you temporarily deactivate the WPForms plugin on your site, does it work then?


cperez35

April 5, 2019 at 3:42 pm

Yes, once I deactivate the WPForms plugin the transaction does go through but the site freezes. It freezes at the registration checkout page. It eventually says the registration did not go through and I have to refresh and start again. When I refresh the page that’s when the Thank You page appears with the confirmation. It takes a long time to get the message to refresh. I do get the event payment details email which verifies the transaction is complete and Quickbooks does show the transaction is being processed. What do you think is causing request to refresh in order to finalize the transaction on the front end?


Tony

  • Support Staff

April 8, 2019 at 7:37 am

Yes, once I deactivate the WPForms plugin the transaction does go through but the site freezes.

Ok, the reason it fails with WPForms enabled is it is overriding some JS that EE uses and causing a JS error on the page, this then prevents some other JS from running that creates a payment token with Quickbooks.

So PMT-4002 number is required. is being thrown because no token was generated (because the JS couldn’t run) so then the request used to generate a payment is looking for a card number as no token was passed, but that’s not how our integration works, so it throws the above error.

It freezes at the registration checkout page. It eventually says the registration did not go through and I have to refresh and start again.

Have you checked your server error logs around the time this error is thrown?

It sounds like your request is now being sent to Quickbooks and a response is received (as the payment is complete) but then a fatal error is being thrown so the page stops and eventually the ajax request times out and tells you to refresh.

What do you think is causing request to refresh in order to finalize the transaction on the front end?

From the above, it sounds like the transactions is correctly updating, its not the refresh that does it, but something is preventing the redirect that sends you to the thank you page to view the updated transaction.

If theres nothing in the error logs, add this snippet to your sites wp-config.php file:

https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug

The retest, that should log any errors to /wp-content/debug.log so we can take a look.


cperez35

April 8, 2019 at 11:42 am

Ok, we have added the snippet to our WP-config.php file. We retested the purchase of a class and the same thing happened. The transaction went through on the backend but froze at the registration checkout. I had to refresh the page to get the Thank You / Confirmation page.


Tony

  • Support Staff

April 9, 2019 at 7:28 am

Ok, I’m not getting any errors in the log file.

Can you check how your messages are set to send please:

Event Espresso -> Messages -> Settings

What is ‘Generate and send all messages:’ set to?

If you temporarily disable the emails within EE (same settings page just click the green toggle icon on the email section, that will disable the emails). Then run another test, does it work then?


cperez35

April 10, 2019 at 1:11 pm

Generate and send all messages is set to “on a separate request” When I disabled the emails within EE the transaction gets approved and processes without any issues. So how do I get the email messages to work again without destroying the processing of a registration?


Tony

  • Support Staff

April 11, 2019 at 6:30 am

Ok, so that usually means there’s an issue with sending email from your server (not from EE itself).

When you go to Event Espresso -> Messages -> Message Activity

How many email do you have queued for generating and queued for sending?

Are you using any SMTP plugins etc to send emails or just using whatever you server is setup to use?

We recommend using a transaction email service to send your email, in short it means WordPress will pass any emails generated by it to the mail server of whichever provider you chose rather than from your current server, this usually fixes the majority of email issues.

We have some details here:

https://eventespresso.com/wiki/postmark-app-mandrill-transactional-email-handling-services/


cperez35

April 17, 2019 at 3:53 pm

Installed Sendgrid plugin and sent test message and everything worked. When I enable email messages in EE the site still freezes during registration checkout. I still need to refresh in order to see Thank You page. How do i get past this issue ?


Tony

  • Support Staff

April 18, 2019 at 3:45 pm

When you go to Event Espresso -> Messages -> Message Activity

How many emails do you have queued for generating and queued for sending?


cperez35

April 24, 2019 at 12:35 pm

I have zero emails queued for generating and zero emails queued for sending. At this point I think it would be best if I get professional assistance from EE as I have spent hours trying to get this plugin to function correctly on my site. Can EE support get this plugin to work on my site ?


cperez35

April 24, 2019 at 12:36 pm

I updated link with PIC https://1drv.ms/f/s!AhKXSEeNQ3v8gr4DU33Dz84yBdcRcg


Josh

  • Support Staff

April 24, 2019 at 12:45 pm

Hi,

If you’re looking to get priority support that is available with the purchase of a priority support token. Normally professional EE support is provided here in the forums, as that’s what’s included with the support license.

Looking over this topic, I do wonder if there’s an issue with loopbacks on this server that affects the process when the emails are triggered.

So if you were to buy a support token, here’s what we’d check next:

We’d install the Health Check plugin, then go to its dashboard page and check to see if scheduled tasks and/or loopbacks are working as expected on the server. If they’re not working, then one possible solution would be to add the following to the wp-config.php file:
define( 'ALTERNATE_WP_CRON', true );

See also:
https://codex.wordpress.org/Editing_wp-config.php#Alternative_Cron

Viewing 17 reply threads

The support post ‘Checkout Does not complete causing a Server 504 Gateway timeout’ 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.

Event Espresso