#TomConnolly-payments
1 messages · Page 1 of 1 (latest)
Hello! Feel free to continue in this thread
Pasting your most recent message here @mint glade
stripe.redirectToCheckout({
sessionId: '<%= @session.id %>'
}).then (function (result) {
console.log("hitting the then with result of ", result);
});
The error I'm getting is "unknown format"
Do you know where that error is being thrown? Is it when you try to redirect to checkout?
Yes. When I hit the "buy now" button
I'm using the rails <%= button_to %> helper
The log actually points to the line in the controller: format.js
I'm not a rails developer so I can't offer a ton of expertise on that front, but I'd recommend going through some preliminary steps to narrow down the root cause and confirm whether this is an issue with Stripe or more on the Rails end
From the Stripe end, you'd want to check that the Checkout session is being created correctly and is being sent back to your frontend
The session that results from my submission is a payment intent. Are there any Rails devs on tonight?
What do you mean it's a paymetn intent? Are you not creating a Checkout Session?
I find a payment intent created on the dashboard, saying it needs payment (not sure of the exact wording)
But you are creating a Checkout Session, right?
I'm guessing that the first part of creating a checkout session is interactive (In fact I update my user in the first "part." Yes, I am creating a Stripe::Checkout::Session
I'm communicating with stripe OK, but need to figure out why the payment form isn't displayed.
If you're sure that the Checkout Session is being created properly and is being sent back to your frontend then you need to walk through/debug your front-end code. from what you've described, the "unknown format" error is not one of our errors - it would be coming from railss
Is there an actual sample of a Rails app that uses Checkout?
I'm not suggesting it's a Stripe error. It may well be, indeed probably is, my error. I just can't find it.
I don't know of any that we provide, but you can try searching around and see what you find!
Thanks