This post will help to troubleshoot a few common issues that can crop up at checkout when using Paid Memberships Pro with Stripe. Specifically, these troubleshooting tips will help if you receive one of the following errors at checkout:

  • There are JavaScript errors on the page. Please contact the webmaster.
  • Please complete all required fields. (Even though you did fill out all fields.)
  • Class 'Stripe\PaymentMethod' not found


Why is this happening?

In almost all cases, what is happening is that the Stripe JavaScript code is unable to “talk” through the Stripe API to validate the user’s credit card and process the checkout.

The reason you sometimes get the “complete all required fields” error is that we weren’t able to catch the real error with the Stripe integration and so tried to submit the form without the updated credit card token that Paid Memberships Pro is expecting for Stripe checkouts. So to PMPro, it looks like some fields were left empty. But really JavaScript broke down and so those hidden fields were never updated.

In some other cases, another plugin is loading a different version of the Stripe API library before Paid Memberships Pro does. To avoid issues, PMPro will try to use the version of the Stripe API that is already loaded, but if that version doesn’t support a feature that PMPro is using, it will throw an error.

So, how can you fix this? Here are the things to look into to fix this issue.


  1. Make sure that your payment settings are correct.

    In particular, make sure that the “secret key” and “publishable key” don’t have any extra whitespace or strange characters in front or back. And make sure that the “gateway environment” is set to “Live/Production” unless you are using a Stripe test account.


  2. Make sure that other plugins or themes are not causing JavaScript issues at checkout.

    You can use the Chrome Debug Bar in Google Chrome to look for JavaScript errors. In Chrome, click Ctrl+Shift+J to bring up the JavaScript console. Errors will show up in red. The errors might give you a clue as to which plugin, theme, or file is causing the issue. There are similar tools for other browsers, including Firebug for Firefox and Developer Tools for IE.


  3. Make sure all files are loading over HTTPS/SSL properly.

    If your checkout page is loaded over HTTPS but tries to load a source file over HTTP, your browser may stop that file from loading. If it’s a JavaScript file that a plugin is expecting to be loaded, errors can occur which will keep Stripe from working. You can find these errors using the Chrome JavaScript console (Ctrl+Shift+J).

    Enabling the “Extra HTTPS URL Filter” option on the payment settings will clean up some of these issues. If not, you can use the WordPress HTTPS plugin, just be sure to set the “Force SSL” setting in the PMPro payment settings to “No” and to check the “force SSL” option on the PMPro checkout and update billing pages so that plugin knows to control HTTPs for those pages.

    If you are still having issues, you sometimes will have to edit the plugin or theme to use https:// in the URLs being loaded or wrap URLs using the site_url() function in WordPress.

    Read more about SSL


  4. Make sure you don’t have conflicting PMPro Add Ons or gists.

    In particular the “complete all required fields” error can come up if say you are using the Require Name and Address for Free Levels Add On, but have the “Show Billing Address” setting set to “No” for Stripe.

    The setting will hide the address field, but the addon will still be expecting it. (Note: We did release version .3 of this addon to address a post PMPro v1.8 issue when using this addon with PayPal. Be sure to upgrade if you are using this addon.)

    Another situation that can come up is if you have a field added using the Register Helper Add On that is added to the “after_password” area or another area that isn’t present when a logged in user is checking out. The field won’t be shown at checkout, but the code will still “require” it. You can make sure your required fields are added in a way that they will always be visible at checkout (use the checkout_boxes area) or add code like this to any field that shouldn’t be required for existing members logged in.


  5. Make sure other plugins aren’t loading an older version of the Stripe API library.

    If another plugin has loaded a version of the Stripe API library that doesn’t support the features PMPro is trying to use, you may get an error about a missing class or method and checkouts won’t work.

    To debug this, you can update the loadStripeLibrary method of the Stripe Gateway Class in PMPro to output the location of the file that is already loading the Stripe library. Here is an alternative version of that method to drop in temporarily:

    Once you know what other plugin is causing the conflict, you can disable it if it’s not needed or attempt to fix the conflict. If there is an update for the other plugin, that might fix the issue. If it still persists, you need to tell the other plugin to NOT load their version of the library on the PMPro checkout page. The code for this would be different for every plugin, but here is a gist that simply tells PMPro to load the Stripe API Library as early as possible. This will usually fix this issue. In some cases, it will also break the other plugin that is using Stripe and you will need to debug and fix that.


Need more help?

If you are still having trouble, we can help you in our member forums. Sign up for a PMPro Membership, then post a new thread to the member forums stating the issue.

This entry was posted by Jason Coleman in Troubleshooting and tagged . Bookmark the permalink. Last updated: October 9, 2019. Titled Troubleshooting Issues at Checkout When Using Stripe

Comments (29)

Hi Jason, thanks for posting this. I’m sure I’m not the only reason this article came out, but I just wanted to say how awesome it is to see a company so intent on listening to and supporting their clients as well as you are. I’ve only been a member for a short time, but I am very impressed. Keep up the great work!
-Jim

Jim, thanks for this reply. It helps to get positive feedback. And this was a common issue (slightly more common due to some things in recent releases). We try to post these troubleshooting guides to help people get fixes quicker.

Hi Jason, just picked up a small typo. “This post will help to troubleshoot a few common issues that can crop up at checkout when using Paid Memberships Pro with Skype.” I think you mean “Stripe”, not “Skype”… Feel free to delete this comment.

I sent in a email regarding an error that is now appearing for customers (And me) I don’t want to post it here as it contains sensitive information. Please take a look regarding the stripe error. It’s only started very recently (The last few days) Stripe was contacted and everything is fine on their side as far as keys and api updates for my account. They suggested contact you.

I’ve been looking for why I get a 404 error when I click on the button to select a membership level. It’s supposed to go to the checkout page but all I get is the 404 page not found error. I’ve been trying to see if it’s a problem with PMPro or if maybe I didn’t link PMPro to Stripe correctly. Can someone point me to a resource that addresses this issue or maybe let me know what I’m missing, if you happen to know. Thanks

Hi Jason,

Great plugin – did you realize that you mentioned Skype … only joking 🙂

I’m having a problem setting up Stripe on my account. When a person pays and then should be redirected to their payment success page, it bumps them to the homepage instead. They are also not logged in – so the person doesn’t know if they’ve paid and give up… However, their account was set up and payment taken; it’s just the redirect back that seems to be causing the error.

Please can you help?

Thanks a million.

Nick

“Make sure that other plugins or themes are not causing JavaScript issues at checkout.”

What would cause issues with jQuery? I’m getting tons of “jQuery is not defined” errors, but not clue as to what could be causing it.

Any ideas?

Look for the first JS error in the list. Any JS syntax/etc error could break JS for the rest of the page load. Another possibility is that jQuery is not being loaded. Check for a jquery.js or jquery.min.js line when you view source. Maybe your theme is not properly running wp_head or some theme or plugin unenqueued jQuery for some reason.

I’ve noticed that Stripe does not state the Membership Plan on the customer transaction. When Stripe payments come through it should tell you what plan they got. Why does it not put the plan on the transaction? How can we have the plan show up so we know what they ordered?

Since I upgraded paid membership pro, I keep getting this error and i cannot figure it out it.

Fatal error: Class ‘Stripe\Customer’ not found in /wp-content/plugins/paid-memberships-pro/classes/gateways/class.pmprogateway_stripe.php on line 1369

Hi Jason,
Just trying to setup PMP with Stipe, but get an error that I can’t fix. “Error creating plan with Stripe: You passed an empty string for ‘interval’.” I noticed that if I give a recurring payment and select “years” it is not taking anything but days. And in the list the 1 “day” is not shown.
If I run it without recurring, it is working. Without any error.
However – in my Account, I see 4 paid memberships. @ with a life CC API Code but not sure yet, if it is deducted
Thanks much !!
Axel

Hi,

Had this issue and the scripts to footer plugin.

Go to billing page > Screen options > Scripts to Footer > turn off script for this page.

Perfect now.

I am facing the issue “Please complete all required fields.”
Even all fields are completed. The plugin was working fine from last few months. Please help with this. I am using Stripe on checkout.

Hi @amaryash,

Would you kindly please reach out to us via the contact form on our Contact Us page so that we can discuss this issue further with you? Thank you.

Leave a Reply

For faster support related to issues on your specific site please open a ticket in our members support area.

Your email address will not be published. Required fields are marked *