adrienverge / localstripe

A fake but stateful Stripe server that you can run locally, for testing purposes.
GNU General Public License v3.0
196 stars 58 forks source link

Crating element for the cardNumber, cardExpiry and cardCvc #180

Open fakeomerson opened 3 years ago

fakeomerson commented 3 years ago

I am trying to create a payment form of individual inputs not the one element for the whole card, like

var elements = stripe.elements();
var cardNumberElement = elements.create('cardNumber');
var cardExpiryElement = elements.create('cardExpiry');
var cardCvcElement = elements.create('cardCvc');

but instead it always creates card element, instead of cardNumber it creates a card element and cardExpiry and cardCvc, are skipped.

Can you please answer me if it is possible to have stripe elements other than card element?

H--o-l commented 3 years ago

Hi @fakeomerson !

You can look inside the code to see what's what. In your case, I think the relevant code is around here https://github.com/adrienverge/localstripe/blob/2709044ab35698ab7cd80fb9dab05933aedbb551/localstripe/localstripe-v3.js#L191 Localstripe implements only what contributors have contributed. Don't hesitate to open a PR if you need something that doesn't exist yet!

AlexDaniel commented 3 years ago

For what it is worth, I also need this, but not sure if I'll get to making a PR this time.