Skip to content

Commit

Permalink
Don't check range
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali committed Feb 14, 2023
1 parent 3d9dd8e commit 930d1fc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions submodules/Stripe/Sources/STPCardValidator.m
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ + (STPCardValidationState)validationStateForNumber:(nonnull NSString *)cardNumbe
if (sanitizedNumber.length == 0) {
return STPCardValidationStateIncomplete;
}
STPBINRange *binRange = [STPBINRange mostSpecificBINRangeForNumber:sanitizedNumber];

BOOL isValidLuhn = [self stringIsValidLuhn:sanitizedNumber];
return isValidLuhn ? STPCardValidationStateValid : STPCardValidationStateInvalid;

/*STPBINRange *binRange = [STPBINRange mostSpecificBINRangeForNumber:sanitizedNumber];
if (binRange.brand == STPCardBrandUnknown && validatingCardBrand) {
return STPCardValidationStateInvalid;
}
Expand All @@ -163,7 +167,7 @@ + (STPCardValidationState)validationStateForNumber:(nonnull NSString *)cardNumbe
return STPCardValidationStateInvalid;
} else {
return STPCardValidationStateIncomplete;
}
}*/
}

+ (STPCardValidationState)validationStateForCard:(nonnull STPCardParams *)card inCurrentYear:(NSInteger)currentYear currentMonth:(NSInteger)currentMonth {
Expand Down

0 comments on commit 930d1fc

Please sign in to comment.