Closed EvanHahn closed 9 years ago
Now, the API returns an array of possible card types, like this:
getCardTypes('4') // => [{type: 'visa', ...}] getCardTypes('5') // => [{type: 'master-card', ...}, {type: 'maestro', ...}] getCardTypes('55') // => [{type: 'master-card', ...}] getCardTypes('56') // => [{type: 'maestro', ...}] getCardTypes('0') // => [] getCardTypes('') // => an array of all card types
There were a lot of edge cases to consider here—see the tests for our changes.
Now, the API returns an array of possible card types, like this:
There were a lot of edge cases to consider here—see the tests for our changes.