mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Disable local card number validation.
Some cards are reported invalid there that are valid.
This commit is contained in:
@@ -193,11 +193,12 @@ CardValidationResult ValidateCard(const QString &number) {
|
|||||||
}
|
}
|
||||||
const auto range = MostSpecificBinRangeForNumber(sanitized);
|
const auto range = MostSpecificBinRangeForNumber(sanitized);
|
||||||
const auto brand = range.brand;
|
const auto brand = range.brand;
|
||||||
if (sanitized.size() > range.length) {
|
//if (sanitized.size() > range.length) {
|
||||||
return { .state = ValidationState::Invalid, .brand = brand };
|
// return { .state = ValidationState::Invalid, .brand = brand };
|
||||||
} else if (sanitized.size() < range.length) {
|
//} else if (sanitized.size() < range.length) {
|
||||||
return { .state = ValidationState::Incomplete, .brand = brand };
|
// return { .state = ValidationState::Incomplete, .brand = brand };
|
||||||
} else if (!IsValidLuhn(sanitized)) {
|
//} else
|
||||||
|
if (!IsValidLuhn(sanitized)) {
|
||||||
return { .state = ValidationState::Invalid, .brand = brand };
|
return { .state = ValidationState::Invalid, .brand = brand };
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
Reference in New Issue
Block a user