#lukelengl

1 messages ยท Page 1 of 1 (latest)

swift pulsarBOT
wicked quarry
#

Hm hard to say. Can you share all of the code?

#

Want to see exactly what you're doing

lethal anchor
#

Sure

#

worth noting... i have the other display elements working (it's showing the card number, cvc, expiry correctly), just having problems getting the click on the copy button to work

wicked quarry
#

Gotcha

#

Recommend using the inspector in your browser's developer console

#

That way you can check to make sure the iframe is lined up properly

#

That will help you see the positioning of all the elements on the page to find out what's going wrong

lethal anchor
#

yeah, when i look at it in the inspector, i can see the iframe inside of the div. not sure what you mean by "lined up properly".

#

This is what I see when looking at it in inspector. I can see that the iframe isn't quite filling the parent (the red square is the parent)

#

However, when I mouseover the area that's shown there, the cursor changes to a pointer, but nothing gets copied to the clipboard

#

Makes me think I've misconfigured something in creating the Stripe element, but I don't see anything different between what I did and the sample code in the documentation

#

I am curious why in the example it doesn't show passing an ephemeral key, nonce, card ID, or anything like that when creating the copy button element.

wicked quarry
#

Sorry for the delay

#

Discord has been busy

#

Looking

lethal anchor
#

No worries! Thank you for the help!

swift pulsarBOT
wary sapphire
#

Hi, stepping in as it's codename_duchess's end of day. Let me catch up here

#

I'm not sure what is going on by I'm getting help here. Thank you for your patience.

brisk vale
#

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

#

Starting from your most recent question first:

#

I am curious why in the example it doesn't show passing an ephemeral key, nonce, card ID, or anything like that when creating the copy button element.

#

You do have to pass those things in when initializing elements. Is that not happening?

#

That's from the docs you linked to above.

#

When you click on the copy button do you see any output in the console?

lethal anchor
#

Yes, I'm passing issuingCard, once, ephemeral key for the 'issusingCardNumberDisplay', but not for the 'issuingCardCopyButton'.

brisk vale
#

The copy button picks up the data provided to the card number display.

lethal anchor
#

Nothing gets logged to the console when I click on the copy button

brisk vale
#

I don't suppose this page is online anywhere so I could take a look myself?

lethal anchor
#

unfortunately no

#

it just occurred to me what the problem might be

#

in the code sample, there's a const elements = stripe.elements();

#

i'm just callilng stripe.elements() separately during each call

brisk vale
#

Oh, yep, that's likely the issue.

lethal anchor
#

is it possible that is the issue? different instantiation of the elements object

brisk vale
#

You need to use the same instance of elements throughout.

lethal anchor
#

i've been staring at this all afternoon and just didn't see it. lol

brisk vale
#

If you're using a different instance each time then the info can't get from one element to another.

lethal anchor
#

yeah, totally makes sense!

#

yep, that was the issue

#

thank you for the help

brisk vale
#

No problem, although I don't know that I did much. ๐Ÿ˜…

#

Glad it's working!

lethal anchor
#

rubber duck, if nothing else lol

#

have a great weekend!