We've moved discussions to Discord

Testing paid plans with Stripe and button just spins "Processing" after successful api post

Joe Tebaldi
Chris Oliver I've been building an app using JSP for about 7 months now and just got around to adding a payment plan option with Stripe.

Following along with the "Building a SaaS Content product..." video, I added Stripe through the JS config admin, updated the development credentials with the API key (a "test data" api key), created a new plan through the JS admin and tied it to the Stripe product ID (also a "test data" product).

Everything worked to that point and I'm able to see the plan when I navigate to /pricing. However when I enter the test card number (all the 42s) and name and click Subscribe, it just spins on Processing. I don't see anything happening in the rails app server and no javascript errors in the console.

I saw yours and Marcus Schappi post back in June about creating a plan through the CLI and being sure to grab the proper ID. I tried using both the Stripe-generated "pricing ID" for the product created through Stripe's dashboard and the new ID created when I added the plan through the CLI - both result in the same perpetual "Processing" spin.

I looked on the Stripe side, and it's actually showing the post request as successful (POST /v1/payment_methods 200) - so I'm assuming it's something on the rails side?

I've been at it for a few hours, testing, retesting, resetting, etc. but I'm all out of ideas. Any thought on what to try next?
Joe Tebaldi
So I continued at it and deployed to a staging environment where I had a dev friend able to successfully be redirected to the dashboard twice but then see the issue I have.

Looks like it might actually be a Stripe issue? https://github.com/stripe/react-stripe-elements/issues/98#issuecomment-630783889
Joe Tebaldi
Update 2: So it looks like everything functions as expected on Firefox (and only Firefox). However, if you have a CC saved to your account, you can use the "Subscribe" button (which calls the same stimulus action click->stripe#submit ) in any browser and it functions as expected - ie. redirects to the dashboard.

In addition, in the inspector console there's actually an error message - also referenced in the stripe forums - that reads Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://js.stripe.com’) does not match the recipient window’s origin only when it works. No js error when the dom loads, and I know it's not going to work.

Still haven't figured it out but this is my one task to start actually collecting some $$ for the app I've been hosting for free... so hopefully we can figure this one out soon!
John Quarto-vonTivadar
Joe, ever get it to work?
Notifications
You’re not receiving notifications from this thread.