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

Add support for Diners Club 16 #2211

Merged
merged 3 commits into from
Feb 24, 2020
Merged

Add support for Diners Club 16 #2211

merged 3 commits into from
Feb 24, 2020

Commits on Feb 21, 2020

  1. Add support for Diners Club 16

    Summary
    - Add `CardBrand.DinersClub16` to represent 16-digit Diners Club cards
    - Update Diners Club BIN range
      - Card numbers starting with `"30"`, `"38"`, or `"39"` represent
        16-digit Diners Club cards
      - Card numbers starting with `"36"` represent
        14-digit Diners Club cards
    - Update most tests to use `CardNumberFixtures`
    
    Testing
    Add unit tests
    mshafrir-stripe committed Feb 21, 2020
    Configuration menu
    Copy the full SHA
    2ddebb4 View commit details
    Browse the repository at this point in the history
  2. Use a single enum value for all Diners Club

    - Rename `maxLengthWithoutSpaces` to `defaultMaxLength`
    - Rename `maxLengthWithSpaces` to `defaultMaxLengthWithSpaces`
    - Create `getMaxLengthForCardNumber()` and
      `getMaxLengthWithSpacesForCardNumber()` to determine the max length
      based on the card number's prefix
    mshafrir-stripe committed Feb 21, 2020
    Configuration menu
    Copy the full SHA
    72e6bf7 View commit details
    Browse the repository at this point in the history
  3. Fix max length not updating

    Update max length whenever brand changes
    mshafrir-stripe committed Feb 21, 2020
    Configuration menu
    Copy the full SHA
    3967cdb View commit details
    Browse the repository at this point in the history