#domica_code

1 messages · Page 1 of 1 (latest)

keen owlBOT
#

👋 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/1331397056220368996

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

plush bone
#

Hi there

meager radish
#

I have, and I seem a bit tired as I haven't checked the logs. I haven't provided the client secret to the <Elements />. It seems I have to create a payment intent to get the client secret. Didn't have to do that with our previous logic so I have some adjustments to do

plush bone
#

You shouldn't need the client secret to render the ExpressCheckoutElement

meager radish
#
      or use the nullableSessionSelector() instead.```
Only error I get in my logs. From `elements-inner-express-checkout-1565c0b1264e6a8aadc1c1b58a0aa5f4.js:1 Error: Unable to select session. Make sure Elements is initialized with clientSecret`

Looks to be that component.
#

Though I am testing on localhost running https, I did register my prod domain. Can you even test locally?

keen owlBOT
urban sandal
#

Hello! I'm taking over and catching up...

#

Can you share the code you're using to create the Stripe Elements instance?

#

It sounds like you might not be passing in the required properties there, like mode, amount, etc.

meager radish
#

Hi, this wrapper?

    () => loadStripe(stripePublicKey),
    [stripePublicKey]
  );

  return (
    <>
      <h1 className='page-title'>Secure Checkout</h1>
      <QueryClientProvider client={queryClient}>
        <Elements stripe={stripePromise}>{children}</Elements>
      </QueryClientProvider>
    </>
  );```
urban sandal
meager radish
#

Yeah I think that's there. Has the option to add it in. Adding that in gives an error No valid payment method types for this configuration

#

I'm sure I have Google Pay enabled for my default configuration, just checked

#

The full error is "No valid payment method types for this configuration. Please ensure that you have activated payment methods compatible with your chosen currency in your dashboard (https://dashboard.stripe.com/settings/payment_methods) and that the `amount` (10) is not lower than the `currency` (usd) minimum: https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts."

#

Oh I didn't see the full error in the logs... my bad I think it's the minimum

urban sandal
#

Your amount is too low.

#

Yeah, 10¢ is below the minimum amount.

meager radish
#

Thank you. One more question before you leave if you don't mind, what is the recommended way to test this? Same as the Stripe test cards?

urban sandal
#

What is "this" specifically?

meager radish
#

Google and apple pay

urban sandal
#

You can use real, live cards in your Google Pay and Apple Pay wallets to test in test mode.

#

They won't be charged as long as you're in test mode.

meager radish
#

Awesome, thank you!