diff --git a/submodules/Stripe/Sources/STPCardValidator.m b/submodules/Stripe/Sources/STPCardValidator.m index 93b8310f6b7..e94e2fb4928 100755 --- a/submodules/Stripe/Sources/STPCardValidator.m +++ b/submodules/Stripe/Sources/STPCardValidator.m @@ -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; } @@ -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 {