#morteza_api
1 messages · Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- morteza_api, 23 hours ago, 16 messages
- morteza_api, 1 day ago, 43 messages
- morteza_api, 1 day ago, 39 messages
- morteza_api, 3 days ago, 21 messages
👋 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/1240992360972681266
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi
hope you are doing well
I have a React Native app with a Webview which loads a nextjs site in it, I load card details, cvc. pin, etc but copy button doesn't seem to work
I see the transparent button , click on it and it gets the event but doesn't copy
elements
.create("issuingCardPinDisplay", {
issuingCard: cardId,
ephemeralKeySecret: ephemeralKeyResult.secret,
nonce: nonceResult.nonce,
style: elementsStyle,
})
.mount(#${cardId}-card-pin);
const cardPinCopy = elements.create("issuingCardCopyButton", {
toCopy: "pin",
style: {
base: {
fontSize: "12px",
lineHeight: "24px",
},
},
});
cardPinCopy.mount("#card-pin-copy");
for now this is the code I'm using
<Stack flexDirection={"row"} alignItems={"center"}>
{issuingElementsMounted && <Typography>PIN</Typography>}
<Typography
width={50}
ml={1}
color="white"
id={${cardId}-card-pin}
/>
<div
id="card-pin-copy"
style={{
width: "24px",
height: "24px",
backgroundRepeat: "no-repeat",
backgroundPosition: "center",
backgroundSize: "contain",
backgroundImage: "url()",
}}
/>
</Stack>
hi! hmm, maybe it doesn't work inside a WebView?
does it work and copy to the clipboard if you load the page in a normal browser?
but it must be in a webview
haven't checked that
lemme check
may take some time, please don't close the thread
yes
you are right
it's not working in webview
what should I do
maybe check the documentation of the webview implementation you're using to see if they have any additional options to adjust to maybe allow this or extra parameters/functions to pass
from Googling it I think clipboard access in a Webview, especially on Android, is very hit-or-miss.
Overall I'd suggest just linking out to the page in the main browser instead of a WebView in the app. I'll also flag internally in case we can improve stripe.js here
We should also have native elements for native Android/iOS SDKs for Issuing but we don't right now unfortunately.
this if from the docs
Issuing Elements does not directly support native application platforms such as iOS, Android, or React Native.
To display sensitive card details with Issuing Elements in your native app, use a web view. Build a web integration on your servers following this guide, and then point a web view’s URL to that integration. To learn about implementing web views for native apps, see these external resources:
I also have another question, I can only style copy button with background-image ?
I mean what I if I need a button label like Copy Pin then I should put a background image Copy Pin as an image ?
hi! I'm taking over this thread.
ok
To display sensitive card details with Issuing Elements in your native app, use a web view. Build a web integration on your servers following this guide, and then point a web view’s URL to that integration. To learn about implementing web views for native apps, see these external resources:
thanks for sharing. I'll notify the team working on this to understand if webviews are supported or not. in the meantime, you could try the suggestion above: "just linking out to the page in the main browser instead of a WebView in the app"
if I
read clipboard on the webview side and send it to native side and in there put it on clipboard, is this PCI Complaint ?
I also have another question, I can only style copy button with background-image ?
are you talking about this code in the doc?
if I read clipboard on the webview side and send it to native side and in there put it on clipboard, is this PCI Complaint ?
we don't know much about PCI compliance here on Discord
yes
you can see here there are other options to style the copy button:
I think it's not becase I can read the PAN, CVC, ... that has been copied.
yes but can I put a text in it like Copy Pin ?
I'm not sure I understand. can you give a concrete example of what you are trying to do?
let me put it this way, I need to open a modal in which I have copy pin, copy cvc, copy Pan, with their icons , based on docs to implement this I should make 3 images for each of them and specify for their background-images
I mean they must be image or i can implement them in html
since copy button is loaded automatically into the div, everything we put in the div it'll be replaced by copy button
right ?
so you want to know if you can use plain HTML instead of a background image for the copy buttons?
yes yes
if so, I'm not sure. but it should be easy to figure out. can you run some tests on your end? otherwise I can try this myself if needed.
well I put copy text inside the div to which copy button loads, but it replaces the copy text I've written
got it. then this means you should be using a background image.
then make an image with icon and text and show as background-image
ok
who should I ask
about pci complaince
you can try asking Stripe support (https://support.stripe.com/contact) or you own lawyer.
happy to help 🙂
I can trigger that event programatically right ?
what if I create html and when clicked on that I trigger the click event for copy_button
what do you think ?
I'm not familiar with Issuing Elements, so not sure if that will work. but yes you can try!