#arjun_intent-integration

1 messages ยท Page 1 of 1 (latest)

gentle jungleBOT
#

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

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

regal pondBOT
frosty lark
#

hello

gleaming wolf
#

Hi there ๐Ÿ‘‹ sorry, but I'm not sure I'm grasping what you're trying to ask. Can you elaborate more on what you're trying to accomplish?

frosty lark
#

in new code when i click on Continue to payment always it redirect into payment failure url

#

const { error: paymentError } = await stripe.confirmPayment
It throw me catch block why this happen??

#

i have payment flow

gleaming wolf
#

Sorry for the delay, the server is quite busy right now. Working on reviewing what you shared.

#

What is the error that is being caught?

frosty lark
#

CheckoutForm.js:554 Error creating token: IntegrationError: Invalid value for stripe.confirmPayment(): elements should have a mounted Payment Element or Express Checkout Element.

gentle jungleBOT
gleaming wolf
#

That makes it sound like the elements variable you pass to confirmPayment is empty or the Payment Element it holds isn't mounted.

Is the button you're referring to clicking one that is on the page of your second screenshot?

Since this is React, my suspicion is that some state is changing which is causing your component which renders the Payment Element to be refreshed, removing the Payment Element that you had mounted.

frosty lark
#

when i click on continue to payment btn whole thing are submited with client profile details with promocode based payment update

gleaming wolf
#

Okay, then I'd suggest adding logging to your code to figure out when the Payment Element is being unmounted, or when the component rendering it is being re-rendered. It sounds like something in your code is causing the Payment Element to be destroyed before it's used.

frosty lark
#

how can i will check it with help of console??

mental current
#

๐Ÿ‘‹ stepping in here

#

Are you trying to use the intent-first flow here? Where you create your PaymentIntent before you render Payment Element and pass that to your Elements Component?

#

Or the deferred-intent flow where you create your PaymentIntent upon your customer clicking pay?

frosty lark
#

I want deferred-intent flow please give doc for reference

frosty lark
#

now as per my requierment i want
Are you trying to use the intent-first flow here? Where you create your PaymentIntent before you render Payment Element and pass that to your Elements Component?

#

for that pls refer a doc

gentle jungleBOT
amber moss
#

arjun_intent-integration

frosty lark
#

pls review my given code and give me suggestion where i have to make a mistake for implementation payment element if i want to achieve same functionality which was present in my old code with use of stripe cardElement

amber moss
#

@frosty lark that's not how we work. We're not freelancers you hire to fix your code. We're happy to help answer clear questions that you have but we're not your debuggers

frosty lark
#

sorry, respected member i does not meaning that

amber moss
#

I'm happy to help but I can't debug hundreds of lines of code you wrote/control The first step is to understand what exact integration path you are using and what is not working

frosty lark
#

my intent to successfully implemetation of stripe in my website

amber moss
#

I'm sorry but this doesn't really give me anything. I know you're trying to make things work

#

My advice is to pause and try to implement PaymentElement on its own first. Not in your entire complex React application that will be impossible to debug

frosty lark
#

ok i understand i work as per you suggest

#

in paymentElement always i want to make payment intent for displaying paymentElement??

amber moss
#

It's a choice, that's exactly what my colleague was explaining earlier

frosty lark
#

boc clientsecret key is required for paymentElement render which is i got after a calling backend server payment intent creation api

amber moss
#

no it's not required, it's optional depending on your integration path. So you are supposed to choose how you want to integrate first and then follow along that exact doc end to end

frosty lark
#

ok first i go through given refference

#

Than client secret key is must required for displaying paymentElement in my ui??

amber moss
#

I don't know what that mean "given reference".
I'm sorry we explained 3 times now that this is optional

frosty lark
#

ok i underStand but when i render payment element with getting clientSecret key in clientside it do not display payment element ui
So my question is that when i goes to checkout page without createing payment intent and client secret key
it is possible to display stripe paymentElement??

amber moss
#

I'm sorry you say you understand but you ask the same question over and over ๐Ÿ˜ฆ

frosty lark
amber moss
#

the error message seems extremely clear. Have you read it? And did you read the docs associated with it?

frosty lark
#

yes but in doc says that byDefault set card element as a default element than why this error is occured?

amber moss
#

the amount is 1. That means 1 cent. The docs linked clearly explain there's a minimum amount we support of 50 cents. Sorry I'm pushing because you do need to take a few minutes to read the docs we link you to