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

Diners Club card number (16 digits) #2205

Closed
nachtmare opened this issue Feb 19, 2020 · 0 comments · Fixed by #2211
Closed

Diners Club card number (16 digits) #2205

nachtmare opened this issue Feb 19, 2020 · 0 comments · Fixed by #2211
Assignees
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@nachtmare
Copy link

Do you plan to add support for Diners Club cards with 16 digit PAN? (now only 14 digits are allowed)

@mshafrir-stripe mshafrir-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Feb 21, 2020
@mshafrir-stripe mshafrir-stripe self-assigned this Feb 21, 2020
mshafrir-stripe added a commit that referenced this issue Feb 24, 2020
Summary
- Update `CardBrand`
  - Update `CardBrand.DinersClub` to support 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
  - Rename `maxLengthWithoutSpaces` to `defaultMaxLength`
  - Rename `maxLengthWithSpaces` to `defaultMaxLengthWithSpaces`
  - Create `getMaxLengthForCardNumber()` and `getMaxLengthWithSpacesForCardNumber()` to determine the max length based on the card number's prefix
- Update most tests to use `CardNumberFixtures`

Motivation
Fixes #2205

Testing
Add unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants