From d4d2e7001fe29c860e52d13eef791c4561d9fb62 Mon Sep 17 00:00:00 2001 From: Oleg Tverdokhleb Date: Fri, 3 Apr 2020 13:06:18 +0300 Subject: [PATCH 1/2] [MOC-386] Restrict expiry date validation to 01/20 --- .../Private/Services/CardService.swift | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/YandexCheckoutPayments/Private/Services/CardService.swift b/YandexCheckoutPayments/Private/Services/CardService.swift index d1ee9dc5..08d22f95 100644 --- a/YandexCheckoutPayments/Private/Services/CardService.swift +++ b/YandexCheckoutPayments/Private/Services/CardService.swift @@ -101,9 +101,18 @@ extension CardService { guard let month = components.month, month <= 12, month > 0 else { throw ValidationError.invalidMonth } guard let expiryDate = components.date else { throw ValidationError.expiryDateEmpty } - let currentDateComponents: DateComponents = Calendar.current.dateComponents([.year, .month], from: Date()) - guard let currentDate = Calendar(identifier: .gregorian).date(from: currentDateComponents) else { - throw ValidationError.expirationDateIsExpired +// let currentDateComponents: DateComponents = Calendar.current.dateComponents([.year, .month], from: Date()) +// guard let currentDate = Calendar(identifier: .gregorian).date(from: currentDateComponents) else { +// throw ValidationError.expirationDateIsExpired +// } + + guard let currentDate = DateComponents( + calendar: .current, + timeZone: .current, + year: 2020, + month: 1 + ).date else { + throw ValidationError.expiryDateEmpty } if currentDate > expiryDate { From 152c3a3d4f9f6f6b48fe2b45ae03ff87b6acb16d Mon Sep 17 00:00:00 2001 From: Oleg Tverdokhleb Date: Tue, 7 Apr 2020 10:53:23 +0300 Subject: [PATCH 2/2] [NO-TASK] Bump version, update CHANGELOG.md --- CHANGELOG.md | 4 ++++ YandexCheckoutPayments.podspec | 2 +- YandexCheckoutPayments.xcodeproj/project.pbxproj | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd66f18c..c809c90e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Changelog +### 3.3.0 + +1. Убрали ограничение для поля "Срок действия карты" + ### 3.2.0 1. Поддержка `ThreatMetrix iOS SDK 6.0-91 With Bitcode` diff --git a/YandexCheckoutPayments.podspec b/YandexCheckoutPayments.podspec index db976d54..77e33385 100644 --- a/YandexCheckoutPayments.podspec +++ b/YandexCheckoutPayments.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'YandexCheckoutPayments' - s.version = '3.2.0' + s.version = '3.3.0' s.homepage = 'https://github.com/yandex-money/yandex-checkout-payments-swift' s.license = { :type => "MIT", diff --git a/YandexCheckoutPayments.xcodeproj/project.pbxproj b/YandexCheckoutPayments.xcodeproj/project.pbxproj index 86e2427d..93661e94 100644 --- a/YandexCheckoutPayments.xcodeproj/project.pbxproj +++ b/YandexCheckoutPayments.xcodeproj/project.pbxproj @@ -4244,7 +4244,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = ./YandexCheckoutPayments/Public/Resources/Entitlements/YandexCheckoutPaymentsExamplePods.entitlements; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 15; DEVELOPMENT_TEAM = 2752592HU5; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -4316,7 +4316,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = ./YandexCheckoutPayments/Public/Resources/Entitlements/YandexCheckoutPaymentsExamplePods.debug.entitlements; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 15; DEVELOPMENT_TEAM = 2752592HU5; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -4345,7 +4345,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = ./YandexCheckoutPayments/Public/Resources/Entitlements/YandexCheckoutPaymentsExamplePods.inhouse.entitlements; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 15; DEVELOPMENT_TEAM = 2752592HU5; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)",