mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-31 01:42:18 +00:00
Merge branch 'beta' of gitlab.com:peter-iakovlev/telegram-ios into beta
This commit is contained in:
commit
4dc2d8372d
@ -68,6 +68,7 @@
|
||||
@[@"492960", @"492960", @13, @(STPCardBrandVisa)],
|
||||
@[@"8600", @"8600", @16, @(STPCardBrandOther)],
|
||||
@[@"9860", @"9860", @16, @(STPCardBrandOther)],
|
||||
@[@"2", @"2", @16, @(STPCardBrandUnknown)],
|
||||
];
|
||||
NSMutableArray *binRanges = [NSMutableArray array];
|
||||
for (NSArray *range in ranges) {
|
||||
|
@ -153,13 +153,14 @@ static NSString * _Nonnull stringByRemovingCharactersFromSet(NSString * _Nonnull
|
||||
return STPCardValidationStateIncomplete;
|
||||
}
|
||||
|
||||
BOOL isValidLuhn = [self stringIsValidLuhn:sanitizedNumber];
|
||||
return isValidLuhn ? STPCardValidationStateValid : STPCardValidationStateInvalid;
|
||||
//BOOL isValidLuhn = [self stringIsValidLuhn:sanitizedNumber];
|
||||
//return isValidLuhn ? STPCardValidationStateValid : STPCardValidationStateInvalid;
|
||||
|
||||
/*STPBINRange *binRange = [STPBINRange mostSpecificBINRangeForNumber:sanitizedNumber];
|
||||
STPBINRange *binRange = [STPBINRange mostSpecificBINRangeForNumber:sanitizedNumber];
|
||||
if (binRange.brand == STPCardBrandUnknown && validatingCardBrand) {
|
||||
return STPCardValidationStateInvalid;
|
||||
//return STPCardValidationStateInvalid;
|
||||
}
|
||||
|
||||
if (sanitizedNumber.length == binRange.length) {
|
||||
BOOL isValidLuhn = [self stringIsValidLuhn:sanitizedNumber];
|
||||
return isValidLuhn ? STPCardValidationStateValid : STPCardValidationStateInvalid;
|
||||
@ -167,7 +168,7 @@ static NSString * _Nonnull stringByRemovingCharactersFromSet(NSString * _Nonnull
|
||||
return STPCardValidationStateInvalid;
|
||||
} else {
|
||||
return STPCardValidationStateIncomplete;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
+ (STPCardValidationState)validationStateForCard:(nonnull STPCardParams *)card inCurrentYear:(NSInteger)currentYear currentMonth:(NSInteger)currentMonth {
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"app": "9.4.2",
|
||||
"app": "9.4.3",
|
||||
"bazel": "5.3.1",
|
||||
"xcode": "14.2"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user