interactive-card icon indicating copy to clipboard operation
interactive-card copied to clipboard

Request: Add integration with Stripe Elements

Open vmitchell85 opened this issue 6 years ago • 12 comments

It would be really awesome if we could integrate this UI with Stripe Elements.

I'm adding this issue in case someone else picks it up before I can attempt it.

vmitchell85 avatar Oct 26 '19 14:10 vmitchell85

Miguel Piedraftia actually managed to do this yesterday and he made a write up on it: https://miguelpiedrafita.com/stripe-elements-card/

duncanmcclean avatar Oct 26 '19 15:10 duncanmcclean

It would be really awesome if we could integrate this UI with Stripe Elements.

I'm adding this issue in case someone else picks it up before I can attempt it.

I too would find this useful.

ghost avatar Oct 28 '19 06:10 ghost

There was a comment on the post by @m1guelpf asking about his source code, but no answer yet. I'll comment here if I get it working

vmitchell85 avatar Oct 28 '19 13:10 vmitchell85

@vmitchell85 As I mentioned on the comments I'll try to decouple the component from the Sitesauce this week and throw it in a repo, but don't have time today unfortunately :)

m1guelpf avatar Oct 29 '19 08:10 m1guelpf

@m1guelpf sweet, it didn’t notify me of your comment since it was in a sub-comment... I might give it a shot anyway... thanks

vmitchell85 avatar Oct 29 '19 14:10 vmitchell85

Any updates on this?

ghost avatar Dec 11 '19 17:12 ghost

Sorry @sblfc I haven't gotten around to it...

vmitchell85 avatar Dec 12 '19 01:12 vmitchell85

@vmitchell85 @sblfc I've managed to insert Stripe with /api/v2

EDIT

But i think that

Miguel Piedraftia actually managed to do this yesterday and he made a write up on it: https://miguelpiedrafita.com/stripe-elements-card/

is better, because it use /api/v3 with Stripe Credit Card checker. The code belove from the blog is the Object that stripe use to create the card element, and i think that the style/html is the same as this repo.

const cardNumber = elements.create('cardNumber', {
    classes: {
        base: 'card-item__number',
        focus: 'card-item__focus',
    },
    style: {
        base: {
            color: '#ffffff',
            lineHeight: '1',
            fontFamily: '"Source Code Pro", monospace',
            fontSmoothing: 'antialiased',
            fontSize: '27px',
            fontWeight: "500",
            '::placeholder': {
                color: '#cbd5e0'
            }
        },
        invalid: {
            color: '#fa755a',
            iconColor: '#fa755a'
        }
    }
})

Piket564 avatar Dec 13 '19 13:12 Piket564

I don't think it's actually possible to do with Stripe.js v3. What is possible is what m1guelpf had done and that's to place the inputs inside the card. However that's far from optimal imho :(

dominik-wbz avatar Dec 19 '19 19:12 dominik-wbz

I don't think it's actually possible to do with Stripe.js v3. What is possible is what m1guelpf had done and that's to place the inputs inside the card. However that's far from optimal imho :(

Yes, Stripe provide hi own input for security concern, they do not limit the CSS though, i've tried what m1guelpf had done, and yes is a little tricky but it works...

Piket564 avatar Dec 24 '19 09:12 Piket564

Hi everyone,

Any update?

callsecfrance avatar Jan 16 '21 17:01 callsecfrance

I gave up on this, it's a nice visual but not worth the effort to me. It's really neat but I'm gonna ship more features instead :)

AxelTheGerman avatar Jan 16 '21 19:01 AxelTheGerman