Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate to a different validation library #75

Open
dlong500 opened this issue Apr 24, 2020 · 5 comments · May be fixed by #77
Open

migrate to a different validation library #75

dlong500 opened this issue Apr 24, 2020 · 5 comments · May be fixed by #77

Comments

@dlong500
Copy link

It appears that the payment library has been abandoned (no updates in almost three years), and there have been some changes with things like Visa cards that can have up to 19 characters. Either the validation library needs to be replaced with something else or removed entirely.

My recommendation would be to remove the built-in validation and just provide some links in the documentation to a few validation libraries along with some demo code on basic usage. This way the dependency on an outdated library can be removed and make the resulting package smaller. I don't have a specific validation library in mind so I can't recommend one over another.

@cassiocardoso
Copy link
Contributor

@gilbarbara, what do you think? I'm able to help with this.

@gilbarbara
Copy link
Contributor

Hey @cassiocardoso

I don't think this library works without brand identification and formatting (we don't do validation per se since we don't control the form itself).
Keeping all the rules internally would be a nightmare and falls outside the scope of this package.

So I think the initial effort should be to find a new library that handles that. Or fork the payment repo, rewrite it (CoffeeScript 🤮), and keep it updated.

@gilbarbara
Copy link
Contributor

@dlong500

This library has no purpose if it can't identify the brand and format the number/CVC and I'd rather deprecate and archive it.

Payment has support for 19 characters for Visa numbers. What else do you need?

@gilbarbara
Copy link
Contributor

@dlong500 But yeah, Payment is really dead. We'll try to find a replacement.

@dlong500
Copy link
Author

@gilbarbara Sorry, I didn't realize how much it was being used for credit card type identification. I was only thinking of the validation part and looking at the unresolved issues/pull requests on the payment library. My fear given the evolving credit card ecosystem is a bunch of edge case problems cropping up.

Maybe https://github.com/braintree/credit-card-type could potentially be a replacement? It seems relatively mature and under active development.

@dlong500 dlong500 changed the title migrate to a different validation library (or remove entirely) migrate to a different validation library Apr 26, 2020
@gilbarbara gilbarbara added this to the 1.0 milestone May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants