richnologies / ngx-stripe

Angular 6+ wrapper for StripeJS
MIT License
217 stars 77 forks source link

Possibility to see CB images #233

Closed rudyhadoux closed 9 months ago

rudyhadoux commented 9 months ago

Hi,

With Stripe Elements for a payment (and Angular 17), is it possible to display the bank cards pictures in the numbers input ?

richnologies commented 9 months ago

Hey @rudyhadoux, can you be more specific, are you talking about the payment element? or the any of the other Bank Elements?

rudyhadoux commented 9 months ago

Hi. Those bank cards pictures.

Capture d’écran 2023-11-16 à 18 00 19
richnologies commented 9 months ago

Yeah, Stripe itself takes care of that. Ngx Stripe is just a wrapper around it. Should work fine

rudyhadoux commented 9 months ago

With ngx-stripe and @stripe/stripe-js. No pictures...

richnologies commented 9 months ago

May I have the link to the example where they did work?

rudyhadoux commented 9 months ago

Sorry, what do you mean ?

richnologies commented 9 months ago

The first example where the logs where actually displayed, is that an Stripe example?

rudyhadoux commented 9 months ago

It is my own example with ngx-stripe and @stripe/stripe-js.

richnologies commented 9 months ago

Hi. Those bank cards pictures. Capture d’écran 2023-11-16 à 18 00 19

So, this example is with ngx-stripe too??

The thing is, I see no way to do it. https://stripe.com/docs/js/elements_object/create_element?type=card the only options in the card element I can see are iconStyle and hideIcon. But the icon appears on the left. So I don't know what to tell you. If you have a working example using Stripe, I can see what I'm missing

rudyhadoux commented 9 months ago

The picture is from a web site with Stripe Elements. I am waiting for a reply from Stripe Support. I do not understand why Stripe does not develop an embedded solution for Angular.

richnologies commented 9 months ago

Great! I would appreciate if you could share what they tell you, so other can benefit

rudyhadoux commented 9 months ago

I found myself. I just integrated html client in Angular from : https://github.com/stripe-samples/accept-a-payment/tree/main/payment-element/client

richnologies commented 9 months ago

Oh! but that is the Payment Element, not the Card Element, right?

richnologies commented 9 months ago

Sorry about that, we have support for that too: https://stackblitz.com/edit/ngx-stripe-live?file=src%2Fmain.ts

Anyway, happy you find your way

rudyhadoux commented 9 months ago

I do not use Material.

Form id="payment-form" is the form to pay. That gives me that :

Capture d’écran 2023-11-17 à 15 28 27