Skip to content

Commit

Permalink
v1.3.10
Browse files Browse the repository at this point in the history
Креш при сканировании карты #17
  • Loading branch information
Budnikov Vyacheslav committed Mar 10, 2018
1 parent 25778a7 commit f893741
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 28 deletions.
2 changes: 1 addition & 1 deletion ASDKCore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Pod::Spec.new do |s|

s.name = "ASDKCore"
s.version = "1.3.9"
s.version = "1.3.10"
s.summary = "Core library that allows you to use internet acquiring from Tinkoff Bank in your app"
s.description = "Core library that allows you to use internet acquiring from Tinkoff Bank in your app!"

Expand Down
2 changes: 1 addition & 1 deletion ASDKCore/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.3.9</string>
<string>1.3.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion ASDKUI.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ASDKUI"
s.version = "1.3.9"
s.version = "1.3.10"
s.summary = "UI components library for internet acquiring from Tinkoff Bank"
s.description = "UI components library for internet acquiring from Tinkoff Bank!"
s.homepage = "https://www.tinkoff.ru"
Expand Down
2 changes: 1 addition & 1 deletion ASDKUI/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.3.9</string>
<string>1.3.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
7 changes: 2 additions & 5 deletions ASDKUI/Payment/ASDKAttachCardViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -644,15 +644,12 @@ - (void)scanCard
{
__weak typeof(self) weakSelf = self;

[cardScanner scanCardSuccess:^(id<ASDKAcquiringSdkCardRequisites> cardRequisites)
{
NSLog(@"scanned number %@, ecpired date %@", [cardRequisites number], [cardRequisites expireDate]);

[cardScanner scanCardSuccess:^(id<ASDKAcquiringSdkCardRequisites> cardRequisites){
__strong typeof(weakSelf) strongSelf = weakSelf;

if (strongSelf)
{
[strongSelf updateCardRequisitesCellWithCardRequisites:[cardRequisites number] expiredData:[cardRequisites expireDate]];
[strongSelf updateCardRequisitesCellWithCardRequisites:[cardRequisites cardNumber] expiredData:[cardRequisites cardExpireDate]];
}
}
failure:nil
Expand Down
4 changes: 2 additions & 2 deletions ASDKUI/Payment/PaymentFormStarter/ASDKPaymentFormStarter.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

@protocol ASDKAcquiringSdkCardRequisites <NSObject>

- (NSString*)number;
- (NSString*)expireDate;
- (NSString*)cardNumber;
- (NSString*)cardExpireDate;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -901,15 +901,12 @@ - (void)scanCard
{
__weak typeof(self) weakSelf = self;

[cardScanner scanCardSuccess:^(id<ASDKAcquiringSdkCardRequisites> cardRequisites)
{
NSLog(@"scanned number %@, ecpired date %@", [cardRequisites number], [cardRequisites expireDate]);

__strong typeof(weakSelf) strongSelf = weakSelf;

[cardScanner scanCardSuccess:^(id<ASDKAcquiringSdkCardRequisites> cardRequisites) {
__strong typeof(weakSelf) strongSelf = weakSelf;

if (strongSelf)
{
[strongSelf updateCardRequisitesCellWithCardRequisites:cardRequisites.number expiredData:cardRequisites.expireDate];
[strongSelf updateCardRequisitesCellWithCardRequisites:cardRequisites.cardNumber expiredData:cardRequisites.cardExpireDate];
}
}
failure:nil
Expand Down
17 changes: 9 additions & 8 deletions SampleProject/ASDKSampleApp/Source/ASDKCardIOScanner.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@

@interface ASDKCardRequisites: NSObject <ASDKAcquiringSdkCardRequisites>

@property (nonatomic, strong) NSString *scanedCardNumber;
@property (nonatomic, strong) NSString *scanedCardExpiredDate;
@property (nonatomic, copy) NSString *scanedCardNumber;
@property (nonatomic, copy) NSString *scanedCardExpiredDate;

@end

@implementation ASDKCardRequisites

- (NSString *)expireDate
- (NSString *)cardExpireDate
{
return self.scanedCardExpiredDate;
}

- (NSString *)number
- (NSString *)cardNumber
{
return self.scanedCardNumber;
}
Expand All @@ -33,6 +33,7 @@ - (NSString *)number

@interface ASDKCardIOScanner () <CardIOPaymentViewControllerDelegate>

@property (nonatomic, strong) ASDKCardRequisites *cardRequisites;
@property (nonatomic, strong) void (^successBlock)(id<ASDKAcquiringSdkCardRequisites> cardRequisites);
@property (nonatomic, strong) void (^cancelBlock)(void);

Expand Down Expand Up @@ -98,14 +99,14 @@ - (void)userDidProvideCreditCardInfo:(CardIOCreditCardInfo *)info inPaymentViewC
{
if (self.successBlock)
{
ASDKCardRequisites *cardRequisites = [[ASDKCardRequisites alloc] init];
cardRequisites.scanedCardNumber = info.cardNumber;
self.cardRequisites = [[ASDKCardRequisites alloc] init];
self.cardRequisites.scanedCardNumber = info.cardNumber;
if (info.expiryYear > 0 && info.expiryMonth > 0)
{
cardRequisites.scanedCardExpiredDate = [NSString stringWithFormat:@"%02lu/%02lu", (unsigned long)info.expiryMonth, (unsigned long)(info.expiryYear - 2000)];
self.cardRequisites.scanedCardExpiredDate = [NSString stringWithFormat:@"%02lu/%02lu", (unsigned long)info.expiryMonth, (unsigned long)(info.expiryYear - 2000)];
}

self.successBlock(cardRequisites);
self.successBlock(self.cardRequisites);
}

[self closePaymentViewController:paymentViewController];
Expand Down
4 changes: 2 additions & 2 deletions SampleProject/ASDKSampleApp/Supporting files/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.9</string>
<string>1.3.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>61</string>
<string>62</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down

0 comments on commit f893741

Please sign in to comment.