#CasuallyCaffeinated

1 messages ยท Page 1 of 1 (latest)

junior gyroBOT
candid laurel
#

Hello ๐Ÿ‘‹
The error is likely thrown by your confirmxxxPayment function as it is unable to find the element to pull the payment method details from.
Can you share you code that you're using for this?

granite kestrel
#

Hello! Sure thing would you like the whole component? Or just the Stripe functions being called?

candid laurel
#

Probably the whole component or if you have an interactive example on either repl.it or glitch that'd be more than helpful ๐Ÿ™‚

granite kestrel
#

I don't have an interactive example sadly, I'll see about creating one, but in the meantime, here's the entire component

#

Actually, here

#

Try to see if you can see this

#

Discord wouldn't let me post the either code block is a readable fashion

ruby hemlock
#

hanzo has to step away but I can check it out.

granite kestrel
#

Cool, thanks

ruby hemlock
#

I am a bit unclear on what change caused this behavior. When did you start seeing this?

granite kestrel
#

I am not sure what could've changed honestly. The only other person on my team who might've worked on this is on PTO for a week so I'm sadly unsure

#

It was working perfectly before

#

Perhaps last week something broke, not entirely sure

#

Can't see what though, the code all looks unchanged to me

ruby hemlock
#

When I run your code I am getting a message about the .App file missing from src/index.jsx , I am not too familiar with React, is there something I was supposed to configure to resolve this?

granite kestrel
#

Oh boy, yeah, that's my bad

#

Honestly, there's no real way to run the entire app in the Repl alone

#

There are just too many dependencies that would need to be loaded in

#

I just used the REPL as a means of displaying the code in a readable fashion

#

Cause Discord isn't very good at that

ruby hemlock
#

Ah gotcha. Right I can totally look through the confirm related code there

granite kestrel
#

Sweet, much appreciated

#

Perhaps something is out of place

ruby hemlock
#

Can you debug your code and see if const cardNumberElement = elements.getElement(CardNumberElement); is actually setting cardNumberElement to something?

granite kestrel
#

Sure thing, let me do that

#

Huh, so I placed some console.log() statements in that function body and as expected, the function fires off and the elements do indeed appear to be there

#

However, I get that Integration Error whenever I click into one of the elements and start typing

#

Almost as if the onChange event is somehow causing something to go awry

#

Let me share a screenshot

#

See, the error message is appearing 4 times

#

Which reflects the 4 inputted values in the expiry field

ruby hemlock
#

Interesting. Looking at how/where this is called in the code.

#

Do you have an older revision of this code that you can still run from before this error started showing up?

granite kestrel
#

I tried looking at the timeline in VSCode for these files, but I couldn't find anything relevant

#

So sadly I'm not sure if I can find an older version

#

But if you look at how onChange is being called in the component

#

Do you see anything out of order?

#

Look at Fields.jsx

ruby hemlock
#

Nothing I am immediately seeing when looking at them. I am pulling in my colleague who is more familiar with React to take a look though it might be a few minutes before they are available.

#

Also if you have old revisions in general that could still be helpful to run, this could be a knock on effect from something else changing

granite kestrel
#

That's no problem. It's also EoD for me now, so I have to head out, but I'll try to answer any questions on my phone. If however you believe it to be best, I can leave this here for now and return Monday during my working hours

ruby hemlock
#

We'll take a quick look. If we find the answer we'll post it here. If we need more from you, we can put the question here, close the thread, and you can just bring this one up on Monday when looking in to this again

granite kestrel
#

Awesome, that sounds great

#

Thank you very kindly!

ruby hemlock
#

Hey, unfortunately I haven't been able to find what might be causing that code to think your element is not mounted. Your code is very similar to how elements are used in our samples and I am not immediately able to spot what differences might be causing your code to behave like this. We can take another look on Monday.

There is a lot of code even in that sample, it will help to narrow down the code we are looking at if you can. I'd highly recommend running those older working revisions of this code if they exist. I can also be helpful to cut out as much code as possible from that demo you made, if we can get a minimal recreation of this behavior it will be much easier to spot the issue.