Closed glebm closed 6 years ago
@glebm would it be possible to link all proposed changes to their sources of information?
The AMEX one you added is a good example, but would be interesting to check the sources of the other modifications and additions for future reference.
@arthurgouveia I've simply copied all of these verbatim from jessepollak/payment. It seems to have a better maintained list and I don't want to dig through the commit history for sources, that's a whole lot of work.
@glebm Thanks for this, any way we could get some updated validation and formatting specs on actual test card numbers?
@johndavidjohn jessepollak/payment only has tests for card number validation: https://github.com/jessepollak/payment/blob/master/spec/index.spec.coffee#L44-L86
I'll add them here.
That repo does not have any tests for card-specific CVC validation and formatting.
@jondavidjohn I've copied the tests over from jessepollak/payment (there were only a few there) and also incorporated 17-19 digit JCB support.
Looking at other CC providers... I can confirm that the updated IIN range and format for Diners Club are also valid according to:
https://en.wikipedia.org/wiki/Payment_card_number#cite_note-MC_DC_Ref-11 https://baymard.com/checkout-usability/credit-card-patterns
@jondavidjohn what is the roadmap for the next release?
Thanks for all the research @ddayguerrero! If you have a minute, could you put together a PR with these links as comments to the respective patterns?
It would be great to have some kind of source of truth with all of the official links (e.g. either as comments or in the README.md), this would increase Payform's credibility in my opinion
Thanks for the ping @ddayguerrero, releasing y'alls latest work had fallen off my radar, I'll try and get to it in the next few days.
Would also ❤️ to accept a PR adding all this info as an additional markdown bit of documentation and link to it from the README.
Laser seems to be no longer in operation. Unless we are talking about Laser prepaid Visa cards, I believe it makes sense to omit the validation and formatting.
https://en.wikipedia.org/wiki/Laser_(debit_card):
Laser cards were withdrawn from the market on 28 February 2014.
Based on https://github.com/jessepollak/payment/blob/329d687942098f8c25a8cbe6078ec07834ec6a8d/src/index.coffee
Changes AMEX CVV code validation to expect exactly 4 digits (see https://security.stackexchange.com/questions/136275/why-is-the-american-express-4-digit-security-code-located-on-the-front-of-the-ca)
Refs #7