#jogui_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ 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/1227951613390618674
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- jogui_code, 18 hours ago, 24 messages
- jogui_best-practices, 1 day ago, 8 messages
Credit Card number, Expiration Date, CVC
nevermind about the screenshots, now the dev environment is failing,
I need to translate these three labels
I am sure Payment Element supports translation, let me check...
I see also it puts a Disclaimer on the bottom, for example "Al facilitarnos los datos de la tarjeta, permites que XXXX cargue en tu tarjeta futuros pagos conforme a las condiciones estipuladas."
these are the 4 labels that weren't appearing with card element, but now doing the migration to payment element appears.
You can hide the legal text with this option: https://docs.stripe.com/js/elements_object/create_payment_element#payment_element_create-options-terms
And you can set the locale here: https://docs.stripe.com/js/elements_object/create#stripe_elements-options-locale
I am not sure if Catalan is an option though.
It is not, that's the problem :/
I see, I don't think it's possible then.
And cannot i find a way to use the card element with createConfirmationToken()?
can you revalidate that only with the payment element will the createConfirmationToken work?
Let me check...
It seems that you're correct and confirmation tokens are only supported with Payment Element, unfortunately. I understand it's a confusing situation. Maybe we could find a workaround?
Surely, I suggest reaching out to Stripe Support and placing a request to add Catalan to supported languages: https://support.stripe.com/?contact=true
In the meantime, what are you trying to solve with confirmation tokens exactly?
Yes sure! ๐ This specific case:
https://discord.com/channels/841573134531821608/1227249947108446390
The first message to you some days ago.
@native quest answered with:
Hi @languid helm apologies for the delay, the server is quite busy at the moment. If you want to get a Payment Method that you can inspect before processing an intent, you'll want to follow this guide:
https://docs.stripe.com/payments/build-a-two-step-confirmation
With that approach, you should be able to inspect payment_method_preview.card.country on the Confirmation Token that is created:
https://docs.stripe.com/api/confirmation_tokens/object#confirmation_token_object-payment_method_preview-card-country
I understand, yes, this would be the ideal solution. As a workaround, you could instead collect a Payment Method with a SetupIntent and charge it later, checking the country in the meantime for example.
and if the country is different, i would go back and cancel that setup and show the user the new price with the correct currency right?
there is no problem in generating multiple non-complete setupintents for this situation
The SetupIntent would be complete actually, but you will just not used the resulting Payment Method. You can as well delete/detatch it.
No, there shouldn't be an issue.
Just a last comment vanya, thinking in workarounds
However, I would still generally recommend using the Payment Element with 2-step confirmation if you can live with the missing translation for now.
If I modify the labels using some DOM js manipulation on the iframe to change the texts
Is that crazy? Iโm thinking in your TOS and such
You can disable TOS with the option I shared earlier
Not sure if you will be able to access the labels, and they might be subject to change in the future. But you can try.
Thanks vanya, gonna talk with product team in we can make this compromise
I asked 2 years ago for Catalan translations but were not possible
To stripe support, we were eager to provide the text and such
I understand, adding and supporting a new language is not a trivial task since we want to make sure it looks and works well on all surfaces.