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

[fix] Check for test credit card numbers before attempting validate a… #4

Closed
wants to merge 1 commit into from

Conversation

theogravity
Copy link

The code uses the numbers out of https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm, but some of them do not pass the validation.

  1. I added in a unit test to test each test credit card against the validator.
  2. I added a simple check in the validator to look for a test card first before running an algorithm.

References #3

@Swaagie
Copy link

Swaagie commented May 19, 2015

Thanks for taking the time to contribute, but this cannot be merged in its current state. The idea of the validator is to validate defensively in production, such that only valid (non-test) numbers are accepted. That said adding a env=development switch (or similar) that works both server and client side this would be a nice feature to allow easy testing :)

@3rd-Eden 3rd-Eden closed this Sep 29, 2015
@steven10172
Copy link
Contributor

Adding a switch to allow test and valid numbers would be a nice feature to have. I might look into creating a PR over the next couple of weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants