#dylancuure_26034
1 messages · Page 1 of 1 (latest)
Hi, thank you
This is my website : https://cuure.com/version-71v/products
You need to add a product to your cart before you can see the stripe payment element
I mean the website that has the desired layout, the other one.
I think they're using the Split Card Element: https://stripe.com/docs/js/element/other_element?type=cardNumber
Where you use 3 separate Elements: CardNumber, CardExpiry and CardCvc.
However, this, as well as Card Element, is a legacy integration and I recommend you to use Payment Element: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Ok so you would not recomment to try to do like them?
No, Payment Element has many benefits, including controlling the available payment methods types via Dashboard, and various conversion optimizations.
The real reason we wanted to do like them is because we don't like the way the icons are displayed on small screens (mobile)
This displays a gif instead of showing all elements at once
I understand, but I don't think you can customise that.
I understand that you prefer the old component's look, but there's much more benefits to using the Payment Element instead.
I don't doubt it
One last thing, is it possible to collapse the payment element when there is only one payment method available? And if not, do you know why?
Are you using the accordion view?
I am not sure. If not, but it's because then you can just show the card form, without extra ui components. It provides a cleaner look.
You can see all the customisation options here: https://stripe.com/docs/elements/appearance-api
Is it possible to get from the payment element all the payment methods that are displayed?
My goal is to know if there is one or more payment methods displayed
You can get it from the PaymentIntent.payment_method_types
I am creating the payment intent after payment information collection
I see. You can try getting the Payment Element and seeing what data is available: https://stripe.com/docs/js/elements_object/get_payment_element