#rhy_checkout-testing
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1220730505042067539
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- rhy_api, 4 days ago, 25 messages
The api key shouldn't have anything to do with it
I am unable to even click to open the checkout link
What does this mean?
Do you have your own button that creates a session?
nothing happens when I click the link
How did you integrate?
yes
Have you checked the logs
Have you checked the logs
1 sec
Checking your server logs and browser console logs should be the first debugging step
Do you have a link to the site where I can repro?
that's a bit concerning, let me take a look
sec gotta redeploy
can you try this
Hate your boss? We do too, get them fired today! The 925 Boots for your everyday 9 to 5 worker
Same exact problem
Hard for me to help if I can't load the site to repro
true, could I maybe share a video repo the issue?
Sure but would be easiest if I could play with the site myself and look at browser console/network requests as I do it
gimme a sec lemme look into it I think I know the issue
rhy_checkout-testing
Hate your boss? We do too, get them fired today! The 925 Boots for your everyday 9 to 5 worker
Hi there ๐ taking over as my teammate needed to step away. Taking a look.
thanks
Hm, I see you have a button there, but I'm not readily spotting a submit action on either it or the form that it's included in.
action seems to be blank in the rendered page:
let me take a look
could I also ask if the site loaded for you on the first try? and how was the delay of opening the site
It loaded, I didn't pay attention to the loading time as I'm juggling multiple threads here.
noted, let me take a look
I'm also not exactly sure how the framework you're using is expected to trigger form submit actions. It's possible it's using an eventlistener somewhere that I overlooked.
in localhost testing it shows this instead, might there be a reason why the action turns blank once deployed?
I suspect there is if it's getting blanked out during deployment, but I don't know what that could be. But that action also doesn't look like it would trigger anything, it looks like it would throw an error if it's used. So I suspect the framework you're using is using a different approach to trigger the form submission action.
hmm thanks for the input; In the cart page, it is wrapped in a form action
<form action={createCheckoutSession}>
which contains this
<div className='button-wrapper'>
<button
type="submit"
role="link">
<span className='buy-button-checkout' target='_blank'> BUY NOW </span>
</button>
</div>
The form action triggers this component which is under /actions/stripe.js
export async function createCheckoutSession(data) {
const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);
const checkoutSession =
await stripe.checkout.sessions.create({
Can you add a log line to that function to see if it's even being hit? I see a network request being made when I click on "Buy Now", but it seems to reserve the page I'm on already.