Stripe and The PaymentIntent requires a payment method

By: Stacey Kohl | Asked: 06/04/2024
ForumsCategory: General questionsStripe and The PaymentIntent requires a payment method
Stacey Kohl asked 6 months ago
I have created a form connected to Stripe to process payments for several registration items. The form works sporadically and I can't figure out what is causing the glitches. Sometimes it processes fine and other times I get a "The PaymentIntent requires a payment method" error in Stripe. The person attempting to process payment gets an error that says "Fix errors below" but no errors are indicated.  You can see the entire registration process here: https://www.episcopalct.org/annual-convention-registration/  The form has a repeater field that builds the first registration "product." The second "product" is an embedded form with a "choose your price" ticket option. The next part of the form totals these two together. It then has the option to add a coupon code which reduces ONLY the price of the registration, not the "choose your own price" tickets. From there, its supposed to checkout with Stripe via the Payment function. I have ensured the "collect payments" is setup and is linked to a field that calculates the "price after discount," so even if you don't enter a discount code, the total is accurate. It seems like the form will work once or twice, then fritz out and refuse to work for no discernable reason. HELP!!!!!
2 Answers
Rob LeVineRob LeVine answered 6 months ago
I don't know anything about Stripe or its integration with Formidable, however, I suggest you look closely at the cause of the error message that doesn't indicate which field it is. Sometimes that can mean a field is hidden, but not hidden correctly or at least not correctly in Formidable's eyes (e.g., hidden by javascript other than Formidable's). You can also use frm_validate_field_entry to figure out which field is throwing an error. Also, I highly recommend coming up with a 100% reproducible case as that will help you figure out the steps that will help you figure out the cause.
Michael ClarkMichael Clark answered 6 months ago

Hi, @Stacy Hummel. Recently ran into an intermittent Stipe issue that I was able to resolve in two ways; changing how the Stripe add-on processes one-time payments, and building the entire shopping card with repeaters:

  • Set the Stripe add-on to process payments after entry is created:
    Global Settings -> Stripe -> Process One-time Payments<
  • Products re-built with repeaters, not embedded forms
  • Subtotal fields outside of each repeater to sum each repeater
  • Grand Total field at the end sums the the subtotal fields
  • Grand total field is used in the Stripe action
  • General form setting: disable honey pot/js "security"
  • If you need to use values from another form, rather than embedding, maybe try setting the default value of the product fields using the frm-field-value field_id=x entry=x] method?

I also switched to the Cloudflare captcha add-on. The intermittent nature of the problem, for me, seemed to come from a combination of things, and was most resolved by changing the processing of single payments and changing up how I built each product and did the grand total calculations (for instance, shirts with different styles and sizes where the price was different based on the size, so each line had to be calculated as style and size * quantity; calc price in each row; sum that column in the external subtotal field). Make sure your wp environment is optimized, too. Along with beefing up compute power, tweaking the environment variables also helped deal with intermittent lags in actions processing. Had to set my pages to private, put the Stripe add-on into test mode and dial it in before turning back live. Twas a pain, but it worked. Hope this helps.

Michael ClarkMichael Clark replied 6 months ago

<p>Ugh. Between the typos and the horrible formatting, I hope this is at least somewhat intelligible. 🙂 </p>

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right