#rhy_checkout-testing

1 messages ยท Page 1 of 1 (latest)

dawn creekBOT
#

๐Ÿ‘‹ 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.

red belfryBOT
#

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.

feral stone
#

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?

lethal lintel
#

nothing happens when I click the link

feral stone
#

How did you integrate?

lethal lintel
#

yes

feral stone
#

Have you checked the logs

lethal lintel
#

form submit

#

<form action={createCheckoutSession}>

feral stone
#

Have you checked the logs

lethal lintel
#

1 sec

feral stone
#

Checking your server logs and browser console logs should be the first debugging step

lethal lintel
#

I did take a look before but just double checking

#

nothing there

feral stone
#

Do you have a link to the site where I can repro?

lethal lintel
#

yep the site is

#

925.shoes

feral stone
#

It's just a blank page

#

No button or anything

lethal lintel
#

pardon?

#

let it load for a sec

#

does it show?

#

click on /buy now'

feral stone
#

That's the entire page

lethal lintel
#

ohh hmm

#

is that mobile?

feral stone
#

No

#

desktop chrome

lethal lintel
#

that's a bit concerning, let me take a look

feral stone
#

Check your server logs

#

It's returning a 503 for that image at least

lethal lintel
#

sec gotta redeploy

#

can you try this

feral stone
#

Same exact problem

lethal lintel
#

hmm it hasn't happened before

#

deploying on firebase

feral stone
#

Hard for me to help if I can't load the site to repro

lethal lintel
#

true, could I maybe share a video repo the issue?

feral stone
#

Sure but would be easiest if I could play with the site myself and look at browser console/network requests as I do it

lethal lintel
#

gimme a sec lemme look into it I think I know the issue

dawn creekBOT
#

rhy_checkout-testing

lethal lintel
thorn swallow
#

Hi there ๐Ÿ‘‹ taking over as my teammate needed to step away. Taking a look.

lethal lintel
#

thanks

thorn swallow
#

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:

lethal lintel
#

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

thorn swallow
#

It loaded, I didn't pay attention to the loading time as I'm juggling multiple threads here.

lethal lintel
#

noted, let me take a look

thorn swallow
#

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.

lethal lintel
thorn swallow
#

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.

lethal lintel
# thorn swallow I suspect there is if it's getting blanked out during deployment, but I don't kn...

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({
thorn swallow
#

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.