#naveel1596
1 messages · Page 1 of 1 (latest)
What are you using to render that? Is that the Card Element?
What is the "new UI" you mentioned? Where are you seeing it?
like that
I have seen it here
https://stripe.com/docs/elements/appearance-api
That's the Mobile Payment Element, which is different from the Card Element. Are you building a mobile integration? What does your integration actually look like? What languages is it using?
We really need a lot more info to be helpful here
I am building a web application. I am using PHP/ jquery
const appearance = {
theme: 'stripe'
};
// Pass the appearance object to the Elements instance
const elements = stripe.elements({clientSecret, appearance})
my card element is empty as you can see. when changed to above it shows an error on the browser console with same old ui. I can't able to add clientSecret at the beginning of the code. I added the client's secret in Ajax when from submit.
does the new design require ClientScrent at the start when the page loads?
That's not the "new" design. That's the UI for a completely different product. You can either migrate to that that new product (https://stripe.com/docs/payments/payment-element), or you can update the Appearance for the Card Element, using the web-based guide: https://stripe.com/docs/elements/appearance-api?platform=web
well, I have used the same functionality code as you sent me a link. but It showes me old UI.
my question is if I don't have clientSecret. does the new UI didn't work?
this my current code
const elements = stripe.elements();
are you a developer?
const elements = stripe.elements();
const paymentElement = elements.create('card');
this my current code in js
Yes. Apologies though, I overlooked this:
The Elements Appearance API doesn’t support individual payment method Elements (such as CardElement). Use the Style object to customize your Element instead.
The customization options you have for the Card Element are mentioned here: https://stripe.com/docs/js/elements_object/create_element
what is differnce between elements.create('card') and elements.create('payment')?
That's the Payment Element. That's the product I was referring to earlier that you could switch to using instead of the Card Element.
I changed to payment but it showes me an error
`Uncaught IntegrationError: In order to create a payment element, you must pass a clientSecret or mode when creating the Elements group.
e.g. stripe.elements({clientSecret: "{{CLIENT_SECRET}}"})`