Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest changes #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 23 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# OS X
.DS_Store

# Xcode
#ProAtomic
.DS_Store
build/
*.pbxuser
!default.pbxuser
Expand All @@ -16,16 +15,30 @@ build/
*.xcworkspace/xcshareddata/
xcuserstate
*.xcuserdatad/
*.xccheckout
profile
*.moved-aside
DerivedData
.idea/
*.hmap
*.ipa

# Bundler
.bundle

Pods/
Podfile.lock
Podfile.lock

**/AppIcon.appiconset/*.png

# fastlane specific
**/fastlane/report.xml

# deliver temporary files
**/fastlane/Preview.html

# snapshot generated screenshots
**/fastlane/screenshots

# scan temporary files
**/fastlane/test_output

# compilation files
**/fastlane/compilation/

# fastlane .env
**/fastlane/.env
4 changes: 2 additions & 2 deletions Culqi.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

Pod::Spec.new do |s|
s.name = 'Culqi'
s.version = '2.0'
s.version = '2.1.1'
s.summary = 'Recibe pagos con tarjeta de crédito, débito y prepagadas de todas las marcas.'
s.description = 'Acepta pagos con tarjetas de crédito o débito, dándole a tu cliente la experiencia de compra más simple en tu página web y aplicación móvil.'

s.homepage = 'https://www.culqi.com'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Guillermo Sáenz' => '[email protected]' }
s.source = { :git => 'https://github.com/culqi/culqi-ios.git', :tag => s.version.to_s }
s.source = { :git => 'https://github.com/942v/culqi-ios.git', :tag => s.version.to_s }

s.ios.deployment_target = '8.0'

Expand Down
4 changes: 2 additions & 2 deletions Culqi/CLQIssuerIdentificationNumber.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
#import "CLQBaseModelObject.h"

typedef enum : NSUInteger {
CLQCardBrandUnkown,
CLQCardBrandUnknown,
CLQCardBrandVisa,
CLQCardBrandMastercard,
CLQCardBrandAmericanExpress,
CLQCardBrandDinersClub
} CLQCardBrand;

typedef enum : NSUInteger {
CLQCardTypeUnkown,
CLQCardTypeUnknown,
CLQCardTypeCredito,
CLQCardTypeDebito,
CLQCardTypePrepagada
Expand Down
18 changes: 9 additions & 9 deletions Culqi/CLQIssuerIdentificationNumber.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ @implementation CLQIssuerIdentificationNumber (Helpers)

+ (CLQCardBrand)getCardBrandEnumForKey:(NSString *)cardBrand {

if ([cardBrand isEqualToString:@"visa"]) {
if ([cardBrand isEqualToString:@"Visa"]) {
return CLQCardBrandVisa;
}else if ([cardBrand isEqualToString:@"mastercard"]) {
}else if ([cardBrand isEqualToString:@"MasterCard"]) {
return CLQCardBrandMastercard;
}else if ([cardBrand isEqualToString:@"american_express"]) {
}else if ([cardBrand isEqualToString:@"Amex"]) {
return CLQCardBrandAmericanExpress;
}else if ([cardBrand isEqualToString:@"diners_club"]) {
}else if ([cardBrand isEqualToString:@"Diners"]) {
return CLQCardBrandDinersClub;
}

return CLQCardBrandUnkown;
return CLQCardBrandUnknown;
}

+ (NSString *)getCardBrandKeyForEnum:(CLQCardBrand)cardBrand {
Expand All @@ -92,13 +92,13 @@ + (NSString *)getCardBrandKeyForEnum:(CLQCardBrand)cardBrand {
return @"Visa";
break;
case CLQCardBrandMastercard:
return @"mastercard";
return @"MasterCard";
break;
case CLQCardBrandAmericanExpress:
return @"american_express";
return @"Amex";
break;
case CLQCardBrandDinersClub:
return @"diners_club";
return @"Diners";
break;
default:
return NULL;
Expand All @@ -116,7 +116,7 @@ + (CLQCardType)getCardTypeEnumForKey:(NSString *)cardType {
return CLQCardTypePrepagada;
}

return CLQCardTypeUnkown;
return CLQCardTypeUnknown;
}

+ (NSString *)getCardTypeKeyForEnum:(CLQCardType)cardType {
Expand Down
10 changes: 1 addition & 9 deletions Culqi/Culqi.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ @interface Culqi ()

@implementation Culqi

static NSString *CLQCheckoutBaseURLString = @"https://api.culqi.com/v2/";
static NSString *CLQCheckoutBaseURLString = @"https://secure.culqi.com/v2/";

static Culqi *SINGLETON = nil;

Expand All @@ -46,14 +46,6 @@ + (id) allocWithZone:(NSZone *)zone {
return [self sharedInstance];
}

+ (id)copyWithZone:(struct _NSZone *)zone {
return [self sharedInstance];
}

+ (id)mutableCopyWithZone:(struct _NSZone *)zone {
return [self sharedInstance];
}

- (id)copy {
return [[Culqi alloc] init];
}
Expand Down
37 changes: 33 additions & 4 deletions Example/Culqi.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

/* Begin PBXFileReference section */
11D6A93D1D8EA080009379F3 /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = "<group>"; };
226DFFC030ACFD72931D2FBB /* Culqi.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Culqi.podspec; path = ../Culqi.podspec; sourceTree = "<group>"; };
226DFFC030ACFD72931D2FBB /* Culqi.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Culqi.podspec; path = ../Culqi.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
5C01521917EF92D3DB233CF4 /* Pods-Culqi_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Culqi_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Culqi_Example/Pods-Culqi_Example.debug.xcconfig"; sourceTree = "<group>"; };
6003F58A195388D20070C39A /* Culqi_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Culqi_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -247,7 +247,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = CLQ;
LastUpgradeCheck = 0800;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = "Guillermo Saenz";
TargetAttributes = {
6003F589195388D20070C39A = {
Expand Down Expand Up @@ -321,13 +321,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Culqi_Example-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
35016743B07EF9F999A96FDA /* [CP] Copy Pods Resources */ = {
Expand Down Expand Up @@ -366,9 +369,16 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-Culqi_Example/Pods-Culqi_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework",
"${BUILT_PRODUCTS_DIR}/Culqi/Culqi.framework",
"${BUILT_PRODUCTS_DIR}/SVProgressHUD/SVProgressHUD.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Culqi.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SVProgressHUD.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand All @@ -381,13 +391,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Culqi_Tests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -449,14 +462,22 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -494,14 +515,22 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Example/Culqi/CLQViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ - (void)viewDidLoad {

// We start the SDK with our API Key
#warning Don't forget to put your public key. Get it here: https://integ-panel.culqi.com/#/registro
[Culqi setApiKey:nil];
[Culqi setApiKey:@"sssss"];
}

- (void)didReceiveMemoryWarning {
Expand Down
1 change: 0 additions & 1 deletion _Pods.xcodeproj

This file was deleted.