Created
May 20, 2020 07:41
-
-
Save dimaip/4c3e272d71587b8d1b3cdd6a677c7f39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<CardElement | |
onChange={ev => { | |
if (ev.complete) { | |
const card = elements?.getElement(CardElement) | |
stripe | |
?.createPaymentMethod({ | |
type: 'card', | |
card, | |
}) | |
.then(result => console.log(result.paymentMethod?.card.country)) | |
} | |
}} | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment