#n0ah9080

1 messages ยท Page 1 of 1 (latest)

reef gulchBOT
loud flax
#

Hello there

raw siren
#

Hey ๐Ÿ‘‹ ๐Ÿ˜‹

loud flax
#

This card is to be used for an external account?

raw siren
#

Yes! ^^

loud flax
#

That way you don't have to handle any sensitive card data on your server

raw siren
#

@loud flax

Okay I read a bunch ๐Ÿ˜…

I still cant wrap my head around how the CardElement is working (even after reading about it here: https://stripe.com/docs/js/element?type=cardElement)

I understand that the elements.create('payment'); creates and instance of the Payment Element that I can later use to tokenize... but I can't find how/where to input the credit card number in such element etc. ๐Ÿค”

loud flax
#

Payment Element and Card Element are actually two separate types of Elements

#

You want to do var cardElement = elements.create('card');

#

And then you need to mount the Element

#

Basically cardElement.mount('#card-element');

#

That will render the Card Element in one of your divs

#

After that, when you call createToken() it will automatically grab the data out of the Card Element

raw siren
#

Oh okay perfect! Just what I was looking for! ๐Ÿฅฐ

Thanks a bunch! โœŒ๏ธ