kenkeiter / skeuocard

Skeuocard progressively enhances credit card inputs to provide a skeuomorphic interface.
http://kenkeiter.com/skeuocard/
MIT License
3.23k stars 231 forks source link

initialValues using only the last four of the card number #135

Closed nodesocket closed 10 years ago

nodesocket commented 10 years ago

Is it possible to set default values using only the last four digits of the card instead of the entire card number? From Stripe, we obviously don't get back the full card number, just the last four. I am doing:

var card = new Skeuocard($("#skeuocard"), {
            initialValues: {
                number: $("#cc_number").val()
                expMonth: parseInt($("#cc_exp_month").val(), 10),
                expYear: parseInt($("#cc_exp_year").val(), 10),
                name: $("#cc_name").val(),
                cvc: $("#cc_cvc").val()
            }
        });

Where $("#cc_number").val() is 5019. Currently this is not working.

nodesocket commented 10 years ago

Nevermind.