Support

Home Forums Event Espresso Premium Production Site getting disconnected from Stripe

Production Site getting disconnected from Stripe

Posted: February 8, 2022 at 3:47 pm

Viewing 1 reply thread


make_webmaster

February 8, 2022 at 3:47 pm

We have Stripe connected on a production site and two staging/development sites.

A couple times now we’ve been alerted that our production site has disconnected from Stripe causing us to lose sales for seemingly no reason. In these cases, there is no indication that the Stripe connection has broken until a user tries to checkout and gets an “invalid api key” error. To fix this, we have to disconnect Stripe and then reconnect it and then it works fine again.

Our best guess is that disconnecting one of our staging sites from Stripe to put it into testing mode is breaking the production connection as well. It would be very helpful to have a toggle to go between test and live on Stripe without disconnecting if this is the case.

Another thought is that we sometimes overwrite our staging environment with prod data for testing. Could pulling the prod data to stage be breaking the connection?


Tony

  • Support Staff

February 10, 2022 at 6:24 am

Hi there,

Our best guess is that disconnecting one of our staging sites from Stripe to put it into testing mode is breaking the production connection as well. It would be very helpful to have a toggle to go between test and live on Stripe without disconnecting if this is the case.

That can’t be done as production and staging need different tokens generated and oAuth requires user submission. We can’t simply switch between the two.

Another thought is that we sometimes overwrite our staging environment with prod data for testing. Could pulling the prod data to stage be breaking the connection?

Yes, because the domains won’t match and Stripe may then invalidate the token.

I’m assuming staging is another site and you’re pulling the DB (and likely files) over from live every now and then?

One option we do have is to switch away from the oAuth connection and use API keys, we used this previously and then added the oAuth connection to make it easier for users to connect.

Disconnect from Stipe, then add:

add_filter('FHEE__EE_PMT_Stripe_Onsite__generate_new_settings_form__hide_key_fields', '__return_false');

To the site and it will enable the API key fields in Stripe settings, if using those fields you can ignore the oAuth connection as it will still show ‘disconnected’.

In the Stripe account go to Developers -> API Keys.

Grab the keys and input them into those fields.

Now you can enabled/disable Debug mode at will as there technically is no ‘connection’ and you use the same keys on live and production.

Does that help?

Viewing 1 reply thread

The support post ‘Production Site getting disconnected from Stripe’ 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