#lukelengl
1 messages ยท Page 1 of 1 (latest)
Hm hard to say. Can you share all of the code?
Want to see exactly what you're doing
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
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
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.
No worries! Thank you for the help!
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.
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?
Yes, I'm passing issuingCard, once, ephemeral key for the 'issusingCardNumberDisplay', but not for the 'issuingCardCopyButton'.
The copy button picks up the data provided to the card number display.
Nothing gets logged to the console when I click on the copy button
I don't suppose this page is online anywhere so I could take a look myself?
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
Oh, yep, that's likely the issue.
is it possible that is the issue? different instantiation of the elements object
You need to use the same instance of elements throughout.
i've been staring at this all afternoon and just didn't see it. lol
If you're using a different instance each time then the info can't get from one element to another.