#mnord
1 messages · Page 1 of 1 (latest)
Hi
Developer tools in the browser says strClientSecret is invalid parameter but the documentation says it is correct.
Can you share mored details please? what you mean by "the documentation says it is correct"
can you share a screenshot of the error ?
HI @lapis cipher let's keep talking here in this thread please
The documentation says to pass the client secret and the var appearance which is what I did.
https://stripe.com/docs/js/elements_object/create
you are passing strClientSecret while in the doc it's clientSecret
Your code should be:
var elements = stripe.elements({ clientSecret:strClientSecret, appearance});
Can you share the screenshot and the code ?
How should I share the code?
Hi, I'm taking over my colleague.
No unfortunately it didn't work
What's the new error?
There is no error in developer tools in the browser but it is not styled.
Will bootstrap 3 cause the elements API not to work?
I know the client secret is generated because I put it in a JavaScript alert function.
I think these are 2 different issues.
Could you please share the screenshot of the Payment Element that you see?
The Card Element does not support the Appearance API, therefore, theme: 'flat' is ignored.
You can use the style property and define style yourself: https://stripe.com/docs/js/elements_object/create_element?type=card#elements_create-options-style
Or you can use the Payment Element: https://stripe.com/docs/payments/payment-element
Is the payment element what uses the flat theme?
I don't know how to change from card element to payment element and everything still work. I guess I will try to style it.
Payment Element uses the full Appearance API, incl. themes: https://stripe.com/docs/elements/appearance-api
There's not much you need to change to get started with the Payment Element, you will find all details in the doc I shared. But instead it allows you to use all other available Payment Methods, not just card.
Can I turn off pay later functions that it lists as I want immediate payment.
Sure, you can change this in your Settings: https://dashboard.stripe.com/settings/payment_methods
Thank you for your help. Have a blessed day.
Happy to help. Let me know if you have any other questions.