Skip to content

Commit cab03fa

Browse files
committed
Move CVV setting to property instead of function parameter
1 parent 4885f33 commit cab03fa

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

iphone/Classes/ComLikelysoftCardioModule.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
KrollCallback * _callback;
1414
BOOL paypalLogo;
1515
BOOL cardIOLogo;
16+
BOOL collectCVV;
1617
NSString* locale;
1718
UIColor *guideColor;
1819
}

iphone/Classes/ComLikelysoftCardioModule.m

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ -(void)startup
3939

4040
paypalLogo = YES;
4141
cardIOLogo = NO;
42+
collectCVV = YES;
4243
locale = @"en";
4344

4445
NSLog(@"[INFO] %@ loaded",self);
@@ -112,6 +113,11 @@ -(void)setCardIOLogo:(id)value {
112113
cardIOLogo = [numValue boolValue];
113114
}
114115

116+
-(void)setCollectCVV:(id)value {
117+
NSNumber * numValue = [value retain];
118+
cardIOLogo = [numValue boolValue];
119+
}
120+
115121
-(id)guideColor {
116122
return [[[TiColor alloc] initWithColor:guideColor name:@"#fff"] autorelease];
117123
}
@@ -147,20 +153,12 @@ - (void)scanCard:(id)args {
147153
scanViewController.hideCardIOLogo = !paypalLogo;
148154
scanViewController.useCardIOLogo = cardIOLogo;
149155
scanViewController.languageOrLocale = locale;
156+
scanViewController.collectCVV = collectCVV;
150157

151158
if (guideColor) {
152159
scanViewController.guideColor = guideColor;
153160
}
154-
155-
if([args length]> 1)
156-
{
157-
NSString* isCVVtoShow =[args objectAtIndex:1];
158-
if([isCVVtoShow isEqualToString:@"N"])
159-
scanViewController.collectCVV= NO;
160-
else if([isCVVtoShow isEqualToString:@"Y"])
161-
scanViewController.collectCVV= YES;
162-
}
163-
161+
164162
[[TiApp app] showModalController:scanViewController animated:YES];
165163
}
166164

iphone/manifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
# this is your module manifest and used by Titanium
33
# during compilation, packaging, distribution, etc.
44
#
5-
version: 2.0.1
5+
version: 2.0.2
66
apiversion: 2
77
architectures: armv7 arm64 i386 x86_64
88
description: Appcelerator wrapper for the Card.io credit card scanning library. Use the phone's camera to read credit card numbers and expiration dates.
99
author: Likely Solutions
1010
license: Free
11-
copyright: Copyright (c) 2015 by Likely Solutions
11+
copyright: Copyright (c) 2017 by Likely Solutions
1212

1313
# these should not be edited
1414
name: Card.io

iphone/titanium.xcconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
55
//
66
//
7-
TITANIUM_SDK_VERSION = 5.0.2.GA
7+
TITANIUM_SDK_VERSION = 6.0.3.GA
88

99

1010
//
1111
// THESE SHOULD BE OK GENERALLY AS-IS
1212
//
13-
TITANIUM_SDK = ~/Library/Application Support/Titanium/mobilesdk/osx/5.0.2.GA
13+
TITANIUM_SDK = ~/Library/Application Support/Titanium/mobilesdk/osx/6.0.3.GA
1414
TITANIUM_BASE_SDK = "$(TITANIUM_SDK)/iphone/include"
1515
TITANIUM_BASE_SDK2 = "$(TITANIUM_SDK)/iphone/include/TiCore"
1616
TITANIUM_BASE_SDK3 = "$(TITANIUM_SDK)/iphone/include/JavaScriptCore"

0 commit comments

Comments
 (0)