diff --git a/.gitignore b/.gitignore index 3c70001..5fc483a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ -# OS X -.DS_Store - # Xcode +#ProAtomic +.DS_Store build/ *.pbxuser !default.pbxuser @@ -16,16 +15,30 @@ build/ *.xcworkspace/xcshareddata/ xcuserstate *.xcuserdatad/ -*.xccheckout profile *.moved-aside DerivedData .idea/ -*.hmap -*.ipa - -# Bundler -.bundle Pods/ -Podfile.lock \ No newline at end of file +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 \ No newline at end of file diff --git a/Culqi.podspec b/Culqi.podspec index 6fb7c4d..8435b24 100644 --- a/Culqi.podspec +++ b/Culqi.podspec @@ -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' => 'gsaenz@proatomicdev.com' } -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' diff --git a/Culqi/CLQIssuerIdentificationNumber.h b/Culqi/CLQIssuerIdentificationNumber.h index cb561c5..7dbb9d8 100644 --- a/Culqi/CLQIssuerIdentificationNumber.h +++ b/Culqi/CLQIssuerIdentificationNumber.h @@ -9,7 +9,7 @@ #import "CLQBaseModelObject.h" typedef enum : NSUInteger { - CLQCardBrandUnkown, + CLQCardBrandUnknown, CLQCardBrandVisa, CLQCardBrandMastercard, CLQCardBrandAmericanExpress, @@ -17,7 +17,7 @@ typedef enum : NSUInteger { } CLQCardBrand; typedef enum : NSUInteger { - CLQCardTypeUnkown, + CLQCardTypeUnknown, CLQCardTypeCredito, CLQCardTypeDebito, CLQCardTypePrepagada diff --git a/Culqi/CLQIssuerIdentificationNumber.m b/Culqi/CLQIssuerIdentificationNumber.m index 5a54d3d..4a70521 100644 --- a/Culqi/CLQIssuerIdentificationNumber.m +++ b/Culqi/CLQIssuerIdentificationNumber.m @@ -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 { @@ -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; @@ -116,7 +116,7 @@ + (CLQCardType)getCardTypeEnumForKey:(NSString *)cardType { return CLQCardTypePrepagada; } - return CLQCardTypeUnkown; + return CLQCardTypeUnknown; } + (NSString *)getCardTypeKeyForEnum:(CLQCardType)cardType { diff --git a/Culqi/Culqi.m b/Culqi/Culqi.m index 236b5eb..8c897cb 100644 --- a/Culqi/Culqi.m +++ b/Culqi/Culqi.m @@ -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; @@ -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]; } diff --git a/Example/Culqi.xcodeproj/project.pbxproj b/Example/Culqi.xcodeproj/project.pbxproj index 6bbb81d..8e765fb 100644 --- a/Example/Culqi.xcodeproj/project.pbxproj +++ b/Example/Culqi.xcodeproj/project.pbxproj @@ -38,7 +38,7 @@ /* Begin PBXFileReference section */ 11D6A93D1D8EA080009379F3 /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = ""; }; - 226DFFC030ACFD72931D2FBB /* Culqi.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Culqi.podspec; path = ../Culqi.podspec; sourceTree = ""; }; + 226DFFC030ACFD72931D2FBB /* Culqi.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Culqi.podspec; path = ../Culqi.podspec; sourceTree = ""; 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 = ""; }; 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; }; @@ -247,7 +247,7 @@ isa = PBXProject; attributes = { CLASSPREFIX = CLQ; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 1010; ORGANIZATIONNAME = "Guillermo Saenz"; TargetAttributes = { 6003F589195388D20070C39A = { @@ -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 */ = { @@ -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; @@ -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 */ @@ -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; @@ -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; diff --git a/Example/Culqi.xcodeproj/xcshareddata/xcschemes/Culqi-Example.xcscheme b/Example/Culqi.xcodeproj/xcshareddata/xcschemes/Culqi-Example.xcscheme index 4a666c6..8670842 100644 --- a/Example/Culqi.xcodeproj/xcshareddata/xcschemes/Culqi-Example.xcscheme +++ b/Example/Culqi.xcodeproj/xcshareddata/xcschemes/Culqi-Example.xcscheme @@ -1,6 +1,6 @@ + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/Culqi/CLQViewController.m b/Example/Culqi/CLQViewController.m index c7371a8..c52a74e 100644 --- a/Example/Culqi/CLQViewController.m +++ b/Example/Culqi/CLQViewController.m @@ -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 { diff --git a/_Pods.xcodeproj b/_Pods.xcodeproj deleted file mode 120000 index 3c5a8e7..0000000 --- a/_Pods.xcodeproj +++ /dev/null @@ -1 +0,0 @@ -Example/Pods/Pods.xcodeproj \ No newline at end of file