#komal-shrestha_code

1 messages Β· Page 1 of 1 (latest)

faint geodeBOT
#

πŸ‘‹ 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/1375014830066630657

πŸ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

gentle plinth
pure hornet
#

I just found this

const { confirmationToken } = await stripe.createConfirmationToken({
elements,
});

const method =
  confirmationToken?.payment_method_preview.card?.brand || paymentMethod;

is this fine to use?

faint geodeBOT
gentle plinth
#

Yup that's fine too

pure hornet
#

@gentle plinth

<PaymentElement
onChange={handlePaymentMethod}
options={{
layout: {
type: 'accordion',
defaultCollapsed: true,
},
}}
/>

i have defaultCollapsed set to true. But after some time "Klarna" accordion is opened automatically. I noticed same issue "https://docs.stripe.com/payments/payment-element" here as well it opens "Affirm" automatically.

uncut mirage
#

Hi, taking over as my teammate needs to step away. Let me catch up.

pure hornet
#

sure. thanks

uncut mirage
#

What does 'But after some time "Klarna" accordion is opened automatically. I noticed same issue "https://docs.stripe.com/payments/payment-element" here as well it opens "Affirm" automatically' mean? You initially asked ' card brand from Payment Element ' and I'm unsure what you're trying to accomplish here. Are you able to reword your ask please?

pure hornet
#

This is the accordion of "Klarna(payment method) that opens up automatically

uncut mirage
#

What do you want to see instead?

pure hornet
#

i want accordion to be in collasped state unless clicked

uncut mirage
#

This is what I see

pure hornet
#

I am not getting the expected behaviour on my end

uncut mirage
#

I can't reproduce what you're seeing, can you share your country location so I can try?

faint geodeBOT
pure hornet
#

Nepal

floral iron
#

Hey! Taking over for my colleague. Let me catch up.

pure hornet
#

sure

floral iron
pure hornet
#

sure

floral iron
#

Thanks

pure hornet
#

If you check the video you can see the Klarna payment method opened automatically

floral iron
#

And it's always Klarna that auto-expand or each time randomly a new PaymentMethod got expanded ?

#

Could you please share another screen recording where you reload the page and wiat ?

pure hornet
#

In this docs its random, but in my local i only have card so always klarna opens

floral iron
pure hornet
floral iron
#

Thanks for sharing all these details, let me narrow this internally further. Please give me couple of minutes.

pure hornet
#

Sure. Will wait on the uodate.

floral iron
#

Ok, This issue will require an in-depth investigation from our team in order to figure out the root cause. Can we ask that you write in to us via https://support.stripe.com/contact, providing as much detail and context as possible (you can also reference this thread).

faint geodeBOT
#

Hello @pure hornet, we have sent you a direct message, please check it at https://discord.com/channels/@me/1375046950713294878

  • πŸ”—The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
floral iron
#

If possible to share the Element Session logs too (in the network tab, reference to endpoints that include session)

faint geodeBOT
pure hornet
#

This is the issue from Stripe's side??

outer heart
#

We're not sure – we're going to need to investigate further to figure out what's going on. The link you just got in a DM will enable that