Mangopay / cardregistration-js-kit

Mangopay V2 JS resources for card registration front-end workflow
MIT License
38 stars 34 forks source link

Card type missing in the demo #11

Closed tildedash closed 9 years ago

tildedash commented 9 years ago

Hello,

The card type is missing in the demo and without this field the registration failed (for a 3 digits CVV).

Regards

hobailey commented 9 years ago

Hi @tildedash, I'm not sure to have understood your query - the CardType is given here: https://github.com/Mangopay/cardregistration-js-kit/blob/master/demo/index.php#L31 If you specify MAESTRO, you'll then not be required to supply a CVV.

tildedash commented 9 years ago

Yes, I'm talking about the HTML field that the JS try to retrieve here : https://github.com/Mangopay/cardregistration-js-kit/blob/master/demo/index.php#L92

So cardData.cardType stays empty and _cvvValidator.validate return false : https://github.com/Mangopay/cardregistration-js-kit/blob/master/kit/mangopay-kit.js#L267

Did I miss something ?

hobailey commented 9 years ago

You're absolutely right - sorry about the confusion. I've just corrected that with https://github.com/Mangopay/cardregistration-js-kit/commit/09f93fe24959a38d6aecca1d4172edb5d916398a :-)