Skip to content

Instantly share code, notes, and snippets.

@luanpiegas
Created July 27, 2021 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luanpiegas/73c1b659ccd6ca5ce89e1bd2a9eb5a95 to your computer and use it in GitHub Desktop.
Save luanpiegas/73c1b659ccd6ca5ce89e1bd2a9eb5a95 to your computer and use it in GitHub Desktop.
Card.js example for WooCommerce and Cielo payment method
var debitCard = new Card({
form: '.payment_method_cielo_debit',
container: '.payment_method_cielo_debit.payment_box',
formSelectors: {
numberInput: '#cielo-card-number',
expiryInput: '#cielo-card-expiry',
cvcInput: '#cielo-card-cvc',
nameInput: '#cielo-card-holder-name'
},
formatting: false,
});
var creditCard = new Card({
form: '.payment_method_cielo_credit',
container: '.payment_method_cielo_credit.payment_box',
formSelectors: {
numberInput: '#cielo-card-number',
expiryInput: '#cielo-card-expiry',
cvcInput: '#cielo-card-cvc',
nameInput: '#cielo-card-holder-name'
},
formatting: false,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment