Open AlanGio opened 7 years ago
Fixed!. sorry.
How did you solve it. I'm getting the same error
I'm getting this erros every time too, anyone can help me?
Only the nameInput
is working, as you can see in the image below
Here's my code:
card = new Card({
form: document.querySelector('#co-payment-form'),
container: '.card-wrapper',
formSelectors: {
numberInput: 'input[id="pagarme_creditcard_creditcard_number"',
expiryInput: 'input[id="pagarme_creditcard_creditcard_expiration_date"',
cvcInput: 'input[id="pagarme_creditcard_creditcard_cvv"',
nameInput: 'input[id="pagarme_creditcard_creditcard_owner"'
},
masks: {
cardNumber: false
},
placeholders: {
number: '**** **** **** ****',
name: 'Nome do Portador',
expiry: 'MM/YY',
cvc: '***'
},
formatting: false,
debug: true
});
I've already tried with other selector too and only nameInput
worked
formSelectors: {
numberInput: 'input#pagarme_creditcard_creditcard_number',
expiryInput: 'input#pagarme_creditcard_creditcard_expiration_date',
cvcInput: 'input#pagarme_creditcard_creditcard_cvv',
nameInput: 'input#pagarme_creditcard_creditcard_owner'
},
@AlanGio @jessepollak @zubizarreta
Hello!,
I have always the same error when I user the form:
Uncaught TypeError: Cannot read property 'validateCardNumber' of undefined or Uncaught TypeError: Cannot read property 'validateCardCVC' of undefined depends input im using.
I included jquery.card and this is how Im initializating the script:
Many thanks for read! :)