A single line credit card input written in JavaScript that will switch to the next input once the information has been filled out, so no touch/mouse events are needed from the user.
- Run
npm install && gulp
to create thedist
directory. - Copy the
dist
directory to your project and load it onto your page - The
paymentService.js
file creates a global object calledPaymentService
. Invoke theinit
function with the ID of the div container as the parameter. - Access the non-formated user input with the
PaymentService.finalNumbers
objectPaymentService.finalNumbers.creditCardNumber
- the credit card numbereg. 4242424242424242
PaymentService.finalNumbers.expiration
- the card expiratione.g. 0222
PaymentService.finalNumbers.cvv
- the card CVV (4 numbers for Amex cards)e.g. 222
PaymentService.finalNumbers.zip
- the card zip codee.g. 60604
- Create Bower package