Skip to content

Commit

Permalink
Move CVV setting to property instead of function parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
arskinner committed Apr 28, 2017
1 parent 4885f33 commit cab03fa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
1 change: 1 addition & 0 deletions iphone/Classes/ComLikelysoftCardioModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
KrollCallback * _callback;
BOOL paypalLogo;
BOOL cardIOLogo;
BOOL collectCVV;
NSString* locale;
UIColor *guideColor;
}
Expand Down
18 changes: 8 additions & 10 deletions iphone/Classes/ComLikelysoftCardioModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ -(void)startup

paypalLogo = YES;
cardIOLogo = NO;
collectCVV = YES;
locale = @"en";

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

-(void)setCollectCVV:(id)value {
NSNumber * numValue = [value retain];
cardIOLogo = [numValue boolValue];
}

-(id)guideColor {
return [[[TiColor alloc] initWithColor:guideColor name:@"#fff"] autorelease];
}
Expand Down Expand Up @@ -147,20 +153,12 @@ - (void)scanCard:(id)args {
scanViewController.hideCardIOLogo = !paypalLogo;
scanViewController.useCardIOLogo = cardIOLogo;
scanViewController.languageOrLocale = locale;
scanViewController.collectCVV = collectCVV;

if (guideColor) {
scanViewController.guideColor = guideColor;
}

if([args length]> 1)
{
NSString* isCVVtoShow =[args objectAtIndex:1];
if([isCVVtoShow isEqualToString:@"N"])
scanViewController.collectCVV= NO;
else if([isCVVtoShow isEqualToString:@"Y"])
scanViewController.collectCVV= YES;
}


[[TiApp app] showModalController:scanViewController animated:YES];
}

Expand Down
4 changes: 2 additions & 2 deletions iphone/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 2.0.1
version: 2.0.2
apiversion: 2
architectures: armv7 arm64 i386 x86_64
description: Appcelerator wrapper for the Card.io credit card scanning library. Use the phone's camera to read credit card numbers and expiration dates.
author: Likely Solutions
license: Free
copyright: Copyright (c) 2015 by Likely Solutions
copyright: Copyright (c) 2017 by Likely Solutions

# these should not be edited
name: Card.io
Expand Down
4 changes: 2 additions & 2 deletions iphone/titanium.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
//
//
TITANIUM_SDK_VERSION = 5.0.2.GA
TITANIUM_SDK_VERSION = 6.0.3.GA


//
// THESE SHOULD BE OK GENERALLY AS-IS
//
TITANIUM_SDK = ~/Library/Application Support/Titanium/mobilesdk/osx/5.0.2.GA
TITANIUM_SDK = ~/Library/Application Support/Titanium/mobilesdk/osx/6.0.3.GA
TITANIUM_BASE_SDK = "$(TITANIUM_SDK)/iphone/include"
TITANIUM_BASE_SDK2 = "$(TITANIUM_SDK)/iphone/include/TiCore"
TITANIUM_BASE_SDK3 = "$(TITANIUM_SDK)/iphone/include/JavaScriptCore"
Expand Down

0 comments on commit cab03fa

Please sign in to comment.