From 930d1fcc46e39830e6d590986a6a838c3ff49e27 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Wed, 15 Feb 2023 01:19:07 +0400 Subject: [PATCH] Don't check range --- submodules/Stripe/Sources/STPCardValidator.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 {