#Demoox

1 messages ยท Page 1 of 1 (latest)

obtuse treeBOT
tulip shoal
#

Hi ๐Ÿ‘‹

How are you mounting the payment element?

midnight cape
#

Hi,

Only with a div, like this:
<div id="payment-element" class="col-sm-6 mb-3"></div>

I followed the documentation but I don't see the problem

tender bison
#

๐Ÿ‘‹ stepping in as Snufkin needs to step away

#

Are you seeing this locally? Is there somewhere I can reproduce that warning?

midnight cape
tender bison
#

Thanks looking

#

Hmm I'm not seeing Payment Element

#

I just see a pre-filled 3184 card?

#

Can you give me exact steps?

midnight cape
#

Yes you have to click on it and the error will appear

tender bison
#

Click on what?

midnight cape
#

submit button

tender bison
#

Hmm okay I see the error warning but I don't see Payment Element? I just see an "Authenticate purchase" button? Is this expected? The warning does indicate that your div also has children which can affect the layout and performance. But that shouldn't really stop Payment Element from rendering and is likely a red-herring

#

I see other errors in Console about failing to retrieve dependencies

#

Let's back up though

#

Why would Payment Element be rendering at this point when you are in an Authenticate Purchase step?

midnight cape
#

You must also click on authenticate the purchase, I am sorry for my lack of details.

Then the payment-element will be displayed correctly, but with this small error on the console.

Is it unimportant?

#

ahh sorry !!!

#

wait

#

I got the wrong test card, added the new one...sorry

#

you can retest

tender bison
#

Thanks looking

#

Hmm okay

#

I don't see any children

#

Do you have any hidden divs or anything ?

midnight cape
#

Absolutely none, I made sure to delete the comments which could possibly be a problem as I have seen on posts from people encountering this error, but it still persists.

If you think it's not a problem, maybe I should just ignore it, right?

tender bison
#

Checking

#

Okay

#

looks like you are calling mount twice in your JS code

#

So that's triggering the warning

midnight cape
#

Yes I called twice. I'll take it off and see it

tender bison
#

Yep you should only call it once

#

If you have it call mount twice then the second time there will already be children due to the first mount and you'll see that warning

midnight cape
#

Indeed, Bismarck, that was the problem.

The error no longer appears.

Thank you very much for taking the time to help me solve this problem. ๐Ÿ™‚