stripe elmenets example

Example: stripe elements

style: {
	padding: '2rem'
  	// ....
}

// create card number input in div#card-number
let cardNumber = elements.create('cardNumber', {
      'placeholder': '1234 1234 1234 1234',
      'style': style
  });
  cardNumber.mount('#card-number');

// create cvc input in div#card-cvc
  let cardCvc = elements.create('cardCvc', {
      'placeholder': 'CVC',
      'style': style
  });
  cardCvc.mount('#card-cvc');

  // create card expiry input in div#card-expiry
  let cardExpiry = elements.create('cardExpiry', {
      'placeholder': 'MM / AA',
      'style': style
  });
  cardExpiry.mount('#card-expiry')

Tags:

Misc Example