Closed nkovacic closed 5 years ago
No. We don't have concrete plans to clone the card type detection in a way that requires no DOM.
I will however consider this a feature request and as such leave this thread open until we get to it.
@ArnoudAdyen request is valid because without card type detection this api - https://github.com/Adyen/adyen-cse-web#javascript-only-integration is useless
@ArnoudAdyen we also need such method or at least cards list from https://github.com/Adyen/adyen-cse-web/blob/master/js/addOns/adyen.cardtype.js#L47
Based on the credit card type we show the users how much transaction costs they have to pay. This detection and validation really has to be improved, especially as new "sub" card types were launched lately.
We for instance need to be able to detect if a creditcard is a "bijcard" or "visa dk" card. The major problem: we did configure additional transaction costs on these cards (or even better, the parent "visa") at the skin, but because of the partial CSE detection we now can not show our users the transaction costs.
Hi @rvanlaak Is adyen.cardTypes.determine() sufficient for you? https://github.com/Adyen/adyen-cse-web/blob/master/js/addOns/adyen.cardtype.js#L61
Hi @lancergr
I'm using adyen.cardTypes.determine(creditCardNumber)
but it doesn't seem to work.
I have entered a correct credit card and the methodcard.setCardNumber(variant).isCardNumber()
return false
I'm using Adyen version 0.1.18 JavaScript-only integration
BTW, is the argument of determine
function a credit Card Number ?
Does the card type detection work with JavaScript-only integration of Adyen ?
Thx
Hi @lancergr
Please ignore my previous comment.
I was passing "4111-1111-1111-1111" instead of "4111-1111-1111-1111" to the determine
function.
Everything works as expected.
Sorry for the noise
There is no method on the adyen object for detecting credit card type, which are needed for custom payment form integration with modern frameworks. The method that is currently present requires a DOM form which is not desirable. Is this planned in any future release?