├── .gitignore
├── android
└── libs
│ └── card.io-Android-SDK
│ ├── .gitignore
│ ├── .travis.yml
│ ├── LICENSE.md
│ ├── README.md
│ ├── SampleApp
│ ├── .gitignore
│ ├── README.md
│ ├── build.gradle
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── proguard.cfg
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── org
│ │ │ └── my
│ │ │ └── scanExample
│ │ │ └── MyScanActivity.java
│ │ └── res
│ │ ├── layout
│ │ └── main.xml
│ │ ├── values-v11
│ │ └── styles.xml
│ │ ├── values-v21
│ │ └── styles.xml
│ │ └── values
│ │ └── styles.xml
│ ├── aars
│ └── card.io-5.1.0.aar
│ ├── acknowledgements.md
│ └── release_notes.md
├── card_io_utilities.js
├── card_io_view.js
├── index.js
├── ios
├── RCTCardIO.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
├── RCTCardIO
│ ├── RCTCardIOUtilities.h
│ ├── RCTCardIOUtilities.m
│ ├── RCTCardIOView.h
│ └── RCTCardIOView.m
└── libs
│ └── card.io-iOS-SDK
│ ├── .gitignore
│ ├── CardIO.podspec
│ ├── CardIO
│ ├── CardIO.h
│ ├── CardIOCreditCardInfo.h
│ ├── CardIODetectionMode.h
│ ├── CardIOPaymentViewController.h
│ ├── CardIOPaymentViewControllerDelegate.h
│ ├── CardIOUtilities.h
│ ├── CardIOView.h
│ ├── CardIOViewDelegate.h
│ └── libCardIO.a.zip
│ ├── LICENSE.md
│ ├── README.md
│ ├── SampleApp-Swift
│ ├── README.md
│ ├── SampleApp-Swift.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── SampleApp-Swift
│ │ ├── AppDelegate.swift
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.xib
│ │ │ └── Main.storyboard
│ │ ├── Images.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── SampleApp-Swift-Bridging-Header.h
│ │ └── ViewController.swift
│ └── SampleApp-SwiftTests
│ │ ├── Info.plist
│ │ └── SampleApp_SwiftTests.swift
│ ├── SampleApp
│ ├── Default-568h@2x.png
│ ├── README.md
│ ├── ScanExample.xcodeproj
│ │ └── project.pbxproj
│ └── ScanExample
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── ScanExample-Info.plist
│ │ ├── ScanExample-Prefix.pch
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ ├── en.lproj
│ │ ├── InfoPlist.strings
│ │ ├── MainStoryboard_iPad.storyboard
│ │ └── MainStoryboard_iPhone.storyboard
│ │ └── main.m
│ ├── acknowledgments.md
│ └── release_notes.txt
├── package.json
├── readme.md
└── screenshot.png
/.gitignore:
--------------------------------------------------------------------------------
1 | *xcuserdata
2 | .idea/
3 |
4 |
5 | ios/libs/card.io-iOS-SDK/CardIO/libCardIO.a
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/.gitignore:
--------------------------------------------------------------------------------
1 | # Misc
2 | .DS_Store
3 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/.travis.yml:
--------------------------------------------------------------------------------
1 | language: android
2 | jdk: oraclejdk7
3 | env:
4 | matrix:
5 | - ANDROID_TARGET=android-23 ANDROID_ABI=armeabi-v7a
6 | android:
7 | components:
8 | - android-23
9 | - build-tools-23.0.1
10 | - platform-tools
11 | - tools
12 | before_install:
13 | - export ANDROID_HOME=/usr/local/android-sdk
14 | - export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
15 | - echo "sdk.dir=$ANDROID_HOME" > local.properties
16 | script:
17 | - cd SampleApp/
18 | - ./gradlew clean assembleDebug
19 | notifications:
20 | webhooks:
21 | urls:
22 | - secure: ZbnbVXnG+HrsBmYz0kyXk3XogdZ7IU/FhUMKi8ZKa7r+9xKDIpnxwZH2yO+dRffjIGQGzuPChgMtRexwOASp7YwqEkHI8n5donKCzKEJraLA5C9O1bgpam3U8g8wZl8bUY3u+SnYxB2aN1ZIgBxwcDJAlgpC/YM7kDEBDhEQaTY=
23 | on_success: change
24 | on_failure: always
25 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/LICENSE.md:
--------------------------------------------------------------------------------
1 | All interfaces are released under the MIT License:
2 |
3 | The MIT License (MIT)
4 |
5 | Copyright (c) 2013-2014 PayPal
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in
15 | all copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | THE SOFTWARE.
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/README.md:
--------------------------------------------------------------------------------
1 | [](https://travis-ci.org/card-io/card.io-Android-SDK)
2 |
3 | card.io SDK for Android
4 | ========================
5 |
6 | [card.io](https://www.card.io/) provides fast, easy credit card scanning in mobile apps.
7 |
8 | Stay up to date
9 | ---------------
10 |
11 | Please be sure to keep your app up to date with the latest version of the SDK.
12 | All releases follow [semantic versioning](http://semver.org/).
13 |
14 | The latest version is available via `mavenCentral()`. Just add the following dependency:
15 |
16 | ```
17 | compile 'io.card:android-sdk:5.1.0'
18 | ```
19 |
20 | You can receive updates about new versions via a few different channels:
21 |
22 | * Follow [@cardio](https://twitter.com/cardio) (also great to send us feedback)
23 | * Subscribe to our [card-io-sdk-announce](https://groups.google.com/forum/#!forum/card-io-sdk-announce) list.
24 | * "Watch" this GitHub repository
25 |
26 | Also be sure to check and post to the [Stack Overflow card.io tag](http://stackoverflow.com/questions/tagged/card.io).
27 |
28 | Integration instructions
29 | ------------------------
30 |
31 | The information in this guide is enough to get started. For additional details, see our **[javadoc](http://card-io.github.io/card.io-Android-SDK/)**.
32 |
33 | *(Note: in the past, developers needed to sign up at the [card.io site](https://www.card.io) and obtain an* `app token`. *This is no longer required.)*
34 |
35 | ### Requirements for card scanning
36 |
37 | * Rear-facing camera.
38 | * Android SDK version 8 (Android 2.2) or later.
39 | * ARMv7 processor.
40 |
41 | A manual entry fallback mode is provided for devices that do not meet these requirements.
42 |
43 | ### Setup
44 |
45 |
46 | ##### If you use gradle, then add the following dependency from `mavenCentral()`:
47 |
48 | ```
49 | compile 'io.card:android-sdk:5.1.0'
50 | ```
51 |
52 | ##### If you use something other than gradle, then:
53 |
54 | 1. Edit AndroidManifest.xml. We're going to add a few additional items in here:
55 |
56 | ```xml
57 |
58 | ```
59 |
60 | 2. Also in your `` element, make sure the following permissions and features are present:
61 |
62 | ```xml
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | ```
74 |
75 | 3. Within the `` element, add activity entries:
76 |
77 | ```xml
78 |
79 |
80 |
81 | ```
82 |
83 | ##### Note: Before you build in release mode, make sure to adjust your proguard configuration by adding the following to `proguard.cnf`:
84 |
85 | ```
86 | -keep class io.card.**
87 | -keepclassmembers class io.card.** {
88 | *;
89 | }
90 | ```
91 |
92 | ### Sample code (See the SampleApp for an example)
93 |
94 | First, we'll assume that you're going to launch the scanner from a button,
95 | and that you've set the button's `onClick` handler in the layout XML via `android:onClick="onScanPress"`.
96 | Then, add the method as:
97 |
98 | ```java
99 | public void onScanPress(View v) {
100 | Intent scanIntent = new Intent(this, CardIOActivity.class);
101 |
102 | // customize these values to suit your needs.
103 | scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true); // default: false
104 | scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, false); // default: false
105 | scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_POSTAL_CODE, false); // default: false
106 |
107 | // MY_SCAN_REQUEST_CODE is arbitrary and is only used within this activity.
108 | startActivityForResult(scanIntent, MY_SCAN_REQUEST_CODE);
109 | }
110 | ```
111 |
112 | Next, we'll override `onActivityResult()` to get the scan result.
113 |
114 | ```java
115 | @Override
116 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
117 | super.onActivityResult(requestCode, resultCode, data);
118 |
119 | if (requestCode == MY_SCAN_REQUEST_CODE) {
120 | String resultDisplayStr;
121 | if (data != null && data.hasExtra(CardIOActivity.EXTRA_SCAN_RESULT)) {
122 | CreditCard scanResult = data.getParcelableExtra(CardIOActivity.EXTRA_SCAN_RESULT);
123 |
124 | // Never log a raw card number. Avoid displaying it, but if necessary use getFormattedCardNumber()
125 | resultDisplayStr = "Card Number: " + scanResult.getRedactedCardNumber() + "\n";
126 |
127 | // Do something with the raw number, e.g.:
128 | // myService.setCardNumber( scanResult.cardNumber );
129 |
130 | if (scanResult.isExpiryValid()) {
131 | resultDisplayStr += "Expiration Date: " + scanResult.expiryMonth + "/" + scanResult.expiryYear + "\n";
132 | }
133 |
134 | if (scanResult.cvv != null) {
135 | // Never log or display a CVV
136 | resultDisplayStr += "CVV has " + scanResult.cvv.length() + " digits.\n";
137 | }
138 |
139 | if (scanResult.postalCode != null) {
140 | resultDisplayStr += "Postal Code: " + scanResult.postalCode + "\n";
141 | }
142 | }
143 | else {
144 | resultDisplayStr = "Scan was canceled.";
145 | }
146 | // do something with resultDisplayStr, maybe display it in a textView
147 | // resultTextView.setText(resultStr);
148 | }
149 | // else handle other activity results
150 | }
151 | ```
152 |
153 | ### Hints & Tips
154 |
155 | * [Javadocs](http://card-io.github.io/card.io-Android-SDK/) are provided in this repo for a complete reference.
156 | * card.io errors and warnings will be logged to the "card.io" tag.
157 | * If upgrading the card.io SDK, first remove all card.io libraries so that you don't accidentally ship obsolete or unnecessary libraries. The bundled libraries may change.
158 | * Processing images can be memory intensive.
159 | * [Memory Analysis for Android Applications](http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html) provides some useful information about how to track and reduce your app's memory useage.
160 | * card.io recommends the use of [SSL pinning](http://blog.thoughtcrime.org/authenticity-is-broken-in-ssl-but-your-app-ha) when transmitting sensitive information to protect against man-in-the-middle attacks.
161 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the dex VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 |
15 | # Gradle files
16 | .gradle/
17 | build/
18 |
19 | # Local configuration file (sdk path, etc)
20 | local.properties
21 |
22 | # Eclipse settings files
23 | .settings/
24 |
25 | # IntelliJ project files
26 | *.iml
27 | *.ipr
28 | *.iws
29 | .idea/
30 |
31 | # Misc
32 | .DS_Store
33 |
34 | example.keystore
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/README.md:
--------------------------------------------------------------------------------
1 | card.io for Android example
2 | ===========================
3 |
4 | This sample shows how to integrate card.io in Android.
5 |
6 | To give it a try:
7 |
8 | ## With Gradle (modern)
9 |
10 | 1. Clone this repo.
11 | 2. `$ cd SampleApp`
12 | 3. Plug in your device
13 | 4. `$ ./gradlew installDebug`
14 | 5. Run the demo app!
15 |
16 |
17 | That's it!!
18 |
19 | Questions? Comments? Contact us via https://card.io/support.
20 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | mavenCentral()
4 | }
5 | dependencies {
6 | classpath 'com.android.tools.build:gradle:1.3.0'
7 | }
8 | }
9 |
10 | repositories {
11 | mavenCentral()
12 | }
13 |
14 | apply plugin: 'com.android.application'
15 |
16 | android {
17 | compileSdkVersion 23
18 | buildToolsVersion '23.0.1'
19 |
20 | signingConfigs {
21 | myConfig {
22 | storeFile file("example.keystore")
23 | storePassword "abc123"
24 | keyAlias "example-alias"
25 | keyPassword "abc123"
26 | }
27 | }
28 |
29 | buildTypes {
30 | debug {
31 | applicationIdSuffix ".debug"
32 | }
33 |
34 | release {
35 | minifyEnabled true
36 | proguardFile file('proguard.cfg')
37 | signingConfig signingConfigs.myConfig
38 | }
39 | }
40 |
41 | android.applicationVariants.all { variant ->
42 | variant.outputs.each { output ->
43 | def outputFile = output.outputFile
44 | if (outputFile != null && outputFile.name.endsWith('.apk')) {
45 | output.outputFile = new File(outputFile.parent, "card.io-sample-app-${variant.name}.apk")
46 | }
47 | }
48 | }
49 | }
50 |
51 | dependencies {
52 | if (parent != null) {
53 | compile project(':card.io')
54 | } else {
55 | compile 'io.card:android-sdk:5.1.0'
56 | }
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kayla-tech/react-native-card-io/ea4470c53b9438e716d0fe7b8fe18a79675c3d37/android/libs/card.io-Android-SDK/SampleApp/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Nov 26 10:39:47 CST 2014
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-bin.zip
7 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/proguard.cfg:
--------------------------------------------------------------------------------
1 | # If your application, applet, servlet, library, etc., contains enumeration
2 | # classes, you'll have to preserve some special methods. Enumerations were
3 | # introduced in Java 5. The java compiler translates enumerations into classes
4 | # with a special structure. Notably, the classes contain implementations of some
5 | # static methods that the run-time environment accesses by introspection (Isn't
6 | # that just grand? Introspection is the self-modifying code of a new
7 | # generation). You have to specify these explicitly, to make sure they aren't
8 | # removed or obfuscated:
9 |
10 | -keepclassmembers enum * {
11 | public static **[] values();
12 | public static ** valueOf(java.lang.String);
13 | }
14 |
15 | # More complex applications, applets, servlets, libraries, etc., may contain
16 | # classes that are serialized. Depending on the way in which they are used, they
17 | # may require special attention
18 |
19 | -keepclassmembers class * implements java.io.Serializable {
20 | static final long serialVersionUID;
21 | private static final java.io.ObjectStreamField[] serialPersistentFields;
22 | private void writeObject(java.io.ObjectOutputStream);
23 | private void readObject(java.io.ObjectInputStream);
24 | java.lang.Object writeReplace();
25 | java.lang.Object readResolve();
26 | }
27 |
28 | # --- RECOMMENDED ANDROID CONFIG ------------------------------------------
29 |
30 | -keep public class * extends android.app.Activity
31 | -keep public class * extends android.app.Application
32 | -keep public class * extends android.app.Service
33 | -keep public class * extends android.content.BroadcastReceiver
34 | -keep public class * extends android.content.ContentProvider
35 |
36 | -keep public class * extends android.view.View {
37 | public (android.content.Context);
38 | public (android.content.Context, android.util.AttributeSet);
39 | public (android.content.Context, android.util.AttributeSet, int);
40 | public void set*(...);
41 | }
42 |
43 | -keepclasseswithmembers class * {
44 | public (android.content.Context, android.util.AttributeSet);
45 | }
46 |
47 | -keepclasseswithmembers class * {
48 | public (android.content.Context, android.util.AttributeSet, int);
49 | }
50 |
51 | -keepclassmembers class * implements android.os.Parcelable {
52 | static android.os.Parcelable$Creator CREATOR;
53 | }
54 |
55 |
56 | # ---- REQUIRED card.io CONFIG ----------------------------------------
57 | # card.io is a native lib, so anything crossing JNI must not be changed
58 |
59 | # Don't obfuscate DetectionInfo or public fields, since
60 | # it is used by native methods
61 | -keep class io.card.payment.DetectionInfo
62 | -keepclassmembers class io.card.payment.DetectionInfo {
63 | public *;
64 | }
65 |
66 | -keep class io.card.payment.CreditCard
67 | -keep class io.card.payment.CreditCard$1
68 | -keepclassmembers class io.card.payment.CreditCard {
69 | *;
70 | }
71 |
72 | -keepclassmembers class io.card.payment.CardScanner {
73 | *** onEdgeUpdate(...);
74 | }
75 |
76 | # Don't mess with classes with native methods
77 |
78 | -keepclasseswithmembers class * {
79 | native ;
80 | }
81 |
82 | -keepclasseswithmembernames class * {
83 | native ;
84 | }
85 |
86 | -keep public class io.card.payment.* {
87 | public protected *;
88 | }
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
15 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/src/main/java/org/my/scanExample/MyScanActivity.java:
--------------------------------------------------------------------------------
1 | package org.my.scanExample;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.Button;
8 | import android.widget.TextView;
9 |
10 | import io.card.payment.CardIOActivity;
11 | import io.card.payment.CreditCard;
12 |
13 | public class MyScanActivity extends Activity {
14 | final String TAG = getClass().getName();
15 |
16 | private Button scanButton;
17 | private TextView resultTextView;
18 |
19 | private int MY_SCAN_REQUEST_CODE = 100; // arbitrary int
20 |
21 | /**
22 | * Called when the activity is first created.
23 | */
24 | @Override
25 | public void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.main);
28 |
29 | resultTextView = (TextView) findViewById(R.id.resultTextView);
30 | scanButton = (Button) findViewById(R.id.scanButton);
31 |
32 | resultTextView.setText("card.io library version: " + CardIOActivity.sdkVersion() + "\nBuilt: " + CardIOActivity.sdkBuildDate());
33 | }
34 |
35 | @Override
36 | protected void onResume() {
37 | super.onResume();
38 |
39 | if (CardIOActivity.canReadCardWithCamera()) {
40 | scanButton.setText("Scan a credit card with card.io");
41 | } else {
42 | scanButton.setText("Enter credit card information");
43 | }
44 | }
45 |
46 | public void onScanPress(View v) {
47 | // This method is set up as an onClick handler in the layout xml
48 | // e.g. android:onClick="onScanPress"
49 |
50 | Intent scanIntent = new Intent(this, CardIOActivity.class);
51 |
52 | // customize these values to suit your needs.
53 | scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true); // default: false
54 | scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, false); // default: false
55 | scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_POSTAL_CODE, false); // default: false
56 |
57 | // hides the manual entry button
58 | // if set, developers should provide their own manual entry mechanism in the app
59 | scanIntent.putExtra(CardIOActivity.EXTRA_SUPPRESS_MANUAL_ENTRY, false); // default: false
60 |
61 | // matches the theme of your application
62 | scanIntent.putExtra(CardIOActivity.EXTRA_KEEP_APPLICATION_THEME, false); // default: false
63 |
64 | // MY_SCAN_REQUEST_CODE is arbitrary and is only used within this activity.
65 | startActivityForResult(scanIntent, MY_SCAN_REQUEST_CODE);
66 | }
67 |
68 | @Override
69 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
70 | super.onActivityResult(requestCode, resultCode, data);
71 |
72 | String resultStr;
73 | if (data != null && data.hasExtra(CardIOActivity.EXTRA_SCAN_RESULT)) {
74 | CreditCard scanResult = data.getParcelableExtra(CardIOActivity.EXTRA_SCAN_RESULT);
75 |
76 | // Never log a raw card number. Avoid displaying it, but if necessary use getFormattedCardNumber()
77 | resultStr = "Card Number: " + scanResult.getRedactedCardNumber() + "\n";
78 |
79 | // Do something with the raw number, e.g.:
80 | // myService.setCardNumber( scanResult.cardNumber );
81 |
82 | if (scanResult.isExpiryValid()) {
83 | resultStr += "Expiration Date: " + scanResult.expiryMonth + "/" + scanResult.expiryYear + "\n";
84 | }
85 |
86 | if (scanResult.cvv != null) {
87 | // Never log or display a CVV
88 | resultStr += "CVV has " + scanResult.cvv.length() + " digits.\n";
89 | }
90 |
91 | if (scanResult.postalCode != null) {
92 | resultStr += "Postal Code: " + scanResult.postalCode + "\n";
93 | }
94 | } else {
95 | resultStr = "Scan was canceled.";
96 | }
97 | resultTextView.setText(resultStr);
98 |
99 | }
100 | }
101 |
102 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/src/main/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/src/main/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/SampleApp/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/aars/card.io-5.1.0.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kayla-tech/react-native-card-io/ea4470c53b9438e716d0fe7b8fe18a79675c3d37/android/libs/card.io-Android-SDK/aars/card.io-5.1.0.aar
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/acknowledgements.md:
--------------------------------------------------------------------------------
1 | Summary
2 | -------
3 |
4 | card.io's Android SDK uses code (with gratitude!) from Willow Garage's [OpenCV](http://opencv.willowgarage.com/wiki/). The Android SDK is tested with [Robotium](https://code.google.com/p/robotium/).
5 |
6 |
7 | Full license
8 | ------------
9 |
10 | Willow Garage's OpenCV, BSD license:
11 |
12 | Actual license text not provided -- [the OpenCV website](http://opencv.willowgarage.com/wiki/) says "OpenCV is released under a BSD license, it is free for both academic and commercial use.", with links to http://opensource.org/licenses/bsd-license.php and http://en.wikipedia.org/wiki/BSD_licenses
13 |
14 | Robotium's Apache license:
15 |
16 | Actual license text not provided -- [the Robotium website](https://code.google.com/p/robotium/) links to http://www.apache.org/licenses/LICENSE-2.0
--------------------------------------------------------------------------------
/android/libs/card.io-Android-SDK/release_notes.md:
--------------------------------------------------------------------------------
1 | card.io Android SDK change log and release notes
2 | ================================================
3 |
4 | 5.1.0
5 | -----
6 | * Add arm64-v8a processor support [#33-source](https://github.com/card-io/card.io-Android-source/issues/33), [#51](https://github.com/card-io/card.io-Android-SDK/issues/51).
7 | * Add x86 processor support [#26-source](https://github.com/card-io/card.io-Android-source/issues/26).
8 | * Add x86_64 processor support.
9 | * Add support for Android 23 new permission model for the Camera permission [#78](https://github.com/card-io/card.io-Android-SDK/issues/78). When permission is granted, the SDK performs as in previous versions. When permission is or has already been denied, the SDK falls back to manual entry. Note: this SDK does not call the `shouldShowRequestPermissionRationale()` method and does not show a rationale. It is up to the implementor whether or not to show the Camera permission rationale before opening the SDK.
10 | * Populate CardIOActivity.EXTRA_CAPTURED_CARD_IMAGE when confirmation is shown [#10-source](https://github.com/card-io/card.io-Android-source/issues/10).
11 | * Fix issue where setting `EXTRA_KEEP_APPLICATION_THEME` would not create buttons that matched the theme [#24-source](https://github.com/card-io/card.io-Android-source/issues/24).
12 | * Add a default edit text hint color [#22-source](https://github.com/card-io/card.io-Android-source/issues/22).
13 | * Fix leaking IntentReceiver [#76](https://github.com/card-io/card.io-Android-SDK/issues/76).
14 |
15 | 5.0.1
16 | -----
17 | * Prevent screenshots when the app is backgrounded via [FLAG_SECURE](http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE).
18 | * Fix issue where arm64-v8a devices were not allowing the scanning of devices [#62](https://github.com/card-io/card.io-Android-SDK/issues/62)).
19 |
20 | 5.0.0
21 | -----
22 | * Add automatic expiry-scanning.
23 | You can disable this feature via the new `EXTRA_SCAN_EXPIRY` extra of `CardIOActivity`.
24 | Note: Expiry scans will not infrequently fail to obtain the correct expiry date.
25 | We are continuing to work to improve expiry-scanning accuracy.
26 | * Fix crash when the `DataEntryActivity` is missing extras [#19](https://github.com/card-io/card.io-Android-SDK/issues/19)).
27 |
28 | 4.0.2
29 | -----
30 | * Fix crash caused when an application's theme specifies no action bar [#44](https://github.com/card-io/card.io-Android-SDK/issues/44)).
31 | * Use the application theme to define most of the UI's colors.
32 |
33 | 4.0.1
34 | -----
35 | * Minor bug fixes.
36 |
37 | 4.0.0
38 | -----
39 | * Distribute .aar file instead of .jar and .so files
40 | * New extras on `CardIOActivity`
41 | - `EXTRA_SCAN_INSTRUCTIONS`
42 | - `EXTRA_HIDE_CARDIO_LOGO`
43 | - `EXTRA_SCAN_OVERLAY_LAYOUT_ID`
44 | - `EXTRA_SUPPRESS_SCAN`
45 | - `EXTRA_RETURN_CARD_IMAGE`
46 | - `EXTRA_KEEP_APPLICATION_THEME`
47 | - `EXTRA_USE_PAYPAL_ACTIONBAR_ICON`
48 | * Remove deprecated extras and methods in `CardIOActivity`
49 | - `canReadCardWithCamera(Context)` (use `canReadCardWithCamera()` instead)
50 | - `EXTRA_REQUIRE_ZIP` (use `EXTRA_REQUIRE_POSTAL_CODE` instead)
51 | * New extra `EXTRA_CAPTURED_CARD_IMAGE` returned to calling Activity
52 | * New class `BuildConfig`
53 |
54 |
55 | 3.2.0
56 | -----
57 | * Eliminate App Token. Developers no longer need to sign up on the card.io site before using card.io.
58 | * Add Icelandic (is) to our supported localizations. (Thank you, Martin Kaplan!)
59 |
60 | 3.1.6
61 | -----
62 | * Add support for Diners Club and China UnionPay cards.
63 | * Rename zh-Hant_HK -> zh-Hant so that HK is chosen by default for other regions.
64 |
65 | 3.1.5 May 1, 2014
66 | -----------------
67 | * Add Thai (th) to our supported localizations.
68 | * Update PayPal logo.
69 |
70 | 3.1.4 January 3, 2014
71 | ------------------------
72 | * Remove any transparency from guide color
73 | * Add language support for Arabic and Malay
74 |
75 | 3.1.3 October 9, 2013
76 | ------------------------
77 | * Add guide color customization through `CardIOActivity.EXTRA_GUIDE_COLOR`
78 | * Add ability to skip confirmation activity through `CardIOActivity.EXTRA_SUPPRESS_CONFIRMATION`
79 | * Fix camera not recognized issue for some devices
80 |
81 | 3.1.2 - September 16, 2013
82 | ------------------------
83 | * Restrict postal code maximum length
84 | * Add convenience method to localize CardType
85 | * Fix Hebrew phone settings detection bug
86 | * Add SampleApp
87 | * Reverse release_notes order
88 |
89 | 3.1.1 - August 30, 2013
90 | ------------------------
91 | * Update globalization strings for 25 languages/locales
92 |
93 | 3.1.0 - August 13, 2013
94 | ------------------------
95 | * Add translations of all strings into ~20 languages, in addition to American English.
96 | * Translation choice is controlled by `CardIOActivity.EXTRA_LANGUAGE_OR_LOCALE`
97 | * The translations that a few developers had previously created for their own apps will no longer be used by the SDK.
98 | * NOTE: Default language, if not set by your app, will now be based upon the device's current language setting.
99 |
100 | 3.0.8 - July 3, 2013
101 | ---------------------
102 | * Fix pre Android 4.0 hanging issue
103 |
104 | 3.0.7 - July 3, 2013
105 | ---------------------
106 | * Fix rotation issue when starting in landscape mode
107 | * Fix card image disappearing when rotating device in card details screen
108 |
109 | 3.0.6 - June 21, 2013
110 | ---------------------
111 | * Add missing string to internationalization list.
112 | * Add log note when processor is not supported.
113 |
114 | 3.0.5 - May 23, 2013
115 | --------------------
116 | * UI updates
117 | * Don't require portrait for DataEntryActivity
118 | * Fix scanner crash in landscape
119 |
120 | 3.0.4 - May 14, 2013
121 | --------------------
122 | * Fix orientation bugs to support some tablets.
123 | * Use PayPal logo instead of card.io by default. (see javadoc to switch back)
124 |
125 | 3.0.3 - Nov 27, 2012
126 | --------------------
127 | * Fix a couple of NPEs associated with the back button.
128 |
129 | 3.0.2 - Oct 26, 2012
130 | --------------------
131 | * Fix NPE if values/strings.xml is missing from the project.
132 | * Fix native crash if a second scanner is launched from `onActivityResult()` of completion of the first.
133 |
134 | 3.0.1 - Oct 8, 2012
135 | --------------------
136 | * Client side scanning!
137 |
138 | 2.4.3 - Aug 31, 2012
139 | --------------------
140 | * Correct layouts for high resolution cameras & xhdpi displays
141 | * Fix crash on HTC ICS
142 |
143 | 2.4.2 - Aug 23, 2012
144 | --------------------
145 | * Additional null checking.
146 | * Improve private label support.
147 |
148 | 2.4.1 - Aug 22, 2012
149 | --------------------
150 | * Work around a crash in some Qualcomm camera drivers. (e.g. Samsung Galaxy II S running Android 4.0.4)
151 | * Improve efficiency of internal API.
152 |
153 | 2.4 - June 25, 2012
154 | --------------------
155 | * Charges are no longer supported.
156 |
157 | 2.3.3 - June 6, 2012
158 | --------------------
159 | * Fix a bug that caused some mod builds (e.g. CyanogenMod) to hang at the charge screen.
160 | * Fix a problem that could have caused GPS to stay active for longer than necessary.
161 |
162 | 2.3.2 - June 4, 2012
163 | ------------------
164 | * Support scanning in non-NEON ARMv7 devices (e.g. nVidia Tegra2)
165 | * Support manual entry in all other devices. (Including those based on MIPS or x86)
166 | * Fix exception in charge flow caused by users pressing the home button while the charge is processing.
167 |
168 | *************************
169 | IMPORTANT: You should delete libs/*/libcardio*.so from your project directory before unzipping the new SDK. (This library is obsolete and will only make your .apk bigger if it is included.)
170 |
171 | The bundled libraries are:
172 |
173 | libs/card.io.jar
174 | libs/armeabi/libcardioDecider.so
175 | libs/armeabi-v7a/libcardioDecider.so
176 | libs/armeabi-v7a/libcardioRecognizer.so
177 | libs/armeabi-v7a/libcardioRecognizer_tegra2.so
178 | libs/armeabi-v7a/libopencv_core.so
179 | libs/armeabi-v7a/libopencv_imgproc.so
180 | libs/mips/libcardioDecider.so
181 | libs/x86/libcardioDecider.so
182 |
183 | Note that if your app is not targeting x86 or MIPS, you can safely leave out these libraries. However, doing so will cause Google Play to filter out your app for users of those devices.
184 |
185 | *************************
186 |
187 | 2.2.1 - April 20, 2012
188 | --------------------
189 | * Make CardType.getLogoBitmap() a public method.
190 | * Repackage library jar to avoid proguard parsing problems in client apps.
191 | * Fix string display bug in the charge screens.
192 |
193 | 2.2 - April 11, 2012
194 | --------------------
195 |
196 | *************************
197 | IMPORTANT: You should delete libs/armeabi*/libcardio.so from your project directory before unzipping the new SDK. (This library is obsolete and will only make your .apk bigger if it is included.)
198 |
199 | *************************
200 |
201 | * (2.1.2)Fix native library loading bug in Android 4.0.1-4.0.3 that could cause manual entry to be used instead of camera.
202 | * Add capability to suppress manual number entry in scan-only mode.
203 | * Add support for developer provided localization strings in scan-only mode.
204 | * Handle case where device returns locations with a future timestamp that could cause charges to fail.
205 |
206 | 2.1.1 - April 9, 2012
207 | --------------------
208 | * Fix NullPointerException on manual entry press in scan only mode.
209 |
210 | 2.1 - April 4, 2012
211 | --------------------
212 | * Made the charge screens more beautiful.
213 | * Add support for JCB cards.
214 | * Removed first digit card detection from CardType. Use CardType.fromCardNumber(String) instead.
215 | * Remove deprecated CardIOCreditCardResult. Use CreditCard instead.
216 | * Gather additional information for fraud detection.
217 | * Add additional sanity checking for crash prevention.
218 |
219 | 2.0.5 - February 22, 2012
220 | --------------------
221 | * Performance improvements in SSL pinning
222 | * Fix SSL pinning bug in Android 4.0
223 |
224 | 2.0.4 - February 13, 2012
225 | --------------------
226 | * Enhance security with SSL pinning.
227 | * Properly check for the absence of the NEON instruction set in some ARMv7 devices. (Notably those based on nVidia Tegra 2)
228 | * Fix bugs relating to cancel/back.
229 |
230 | 2.0.3 - January 31, 2012
231 | --------------------
232 | * Ensure the library passes detectAll() checks imposed by StrictMode.setThreadPolicy(...) and StrictMode.setVmPolicy(...) as of Android-14.
233 | * Fix a crash caused by using a recycled bitmap when the user goes back after scanning a card.
234 |
235 | 2.0.2 - January 27, 2012
236 | --------------------
237 | * Additional error checking and catching
238 | * Be more explicit about device problems when we fall back to manual entry
239 | * Expose more logging to developers
240 |
241 | 2.0.1 - January 20, 2012
242 | --------------------
243 | * Fix crash caused by certain malformed server responses.
244 | * Add connection status messages to logs.
245 | * Correctly report network type. Fixes problems associated with networks other than WiFi or mobile.
246 |
247 | 2.0 - January 18, 2012
248 | -------------------
249 | * (new!) Support processing charges
250 | * Rename package io.card.scan to io.card.payments
251 | * Refactor scan interface. See https://card.io/resources/javadoc/index.html to see a complete list of deprecated methods & constants.
252 | * Updated HTTPS library for better performance while scanning.
253 | * Fixed crashes in Android 4.0/Ice Cream Sandwich.
254 |
255 | 1.0 - Wednesday, 8/24/2011
256 | -------------------
257 | * First release
258 |
259 |
--------------------------------------------------------------------------------
/card_io_utilities.js:
--------------------------------------------------------------------------------
1 | import { NativeModules } from 'react-native';
2 |
3 | const { CardIOUtilities } = NativeModules;
4 |
5 | export default CardIOUtilities;
--------------------------------------------------------------------------------
/card_io_view.js:
--------------------------------------------------------------------------------
1 | import React, { Component, PropTypes } from 'react';
2 | import { requireNativeComponent, NativeAppEventEmitter } from 'react-native';
3 |
4 | class CardIOView extends Component {
5 | displayName = 'CardIOView';
6 |
7 | statics = {
8 | cardImageAndNumber: 'cardImageAndNumber',
9 | cardImageOnly: 'cardImageOnly',
10 | automatic: 'automatic',
11 | };
12 |
13 | defaultProps = {
14 | didScanCard: () => {},
15 | };
16 |
17 | componentWillMount() {
18 | this._listener = NativeAppEventEmitter.addListener('didScanCard', this.props.didScanCard);
19 | }
20 |
21 | componentWillUnmount() {
22 | if (this._listener) this._listener.remove();
23 | }
24 |
25 | render() {
26 | return ;
27 | }
28 |
29 | _listener = null;
30 | }
31 |
32 | CardIOView.propTypes = {
33 | languageOrLocale: PropTypes.oneOf([
34 | 'ar','da','de','en','en_AU','en_GB','es','es_MX','fr','he','is','it','ja','ko','ms',
35 | 'nb','nl','pl','pt','pt_BR','ru','sv','th','tr','zh-Hans','zh-Hant','zh-Hant_TW',
36 | ]),
37 | guideColor: PropTypes.string,
38 | useCardIOLogo: PropTypes.bool,
39 | hideCardIOLogo: PropTypes.bool,
40 | allowFreelyRotatingCardGuide: PropTypes.bool,
41 | scanInstructions: PropTypes.string,
42 | scanOverlayView: PropTypes.element,
43 | scanExpiry: PropTypes.bool,
44 | scannedImageDuration: PropTypes.number,
45 | detectionMode: PropTypes.oneOf([
46 | 'cardImageAndNumber',
47 | 'cardImageOnly',
48 | 'automatic',
49 | ]),
50 | didScanCard: PropTypes.func,
51 | hidden: PropTypes.bool,
52 | };
53 |
54 | const RCTCardIOView = requireNativeComponent('RCTCardIOView', CardIOView);
55 |
56 | export default CardIOView;
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | import CardIOView from './card_io_view';
2 | import CardIOUtilities from './card_io_utilities';
3 |
4 | export { CardIOView, CardIOUtilities };
--------------------------------------------------------------------------------
/ios/RCTCardIO.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | DB1744231BC0C93A00D02B05 /* RCTCardIOUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = DB1744221BC0C93A00D02B05 /* RCTCardIOUtilities.m */; settings = {ASSET_TAGS = (); }; };
11 | DB1744241BC0D11D00D02B05 /* RCTCardIOUtilities.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DB1744211BC0C93A00D02B05 /* RCTCardIOUtilities.h */; };
12 | DB1E2D4C1BBFB7E500CD5E17 /* libCardIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DB1E2D4B1BBFB7E500CD5E17 /* libCardIO.a */; };
13 | DB1E2D4E1BBFB88800CD5E17 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB1E2D4D1BBFB88800CD5E17 /* UIKit.framework */; };
14 | DB1E2D581BBFB8F800CD5E17 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB1E2D501BBFB8F800CD5E17 /* AudioToolbox.framework */; };
15 | DB1E2D591BBFB8F800CD5E17 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB1E2D511BBFB8F800CD5E17 /* AVFoundation.framework */; };
16 | DB1E2D5A1BBFB8F800CD5E17 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB1E2D521BBFB8F800CD5E17 /* CoreVideo.framework */; };
17 | DB1E2D5B1BBFB8F800CD5E17 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB1E2D531BBFB8F800CD5E17 /* Foundation.framework */; };
18 | DB1E2D5C1BBFB8F800CD5E17 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB1E2D541BBFB8F800CD5E17 /* MobileCoreServices.framework */; };
19 | DB1E2D5D1BBFB8F800CD5E17 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB1E2D551BBFB8F800CD5E17 /* OpenGLES.framework */; };
20 | DB1E2D5E1BBFB8F800CD5E17 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB1E2D561BBFB8F800CD5E17 /* QuartzCore.framework */; };
21 | DB1E2D5F1BBFB8F800CD5E17 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB1E2D571BBFB8F800CD5E17 /* Security.framework */; };
22 | DB1E2D621BBFBA9900CD5E17 /* RCTCardIOView.m in Sources */ = {isa = PBXBuildFile; fileRef = DB1E2D611BBFBA9900CD5E17 /* RCTCardIOView.m */; settings = {ASSET_TAGS = (); }; };
23 | DB1E2D631BBFBD9D00CD5E17 /* RCTCardIOView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DB1E2D601BBFBA9900CD5E17 /* RCTCardIOView.h */; };
24 | DB1E2D651BBFBDDE00CD5E17 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB1E2D641BBFBDDE00CD5E17 /* CoreMedia.framework */; };
25 | DB1E2D671BBFBDEF00CD5E17 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB1E2D661BBFBDEF00CD5E17 /* CoreGraphics.framework */; };
26 | /* End PBXBuildFile section */
27 |
28 | /* Begin PBXCopyFilesBuildPhase section */
29 | DB1E2D341BBFB74A00CD5E17 /* CopyFiles */ = {
30 | isa = PBXCopyFilesBuildPhase;
31 | buildActionMask = 2147483647;
32 | dstPath = "include/$(PRODUCT_NAME)";
33 | dstSubfolderSpec = 16;
34 | files = (
35 | DB1744241BC0D11D00D02B05 /* RCTCardIOUtilities.h in CopyFiles */,
36 | DB1E2D631BBFBD9D00CD5E17 /* RCTCardIOView.h in CopyFiles */,
37 | );
38 | runOnlyForDeploymentPostprocessing = 0;
39 | };
40 | /* End PBXCopyFilesBuildPhase section */
41 |
42 | /* Begin PBXFileReference section */
43 | DB1744211BC0C93A00D02B05 /* RCTCardIOUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTCardIOUtilities.h; sourceTree = ""; };
44 | DB1744221BC0C93A00D02B05 /* RCTCardIOUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTCardIOUtilities.m; sourceTree = ""; };
45 | DB1E2D361BBFB74A00CD5E17 /* libRCTCardIO.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTCardIO.a; sourceTree = BUILT_PRODUCTS_DIR; };
46 | DB1E2D431BBFB7B900CD5E17 /* CardIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CardIO.h; path = "libs/card.io-iOS-SDK/CardIO/CardIO.h"; sourceTree = ""; };
47 | DB1E2D441BBFB7B900CD5E17 /* CardIOCreditCardInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CardIOCreditCardInfo.h; path = "libs/card.io-iOS-SDK/CardIO/CardIOCreditCardInfo.h"; sourceTree = ""; };
48 | DB1E2D451BBFB7B900CD5E17 /* CardIODetectionMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CardIODetectionMode.h; path = "libs/card.io-iOS-SDK/CardIO/CardIODetectionMode.h"; sourceTree = ""; };
49 | DB1E2D461BBFB7B900CD5E17 /* CardIOPaymentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CardIOPaymentViewController.h; path = "libs/card.io-iOS-SDK/CardIO/CardIOPaymentViewController.h"; sourceTree = ""; };
50 | DB1E2D471BBFB7B900CD5E17 /* CardIOPaymentViewControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CardIOPaymentViewControllerDelegate.h; path = "libs/card.io-iOS-SDK/CardIO/CardIOPaymentViewControllerDelegate.h"; sourceTree = ""; };
51 | DB1E2D481BBFB7B900CD5E17 /* CardIOUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CardIOUtilities.h; path = "libs/card.io-iOS-SDK/CardIO/CardIOUtilities.h"; sourceTree = ""; };
52 | DB1E2D491BBFB7B900CD5E17 /* CardIOView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CardIOView.h; path = "libs/card.io-iOS-SDK/CardIO/CardIOView.h"; sourceTree = ""; };
53 | DB1E2D4A1BBFB7B900CD5E17 /* CardIOViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CardIOViewDelegate.h; path = "libs/card.io-iOS-SDK/CardIO/CardIOViewDelegate.h"; sourceTree = ""; };
54 | DB1E2D4B1BBFB7E500CD5E17 /* libCardIO.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCardIO.a; path = "libs/card.io-iOS-SDK/CardIO/libCardIO.a"; sourceTree = ""; };
55 | DB1E2D4D1BBFB88800CD5E17 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
56 | DB1E2D501BBFB8F800CD5E17 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
57 | DB1E2D511BBFB8F800CD5E17 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
58 | DB1E2D521BBFB8F800CD5E17 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
59 | DB1E2D531BBFB8F800CD5E17 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
60 | DB1E2D541BBFB8F800CD5E17 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
61 | DB1E2D551BBFB8F800CD5E17 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
62 | DB1E2D561BBFB8F800CD5E17 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
63 | DB1E2D571BBFB8F800CD5E17 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
64 | DB1E2D601BBFBA9900CD5E17 /* RCTCardIOView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTCardIOView.h; sourceTree = ""; };
65 | DB1E2D611BBFBA9900CD5E17 /* RCTCardIOView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTCardIOView.m; sourceTree = ""; };
66 | DB1E2D641BBFBDDE00CD5E17 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
67 | DB1E2D661BBFBDEF00CD5E17 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
68 | /* End PBXFileReference section */
69 |
70 | /* Begin PBXFrameworksBuildPhase section */
71 | DB1E2D331BBFB74A00CD5E17 /* Frameworks */ = {
72 | isa = PBXFrameworksBuildPhase;
73 | buildActionMask = 2147483647;
74 | files = (
75 | DB1E2D4E1BBFB88800CD5E17 /* UIKit.framework in Frameworks */,
76 | DB1E2D5F1BBFB8F800CD5E17 /* Security.framework in Frameworks */,
77 | DB1E2D5E1BBFB8F800CD5E17 /* QuartzCore.framework in Frameworks */,
78 | DB1E2D5D1BBFB8F800CD5E17 /* OpenGLES.framework in Frameworks */,
79 | DB1E2D5C1BBFB8F800CD5E17 /* MobileCoreServices.framework in Frameworks */,
80 | DB1E2D5B1BBFB8F800CD5E17 /* Foundation.framework in Frameworks */,
81 | DB1E2D5A1BBFB8F800CD5E17 /* CoreVideo.framework in Frameworks */,
82 | DB1E2D651BBFBDDE00CD5E17 /* CoreMedia.framework in Frameworks */,
83 | DB1E2D671BBFBDEF00CD5E17 /* CoreGraphics.framework in Frameworks */,
84 | DB1E2D591BBFB8F800CD5E17 /* AVFoundation.framework in Frameworks */,
85 | DB1E2D581BBFB8F800CD5E17 /* AudioToolbox.framework in Frameworks */,
86 | DB1E2D4C1BBFB7E500CD5E17 /* libCardIO.a in Frameworks */,
87 | );
88 | runOnlyForDeploymentPostprocessing = 0;
89 | };
90 | /* End PBXFrameworksBuildPhase section */
91 |
92 | /* Begin PBXGroup section */
93 | DB1E2D2D1BBFB74A00CD5E17 = {
94 | isa = PBXGroup;
95 | children = (
96 | DB1E2D421BBFB79C00CD5E17 /* CardIO */,
97 | DB1E2D381BBFB74A00CD5E17 /* RCTCardIO */,
98 | DB1E2D4F1BBFB88E00CD5E17 /* Frameworks */,
99 | DB1E2D371BBFB74A00CD5E17 /* Products */,
100 | );
101 | sourceTree = "";
102 | };
103 | DB1E2D371BBFB74A00CD5E17 /* Products */ = {
104 | isa = PBXGroup;
105 | children = (
106 | DB1E2D361BBFB74A00CD5E17 /* libRCTCardIO.a */,
107 | );
108 | name = Products;
109 | sourceTree = "";
110 | };
111 | DB1E2D381BBFB74A00CD5E17 /* RCTCardIO */ = {
112 | isa = PBXGroup;
113 | children = (
114 | DB1E2D601BBFBA9900CD5E17 /* RCTCardIOView.h */,
115 | DB1E2D611BBFBA9900CD5E17 /* RCTCardIOView.m */,
116 | DB1744211BC0C93A00D02B05 /* RCTCardIOUtilities.h */,
117 | DB1744221BC0C93A00D02B05 /* RCTCardIOUtilities.m */,
118 | );
119 | path = RCTCardIO;
120 | sourceTree = "";
121 | };
122 | DB1E2D421BBFB79C00CD5E17 /* CardIO */ = {
123 | isa = PBXGroup;
124 | children = (
125 | DB1E2D4B1BBFB7E500CD5E17 /* libCardIO.a */,
126 | DB1E2D431BBFB7B900CD5E17 /* CardIO.h */,
127 | DB1E2D441BBFB7B900CD5E17 /* CardIOCreditCardInfo.h */,
128 | DB1E2D451BBFB7B900CD5E17 /* CardIODetectionMode.h */,
129 | DB1E2D461BBFB7B900CD5E17 /* CardIOPaymentViewController.h */,
130 | DB1E2D471BBFB7B900CD5E17 /* CardIOPaymentViewControllerDelegate.h */,
131 | DB1E2D481BBFB7B900CD5E17 /* CardIOUtilities.h */,
132 | DB1E2D491BBFB7B900CD5E17 /* CardIOView.h */,
133 | DB1E2D4A1BBFB7B900CD5E17 /* CardIOViewDelegate.h */,
134 | );
135 | name = CardIO;
136 | sourceTree = "";
137 | };
138 | DB1E2D4F1BBFB88E00CD5E17 /* Frameworks */ = {
139 | isa = PBXGroup;
140 | children = (
141 | DB1E2D661BBFBDEF00CD5E17 /* CoreGraphics.framework */,
142 | DB1E2D641BBFBDDE00CD5E17 /* CoreMedia.framework */,
143 | DB1E2D501BBFB8F800CD5E17 /* AudioToolbox.framework */,
144 | DB1E2D511BBFB8F800CD5E17 /* AVFoundation.framework */,
145 | DB1E2D521BBFB8F800CD5E17 /* CoreVideo.framework */,
146 | DB1E2D531BBFB8F800CD5E17 /* Foundation.framework */,
147 | DB1E2D541BBFB8F800CD5E17 /* MobileCoreServices.framework */,
148 | DB1E2D551BBFB8F800CD5E17 /* OpenGLES.framework */,
149 | DB1E2D561BBFB8F800CD5E17 /* QuartzCore.framework */,
150 | DB1E2D571BBFB8F800CD5E17 /* Security.framework */,
151 | DB1E2D4D1BBFB88800CD5E17 /* UIKit.framework */,
152 | );
153 | name = Frameworks;
154 | sourceTree = "";
155 | };
156 | /* End PBXGroup section */
157 |
158 | /* Begin PBXNativeTarget section */
159 | DB1E2D351BBFB74A00CD5E17 /* RCTCardIO */ = {
160 | isa = PBXNativeTarget;
161 | buildConfigurationList = DB1E2D3F1BBFB74A00CD5E17 /* Build configuration list for PBXNativeTarget "RCTCardIO" */;
162 | buildPhases = (
163 | DB1E2D321BBFB74A00CD5E17 /* Sources */,
164 | DB1E2D331BBFB74A00CD5E17 /* Frameworks */,
165 | DB1E2D341BBFB74A00CD5E17 /* CopyFiles */,
166 | );
167 | buildRules = (
168 | );
169 | dependencies = (
170 | );
171 | name = RCTCardIO;
172 | productName = RCTCardIO;
173 | productReference = DB1E2D361BBFB74A00CD5E17 /* libRCTCardIO.a */;
174 | productType = "com.apple.product-type.library.static";
175 | };
176 | /* End PBXNativeTarget section */
177 |
178 | /* Begin PBXProject section */
179 | DB1E2D2E1BBFB74A00CD5E17 /* Project object */ = {
180 | isa = PBXProject;
181 | attributes = {
182 | LastUpgradeCheck = 0700;
183 | ORGANIZATIONNAME = "Kayla Technologies";
184 | TargetAttributes = {
185 | DB1E2D351BBFB74A00CD5E17 = {
186 | CreatedOnToolsVersion = 7.0;
187 | };
188 | };
189 | };
190 | buildConfigurationList = DB1E2D311BBFB74A00CD5E17 /* Build configuration list for PBXProject "RCTCardIO" */;
191 | compatibilityVersion = "Xcode 3.2";
192 | developmentRegion = English;
193 | hasScannedForEncodings = 0;
194 | knownRegions = (
195 | en,
196 | );
197 | mainGroup = DB1E2D2D1BBFB74A00CD5E17;
198 | productRefGroup = DB1E2D371BBFB74A00CD5E17 /* Products */;
199 | projectDirPath = "";
200 | projectRoot = "";
201 | targets = (
202 | DB1E2D351BBFB74A00CD5E17 /* RCTCardIO */,
203 | );
204 | };
205 | /* End PBXProject section */
206 |
207 | /* Begin PBXSourcesBuildPhase section */
208 | DB1E2D321BBFB74A00CD5E17 /* Sources */ = {
209 | isa = PBXSourcesBuildPhase;
210 | buildActionMask = 2147483647;
211 | files = (
212 | DB1744231BC0C93A00D02B05 /* RCTCardIOUtilities.m in Sources */,
213 | DB1E2D621BBFBA9900CD5E17 /* RCTCardIOView.m in Sources */,
214 | );
215 | runOnlyForDeploymentPostprocessing = 0;
216 | };
217 | /* End PBXSourcesBuildPhase section */
218 |
219 | /* Begin XCBuildConfiguration section */
220 | DB1E2D3D1BBFB74A00CD5E17 /* Debug */ = {
221 | isa = XCBuildConfiguration;
222 | buildSettings = {
223 | ALWAYS_SEARCH_USER_PATHS = NO;
224 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
225 | CLANG_CXX_LIBRARY = "libc++";
226 | CLANG_ENABLE_MODULES = YES;
227 | CLANG_ENABLE_OBJC_ARC = YES;
228 | CLANG_WARN_BOOL_CONVERSION = YES;
229 | CLANG_WARN_CONSTANT_CONVERSION = YES;
230 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
231 | CLANG_WARN_EMPTY_BODY = YES;
232 | CLANG_WARN_ENUM_CONVERSION = YES;
233 | CLANG_WARN_INT_CONVERSION = YES;
234 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
235 | CLANG_WARN_UNREACHABLE_CODE = YES;
236 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
237 | COPY_PHASE_STRIP = NO;
238 | DEBUG_INFORMATION_FORMAT = dwarf;
239 | ENABLE_STRICT_OBJC_MSGSEND = YES;
240 | ENABLE_TESTABILITY = YES;
241 | GCC_C_LANGUAGE_STANDARD = gnu99;
242 | GCC_DYNAMIC_NO_PIC = NO;
243 | GCC_NO_COMMON_BLOCKS = YES;
244 | GCC_OPTIMIZATION_LEVEL = 0;
245 | GCC_PREPROCESSOR_DEFINITIONS = (
246 | "DEBUG=1",
247 | "$(inherited)",
248 | );
249 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
250 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
251 | GCC_WARN_UNDECLARED_SELECTOR = YES;
252 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
253 | GCC_WARN_UNUSED_FUNCTION = YES;
254 | GCC_WARN_UNUSED_VARIABLE = YES;
255 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
256 | MTL_ENABLE_DEBUG_INFO = YES;
257 | ONLY_ACTIVE_ARCH = YES;
258 | SDKROOT = iphoneos;
259 | };
260 | name = Debug;
261 | };
262 | DB1E2D3E1BBFB74A00CD5E17 /* Release */ = {
263 | isa = XCBuildConfiguration;
264 | buildSettings = {
265 | ALWAYS_SEARCH_USER_PATHS = NO;
266 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
267 | CLANG_CXX_LIBRARY = "libc++";
268 | CLANG_ENABLE_MODULES = YES;
269 | CLANG_ENABLE_OBJC_ARC = YES;
270 | CLANG_WARN_BOOL_CONVERSION = YES;
271 | CLANG_WARN_CONSTANT_CONVERSION = YES;
272 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
273 | CLANG_WARN_EMPTY_BODY = YES;
274 | CLANG_WARN_ENUM_CONVERSION = YES;
275 | CLANG_WARN_INT_CONVERSION = YES;
276 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
277 | CLANG_WARN_UNREACHABLE_CODE = YES;
278 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
279 | COPY_PHASE_STRIP = NO;
280 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
281 | ENABLE_NS_ASSERTIONS = NO;
282 | ENABLE_STRICT_OBJC_MSGSEND = YES;
283 | GCC_C_LANGUAGE_STANDARD = gnu99;
284 | GCC_NO_COMMON_BLOCKS = YES;
285 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
286 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
287 | GCC_WARN_UNDECLARED_SELECTOR = YES;
288 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
289 | GCC_WARN_UNUSED_FUNCTION = YES;
290 | GCC_WARN_UNUSED_VARIABLE = YES;
291 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
292 | MTL_ENABLE_DEBUG_INFO = NO;
293 | SDKROOT = iphoneos;
294 | VALIDATE_PRODUCT = YES;
295 | };
296 | name = Release;
297 | };
298 | DB1E2D401BBFB74A00CD5E17 /* Debug */ = {
299 | isa = XCBuildConfiguration;
300 | buildSettings = {
301 | HEADER_SEARCH_PATHS = (
302 | "$(inherited)",
303 | "$(SRCROOT)/../../react-native/React/**",
304 | "$(SRCROOT)/node_modules/react-native/React",
305 | );
306 | LIBRARY_SEARCH_PATHS = (
307 | "$(inherited)",
308 | "$(PROJECT_DIR)/libs/card.io-iOS-SDK/CardIO",
309 | );
310 | OTHER_LDFLAGS = (
311 | "-ObjC",
312 | "-lc++",
313 | );
314 | PRODUCT_NAME = "$(TARGET_NAME)";
315 | SKIP_INSTALL = YES;
316 | };
317 | name = Debug;
318 | };
319 | DB1E2D411BBFB74A00CD5E17 /* Release */ = {
320 | isa = XCBuildConfiguration;
321 | buildSettings = {
322 | HEADER_SEARCH_PATHS = (
323 | "$(inherited)",
324 | "$(SRCROOT)/../../react-native/React/**",
325 | "$(SRCROOT)/node_modules/react-native/React",
326 | );
327 | LIBRARY_SEARCH_PATHS = (
328 | "$(inherited)",
329 | "$(PROJECT_DIR)/libs/card.io-iOS-SDK/CardIO",
330 | );
331 | OTHER_LDFLAGS = (
332 | "-ObjC",
333 | "-lc++",
334 | );
335 | PRODUCT_NAME = "$(TARGET_NAME)";
336 | SKIP_INSTALL = YES;
337 | };
338 | name = Release;
339 | };
340 | /* End XCBuildConfiguration section */
341 |
342 | /* Begin XCConfigurationList section */
343 | DB1E2D311BBFB74A00CD5E17 /* Build configuration list for PBXProject "RCTCardIO" */ = {
344 | isa = XCConfigurationList;
345 | buildConfigurations = (
346 | DB1E2D3D1BBFB74A00CD5E17 /* Debug */,
347 | DB1E2D3E1BBFB74A00CD5E17 /* Release */,
348 | );
349 | defaultConfigurationIsVisible = 0;
350 | defaultConfigurationName = Release;
351 | };
352 | DB1E2D3F1BBFB74A00CD5E17 /* Build configuration list for PBXNativeTarget "RCTCardIO" */ = {
353 | isa = XCConfigurationList;
354 | buildConfigurations = (
355 | DB1E2D401BBFB74A00CD5E17 /* Debug */,
356 | DB1E2D411BBFB74A00CD5E17 /* Release */,
357 | );
358 | defaultConfigurationIsVisible = 0;
359 | defaultConfigurationName = Release;
360 | };
361 | /* End XCConfigurationList section */
362 | };
363 | rootObject = DB1E2D2E1BBFB74A00CD5E17 /* Project object */;
364 | }
365 |
--------------------------------------------------------------------------------
/ios/RCTCardIO.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/RCTCardIO/RCTCardIOUtilities.h:
--------------------------------------------------------------------------------
1 | //
2 | // RCTCardIOUtilities.h
3 | // RCTCardIO
4 | //
5 | // Created by Roger Chapman on 4/10/2015.
6 | // Copyright © 2015 Kayla Technologies. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface RCTCardIOUtilities : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ios/RCTCardIO/RCTCardIOUtilities.m:
--------------------------------------------------------------------------------
1 | //
2 | // RCTCardIOUtilities.m
3 | // RCTCardIO
4 | //
5 | // Created by Roger Chapman on 4/10/2015.
6 | // Copyright © 2015 Kayla Technologies. All rights reserved.
7 | //
8 |
9 | #import "RCTCardIOUtilities.h"
10 | #import "CardIOUtilities.h"
11 | #import "RCTBridge.h"
12 | #import "RCTUtils.h"
13 |
14 | @implementation RCTCardIOUtilities
15 |
16 | RCT_EXPORT_MODULE();
17 |
18 | @synthesize bridge = _bridge;
19 |
20 | - (NSDictionary *)constantsToExport {
21 | NSString *libraryVersion = [CardIOUtilities libraryVersion];
22 | BOOL canReadCardWithCamera = [CardIOUtilities canReadCardWithCamera];
23 | return @{
24 | @"libraryVersion" : (libraryVersion),
25 | @"canReadCardWithCamera": @(canReadCardWithCamera),
26 | };
27 | }
28 |
29 | RCT_EXPORT_METHOD(preload) {
30 | [CardIOUtilities preload];
31 | }
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/ios/RCTCardIO/RCTCardIOView.h:
--------------------------------------------------------------------------------
1 | //
2 | // RCTCardIO.h
3 | // RCTCardIO
4 | //
5 | // Created by Roger Chapman on 3/10/2015.
6 | // Copyright © 2015 Kayla Technologies. All rights reserved.
7 | //
8 |
9 | #import "RCTViewManager.h"
10 | #import "CardIO.h"
11 |
12 | @interface RCTCardIOView : RCTViewManager
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/ios/RCTCardIO/RCTCardIOView.m:
--------------------------------------------------------------------------------
1 | //
2 | // RCTCardIO.m
3 | // RCTCardIO
4 | //
5 | // Created by Roger Chapman on 3/10/2015.
6 | // Copyright © 2015 Kayla Technologies. All rights reserved.
7 | //
8 |
9 | #import "RCTCardIOView.h"
10 | #import "RCTBridge.h"
11 | #import "RCTEventDispatcher.h"
12 |
13 | @implementation RCTConvert (CardIODetectionMode)
14 | RCT_ENUM_CONVERTER(CardIODetectionMode, (@{
15 | @"cardImageAndNumber" : @(CardIODetectionModeCardImageAndNumber),
16 | @"cardImageOnly" : @(CardIODetectionModeCardImageOnly),
17 | @"automatic" : @(CardIODetectionModeAutomatic)
18 | }), CardIODetectionModeCardImageAndNumber, integerValue);
19 | @end
20 |
21 | @implementation RCTCardIOView {
22 | CardIOView *cardIOView;
23 | }
24 |
25 | RCT_EXPORT_MODULE();
26 |
27 | RCT_EXPORT_VIEW_PROPERTY(hidden, BOOL);
28 | RCT_EXPORT_VIEW_PROPERTY(languageOrLocale, NSString);
29 | RCT_EXPORT_VIEW_PROPERTY(guideColor, UIColor);
30 | RCT_EXPORT_VIEW_PROPERTY(useCardIOLogo, BOOL);
31 | RCT_EXPORT_VIEW_PROPERTY(hideCardIOLogo, BOOL);
32 | RCT_EXPORT_VIEW_PROPERTY(allowFreelyRotatingCardGuide, BOOL);
33 | RCT_EXPORT_VIEW_PROPERTY(scanInstructions, NSString);
34 | RCT_EXPORT_VIEW_PROPERTY(scanOverlayView, UIView);
35 | RCT_EXPORT_VIEW_PROPERTY(scanExpiry, BOOL);
36 | RCT_EXPORT_VIEW_PROPERTY(scannedImageDuration, CGFloat);
37 | RCT_EXPORT_VIEW_PROPERTY(detectionMode, CardIODetectionMode);
38 |
39 | static id ObjectOrNull(id object) {
40 | return object ?: [NSNull null];
41 | }
42 |
43 | -(UIView *)view {
44 | cardIOView = [[CardIOView alloc] init];
45 | cardIOView.delegate = self;
46 | return cardIOView;
47 | }
48 |
49 | -(void)cardIOView:(CardIOView *)_cardIOView didScanCard:(CardIOCreditCardInfo *)cardInfo {
50 | NSString *cardType = [CardIOCreditCardInfo displayStringForCardType: cardInfo.cardType
51 | usingLanguageOrLocale: _cardIOView.languageOrLocale];
52 | UIImage *cardLogo = [CardIOCreditCardInfo logoForCardType:cardInfo.cardType];
53 |
54 | [self.bridge.eventDispatcher
55 | sendAppEventWithName:@"didScanCard"
56 | body:@{
57 | @"cardNumber": ObjectOrNull(cardInfo.cardNumber),
58 | @"redactedCardNumber": ObjectOrNull(cardInfo.redactedCardNumber),
59 | @"expiryMonth": ObjectOrNull(@(cardInfo.expiryMonth)),
60 | @"expiryYear": ObjectOrNull(@(cardInfo.expiryYear)),
61 | @"cvv": ObjectOrNull(cardInfo.cvv),
62 | @"postalCode": ObjectOrNull(cardInfo.postalCode),
63 | @"scanned": @(cardInfo.scanned),
64 | @"cardImage": [UIImagePNGRepresentation(cardInfo.cardImage) base64EncodedStringWithOptions:kNilOptions],
65 | @"cardType": cardType,
66 | @"logoForCardType": [UIImagePNGRepresentation(cardLogo) base64EncodedStringWithOptions:kNilOptions]
67 | }];
68 | }
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/.gitignore:
--------------------------------------------------------------------------------
1 | xcschememanagement.plist
2 |
3 | ScanExample.xcscheme
4 |
5 | WorkspaceSettings.xcsettings
6 |
7 | UserInterfaceState.xcuserstate
8 |
9 | .DS_Store
10 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/CardIO.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |spec|
2 | spec.name = 'CardIO'
3 | spec.version = '5.2.0'
4 | spec.license = { type: 'MIT', file: 'LICENSE.md' }
5 | spec.homepage = 'https://www.card.io'
6 | spec.authors = { 'CardIO' => 'support@paypal.com' }
7 | spec.summary = 'Credit card scanning for mobile apps'
8 | spec.social_media_url = 'https://twitter.com/cardio'
9 | spec.source = { :git => 'https://github.com/card-io/card.io-iOS-SDK.git', :tag => "#{spec.version}" }
10 | spec.platform = :ios, '6.1'
11 | spec.ios.deployment_target = '6.1'
12 | spec.requires_arc = true
13 | spec.source_files = 'CardIO/*.h'
14 | spec.frameworks = 'AVFoundation', 'AudioToolbox', 'CoreMedia', 'CoreVideo', 'MobileCoreServices', 'OpenGLES', 'QuartzCore', 'Security', 'UIKit'
15 | spec.libraries = 'c++'
16 | spec.vendored_libraries = 'CardIO/libCardIO.a'
17 | spec.prepare_command = <<-CMD
18 | [ -f CardIO/libCardIO.a ] && rm CardIO/libCardIO.a
19 | unzip -d CardIO/ CardIO/libCardIO.a.zip
20 | CMD
21 | end
22 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/CardIO/CardIO.h:
--------------------------------------------------------------------------------
1 | //
2 | // CardIO.h
3 | // Version 5.2.0
4 | //
5 | // See the file "LICENSE.md" for the full license governing this code.
6 | //
7 |
8 | // All-in-one header file for card.io sdk.
9 | #import "CardIOCreditCardInfo.h"
10 | #import "CardIODetectionMode.h"
11 | #import "CardIOView.h"
12 | #import "CardIOViewDelegate.h"
13 | #import "CardIOPaymentViewController.h"
14 | #import "CardIOPaymentViewControllerDelegate.h"
15 | #import "CardIOUtilities.h"
16 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/CardIO/CardIOCreditCardInfo.h:
--------------------------------------------------------------------------------
1 | //
2 | // CardIOCreditCardInfo.h
3 | // Version 5.2.0
4 | //
5 | // See the file "LICENSE.md" for the full license governing this code.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | /// CardIOCreditCardType Identifies type of card.
12 | typedef NS_ENUM(NSInteger, CardIOCreditCardType) {
13 | /// The card number does not correspond to any recognizable card type.
14 | CardIOCreditCardTypeUnrecognized = 0,
15 | /// The card number corresponds to multiple card types (e.g., when only a few digits have been entered).
16 | CardIOCreditCardTypeAmbiguous = 1,
17 | /// American Express
18 | CardIOCreditCardTypeAmex = '3',
19 | /// Japan Credit Bureau
20 | CardIOCreditCardTypeJCB = 'J',
21 | /// VISA
22 | CardIOCreditCardTypeVisa = '4',
23 | /// MasterCard
24 | CardIOCreditCardTypeMastercard = '5',
25 | /// Discover Card
26 | CardIOCreditCardTypeDiscover = '6'
27 | };
28 |
29 |
30 | /// Container for the information about a card.
31 | @interface CardIOCreditCardInfo : NSObject
32 |
33 | /// Card number.
34 | @property(nonatomic, copy, readwrite) NSString *cardNumber;
35 |
36 | /// Card number with all but the last four digits obfuscated.
37 | @property(nonatomic, copy, readonly) NSString *redactedCardNumber;
38 |
39 | /// January == 1
40 | /// @note expiryMonth & expiryYear may be 0, if expiry information was not requested.
41 | @property(nonatomic, assign, readwrite) NSUInteger expiryMonth;
42 |
43 | /// The full four digit year.
44 | /// @note expiryMonth & expiryYear may be 0, if expiry information was not requested.
45 | @property(nonatomic, assign, readwrite) NSUInteger expiryYear;
46 |
47 | /// Security code (aka CSC, CVV, CVV2, etc.)
48 | /// @note May be nil, if security code was not requested.
49 | @property(nonatomic, copy, readwrite) NSString *cvv;
50 |
51 | /// Postal code. Format is country dependent.
52 | /// @note May be nil, if postal code information was not requested.
53 | @property(nonatomic, copy, readwrite) NSString *postalCode;
54 |
55 | /// Was the card number scanned (as opposed to entered manually)?
56 | @property(nonatomic, assign, readwrite) BOOL scanned;
57 |
58 | /// The rectified card image; usually 428x270.
59 | @property(nonatomic, strong, readwrite) UIImage *cardImage;
60 |
61 | /// Derived from cardNumber.
62 | /// @note CardIOCreditInfo objects returned by either of the delegate methods
63 | /// userDidProvideCreditCardInfo:inPaymentViewController:
64 | /// or cardIOView:didScanCard:
65 | /// will never return a cardType of CardIOCreditCardTypeAmbiguous.
66 | @property(nonatomic, assign, readonly) CardIOCreditCardType cardType;
67 |
68 | /// Convenience method which returns a card type string suitable for display (e.g. "Visa", "American Express", "JCB", "MasterCard", or "Discover").
69 | /// Where appropriate, this string will be translated into the language specified.
70 | /// @param cardType The card type.
71 | /// @param languageOrLocale See CardIOPaymentViewController.h for a detailed explanation of languageOrLocale.
72 | /// @return Card type string suitable for display.
73 | + (NSString *)displayStringForCardType:(CardIOCreditCardType)cardType usingLanguageOrLocale:(NSString *)languageOrLocale;
74 |
75 | /// Returns a 36x25 credit card logo, at a resolution appropriate for the device.
76 | /// @param cardType The card type.
77 | /// @return 36x25 credit card logo.
78 | + (UIImage *)logoForCardType:(CardIOCreditCardType)cardType;
79 |
80 | @end
81 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/CardIO/CardIODetectionMode.h:
--------------------------------------------------------------------------------
1 | //
2 | // CardIODetectionMode.h
3 | // Version 5.2.0
4 | //
5 | // See the file "LICENSE.md" for the full license governing this code.
6 | //
7 | //
8 |
9 | #ifndef icc_CardIODetectionMode_h
10 | #define icc_CardIODetectionMode_h
11 |
12 | typedef NS_ENUM(NSInteger, CardIODetectionMode) {
13 | CardIODetectionModeCardImageAndNumber = 0,
14 | CardIODetectionModeCardImageOnly,
15 | CardIODetectionModeAutomatic
16 | };
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/CardIO/CardIOPaymentViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CardIOPaymentViewController.h
3 | // Version 5.2.0
4 | //
5 | // See the file "LICENSE.md" for the full license governing this code.
6 | //
7 |
8 | #import
9 | #import "CardIOPaymentViewControllerDelegate.h"
10 | #import "CardIODetectionMode.h"
11 |
12 | /// CardIOPaymentViewController is one of two main entry points into the card.io SDK.
13 | /// @see CardIOView
14 | @interface CardIOPaymentViewController : UINavigationController
15 |
16 | /// Initializer for scanning.
17 | /// If scanning is not supported by the user's device, card.io will offer manual entry.
18 | /// @param aDelegate Your CardIOPaymentViewControllerDelegate (typically a UIViewController).
19 | /// @return Properly initialized CardIOPaymentViewController.
20 | - (id)initWithPaymentDelegate:(id)aDelegate;
21 |
22 | /// Initializer for scanning, with extra hooks for controlling whether the camera will
23 | /// be displayed (useful for testing).
24 | /// @param aDelegate Your CardIOPaymentViewControllerDelegate (typically a UIViewController).
25 | /// @param scanningEnabled If scanningEnabled is NO, card.io will offer manual entry,
26 | /// regardless of whether scanning is supported by the user's device.
27 | /// @return Properly initialized CardIOPaymentViewController.
28 | - (id)initWithPaymentDelegate:(id)aDelegate scanningEnabled:(BOOL)scanningEnabled;
29 |
30 | /// The preferred language for all strings appearing in the user interface.
31 | /// If not set, or if set to nil, defaults to the device's current language setting.
32 | ///
33 | /// Can be specified as a language code ("en", "fr", "zh-Hans", etc.) or as a locale ("en_AU", "fr_FR", "zh-Hant_HK", etc.).
34 | /// If card.io does not contain localized strings for a specified locale, then it will fall back to the language. E.g., "es_CO" -> "es".
35 | /// If card.io does not contain localized strings for a specified language, then it will fall back to American English.
36 | ///
37 | /// If you specify only a language code, and that code matches the device's currently preferred language,
38 | /// then card.io will attempt to use the device's current region as well.
39 | /// E.g., specifying "en" on a device set to "English" and "United Kingdom" will result in "en_GB".
40 | ///
41 | /// These localizations are currently included:
42 | /// ar,da,de,en,en_AU,en_GB,es,es_MX,fr,he,is,it,ja,ko,ms,nb,nl,pl,pt,pt_BR,ru,sv,th,tr,zh-Hans,zh-Hant,zh-Hant_TW.
43 | @property(nonatomic, copy, readwrite) NSString *languageOrLocale;
44 |
45 | /// If YES, the status bar's style will be kept as whatever your app has set it to.
46 | /// If NO, the status bar style will be set to the default style.
47 | /// Defaults to NO.
48 | @property(nonatomic, assign, readwrite) BOOL keepStatusBarStyle;
49 |
50 | /// The default appearance of the navigation bar is navigationBarStyle == UIBarStyleDefault;
51 | /// tintColor == nil (pre-iOS 7), barTintColor == nil (iOS 7).
52 | /// Set either or both of these properties if you want to override these defaults.
53 | /// @see navigationBarTintColor
54 | @property(nonatomic, assign, readwrite) UIBarStyle navigationBarStyle;
55 | /// The default appearance of the navigation bar is navigationBarStyle == UIBarStyleDefault;
56 | /// tintColor == nil (pre-iOS 7), barTintColor == nil (iOS 7).
57 | /// Set either or both of these properties if you want to override these defaults.
58 | /// @see navigationBarStyle
59 | @property(nonatomic, retain, readwrite) UIColor *navigationBarTintColor;
60 |
61 | /// Normally, card.io blurs the screen when the app is backgrounded,
62 | /// to obscure card details in the iOS-saved screenshot.
63 | /// If your app already does its own blurring upon backgrounding,
64 | /// you might choose to disable this behavior.
65 | /// Defaults to NO.
66 | @property(nonatomic, assign, readwrite) BOOL disableBlurWhenBackgrounding;
67 |
68 | /// Alter the card guide (bracket) color. Opaque colors recommended.
69 | /// Defaults to nil; if nil, will use card.io green.
70 | @property(nonatomic, retain, readwrite) UIColor *guideColor;
71 |
72 | /// If YES, don't have the user confirm the scanned card, just return the results immediately.
73 | /// Defaults to NO.
74 | @property(nonatomic, assign, readwrite) BOOL suppressScanConfirmation;
75 |
76 | /// If YES, instead of displaying the image of the scanned card,
77 | /// present the manual entry screen with the scanned card number prefilled.
78 | /// Defaults to NO.
79 | @property(nonatomic, assign, readwrite) BOOL suppressScannedCardImage;
80 |
81 | /// After a successful scan, card.io will display an image of the card with
82 | /// the computed card number superimposed. This property controls how long (in seconds)
83 | /// that image will be displayed.
84 | /// Set this to 0.0 to suppress the display entirely.
85 | /// Defaults to 0.1.
86 | @property(nonatomic, assign, readwrite) CGFloat scannedImageDuration;
87 |
88 | /// Mask the card number digits as they are manually entered by the user. Defaults to NO.
89 | @property(nonatomic, assign, readwrite) BOOL maskManualEntryDigits;
90 |
91 | /// Set the scan instruction text. If nil, use the default text. Defaults to nil.
92 | /// Use newlines as desired to control the wrapping of text onto multiple lines.
93 | @property(nonatomic, copy, readwrite) NSString *scanInstructions;
94 |
95 | /// Hide the PayPal or card.io logo in the scan view. Defaults to NO.
96 | @property(nonatomic, assign, readwrite) BOOL hideCardIOLogo;
97 |
98 | /// A custom view that will be overlaid atop the entire scan view. Defaults to nil.
99 | /// If you set a scanOverlayView, be sure to:
100 | ///
101 | /// * Consider rotation. Be sure to test on the iPad with rotation both enabled and disabled.
102 | /// To make rotation synchronization easier, whenever a scanOverlayView is set, and card.io does an
103 | /// in-place rotation (rotates its UI elements relative to their containers), card.io will generate
104 | /// rotation notifications; see CardIOScanningOrientationDidChangeNotification
105 | /// and associated userInfo key documentation below.
106 | /// As with UIKit, the initial rotation is always UIInterfaceOrientationPortrait.
107 | ///
108 | /// * Be sure to pass touches through to the superview as appropriate. Note that the entire camera
109 | /// preview responds to touches (triggers refocusing). Test the light button and the toolbar buttons.
110 | ///
111 | /// * Minimize animations, redrawing, or any other CPU/GPU/memory intensive activities
112 | @property(nonatomic, retain, readwrite) UIView *scanOverlayView;
113 |
114 | /// CardIODetectionModeCardImageAndNumber: the scanner must successfully identify the card number.
115 | /// CardIODetectionModeCardImageOnly: don't scan the card, just detect a credit-card-shaped card.
116 | /// CardIODetectionModeAutomatic: start as CardIODetectionModeCardImageAndNumber, but fall back to
117 | /// CardIODetectionModeCardImageOnly if scanning has not succeeded within a reasonable time.
118 | /// Defaults to CardIODetectionModeCardImageAndNumber.
119 | ///
120 | /// @note Images returned in CardIODetectionModeCardImageOnly mode may be less focused, to accomodate scanning
121 | /// cards that are dominantly white (e.g., the backs of drivers licenses), and thus
122 | /// hard to calculate accurate focus scores for.
123 | @property(nonatomic, assign, readwrite) CardIODetectionMode detectionMode;
124 |
125 | /// Set to NO if you don't need to collect the card expiration. Defaults to YES.
126 | @property(nonatomic, assign, readwrite) BOOL collectExpiry;
127 |
128 | /// Set to NO if you don't need to collect the CVV from the user. Defaults to YES.
129 | @property(nonatomic, assign, readwrite) BOOL collectCVV;
130 |
131 | /// Set to YES if you need to collect the billing postal code. Defaults to NO.
132 | @property(nonatomic, assign, readwrite) BOOL collectPostalCode;
133 |
134 | /// Set to NO if you don't want the camera to try to scan the card expiration.
135 | /// Applies only if collectExpiry is also YES.
136 | /// Defaults to YES.
137 | @property(nonatomic, assign, readwrite) BOOL scanExpiry;
138 |
139 | /// Set to YES to show the card.io logo over the camera view instead of the PayPal logo. Defaults to NO.
140 | @property(nonatomic, assign, readwrite) BOOL useCardIOLogo;
141 |
142 | /// By default, in camera view the card guide and the buttons always rotate to match the device's orientation.
143 | /// All four orientations are permitted, regardless of any app or viewcontroller constraints.
144 | /// If you wish, the card guide and buttons can instead obey standard iOS constraints, including
145 | /// the UISupportedInterfaceOrientations settings in your app's plist.
146 | /// Set to NO to follow standard iOS constraints. Defaults to YES. (Does not affect the manual entry screen.)
147 | @property(nonatomic, assign, readwrite) BOOL allowFreelyRotatingCardGuide;
148 |
149 | /// Set to YES to prevent card.io from showing its "Enter Manually" button. Defaults to NO.
150 | ///
151 | /// @note If [CardIOUtilities canReadCardWithCamera] returns false, then if card.io is presented it will
152 | /// automatically display its manual entry screen.
153 | /// Therefore, if you want to prevent users from *ever* seeing card.io's manual entry screen,
154 | /// you should first check [CardIOUtilities canReadCardWithCamera] before initing the view controller.
155 | @property(nonatomic, assign, readwrite) BOOL disableManualEntryButtons;
156 |
157 | /// Access to the delegate.
158 | @property(nonatomic, weak, readwrite) id paymentDelegate;
159 |
160 | /// Name for orientation change notification.
161 | extern NSString * const CardIOScanningOrientationDidChangeNotification;
162 |
163 | /// userInfo key for orientation change notification, to get the current scanning orientation.
164 | ///
165 | /// Returned as an NSValue wrapping a UIDeviceOrientation. Sample extraction code:
166 | /// @code
167 | /// NSValue *wrappedOrientation = notification.userInfo[CardIOCurrentScanningOrientation];
168 | /// UIDeviceOrientation scanningOrientation = UIDeviceOrientationPortrait; // set a default value just to be safe
169 | /// [wrappedOrientation getValue:&scanningOrientation];
170 | /// // use scanningOrientation...
171 | /// @endcode
172 | extern NSString * const CardIOCurrentScanningOrientation;
173 |
174 | /// userInfo key for orientation change notification, to get the duration of the card.io rotation animations.
175 | ///
176 | /// Returned as an NSNumber wrapping an NSTimeInterval (i.e. a double).
177 | extern NSString * const CardIOScanningOrientationAnimationDuration;
178 |
179 | @end
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/CardIO/CardIOPaymentViewControllerDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // CardIOPaymentViewControllerDelegate.h
3 | // Version 5.2.0
4 | //
5 | // See the file "LICENSE.md" for the full license governing this code.
6 | //
7 |
8 | #import
9 |
10 | @class CardIOPaymentViewController;
11 | @class CardIOCreditCardInfo;
12 |
13 | /// The receiver will be notified when the CardIOPaymentViewController flow completes, due to either success or user-cancellation.
14 | ///
15 | /// Exactly one of these delegate methods will be called.
16 | ///
17 | /// Each of them MUST dismiss the CardIOPaymentViewController.
18 | @protocol CardIOPaymentViewControllerDelegate
19 |
20 | @required
21 |
22 | /// This method will be called if the user cancels the scan. You MUST dismiss paymentViewController.
23 | /// @param paymentViewController The active CardIOPaymentViewController.
24 | - (void)userDidCancelPaymentViewController:(CardIOPaymentViewController *)paymentViewController;
25 |
26 | /// This method will be called when there is a successful scan (or manual entry). You MUST dismiss paymentViewController.
27 | /// @param cardInfo The results of the scan.
28 | /// @param paymentViewController The active CardIOPaymentViewController.
29 | - (void)userDidProvideCreditCardInfo:(CardIOCreditCardInfo *)cardInfo inPaymentViewController:(CardIOPaymentViewController *)paymentViewController;
30 |
31 | @end
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/CardIO/CardIOUtilities.h:
--------------------------------------------------------------------------------
1 | //
2 | // CardIOUtilities.h
3 | // Version 5.2.0
4 | //
5 | // See the file "LICENSE.md" for the full license governing this code.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | @interface CardIOUtilities : NSObject
12 |
13 | /// Please send the output of this method with any technical support requests.
14 | /// @return Human-readable version of this library.
15 | + (NSString *)libraryVersion;
16 |
17 | /// Determine whether this device supports camera-based card scanning, considering
18 | /// factors such as hardware support and OS version.
19 | ///
20 | /// card.io automatically provides manual entry of cards as a fallback,
21 | /// so it is not typically necessary for your app to check this.
22 | ///
23 | /// @return YES iff the user's device supports camera-based card scanning.
24 | + (BOOL)canReadCardWithCamera;
25 |
26 | /// The preload method prepares card.io to launch faster. Calling preload is optional but suggested.
27 | /// On an iPhone 5S, for example, preloading makes card.io launch ~400ms faster.
28 | /// The best time to call preload is when displaying a view from which card.io might be launched;
29 | /// e.g., inside your view controller's viewWillAppear: method.
30 | /// preload works in the background; the call to preload returns immediately.
31 | + (void)preload;
32 |
33 | /// Returns a doubly Gaussian-blurred screenshot, intended for screenshots when backgrounding.
34 | /// @return Blurred screenshot.
35 | + (UIImageView *)blurredScreenImageView;
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/CardIO/CardIOView.h:
--------------------------------------------------------------------------------
1 | //
2 | // CardIOView.h
3 | // Version 5.2.0
4 | //
5 | // See the file "LICENSE.md" for the full license governing this code.
6 | //
7 |
8 | #import
9 | #import "CardIOViewDelegate.h"
10 | #import "CardIODetectionMode.h"
11 |
12 | /// CardIOView is one of two main entry points into the card.io SDK.
13 | /// @see CardIOPaymentViewController
14 | @interface CardIOView : UIView
15 |
16 |
17 | #pragma mark - Properties you MUST set
18 |
19 | /// Typically, your view controller will set itself as this delegate.
20 | @property(nonatomic, weak, readwrite) id delegate;
21 |
22 |
23 | #pragma mark - Properties you MAY set
24 |
25 | /// The preferred language for all strings appearing in the user interface.
26 | /// If not set, or if set to nil, defaults to the device's current language setting.
27 | ///
28 | /// Can be specified as a language code ("en", "fr", "zh-Hans", etc.) or as a locale ("en_AU", "fr_FR", "zh-Hant_HK", etc.).
29 | /// If card.io does not contain localized strings for a specified locale, then it will fall back to the language. E.g., "es_CO" -> "es".
30 | /// If card.io does not contain localized strings for a specified language, then it will fall back to American English.
31 | ///
32 | /// If you specify only a language code, and that code matches the device's currently preferred language,
33 | /// then card.io will attempt to use the device's current region as well.
34 | /// E.g., specifying "en" on a device set to "English" and "United Kingdom" will result in "en_GB".
35 | ///
36 | /// These localizations are currently included:
37 | /// ar,da,de,en,en_AU,en_GB,es,es_MX,fr,he,is,it,ja,ko,ms,nb,nl,pl,pt,pt_BR,ru,sv,th,tr,zh-Hans,zh-Hant,zh-Hant_TW.
38 | @property(nonatomic, copy, readwrite) NSString *languageOrLocale;
39 |
40 | /// Alter the card guide (bracket) color. Opaque colors recommended.
41 | /// Defaults to nil; if nil, will use card.io green.
42 | @property(nonatomic, retain, readwrite) UIColor *guideColor;
43 |
44 | /// Set to YES to show the card.io logo over the camera instead of the PayPal logo. Defaults to NO.
45 | @property(nonatomic, assign, readwrite) BOOL useCardIOLogo;
46 |
47 | /// Hide the PayPal or card.io logo in the scan view. Defaults to NO.
48 | @property(nonatomic, assign, readwrite) BOOL hideCardIOLogo;
49 |
50 | /// By default, in camera view the card guide and the buttons always rotate to match the device's orientation.
51 | /// All four orientations are permitted, regardless of any app or viewcontroller constraints.
52 | /// If you wish, the card guide and buttons can instead obey standard iOS constraints, including
53 | /// the UISupportedInterfaceOrientations settings in your app's plist.
54 | /// Set to NO to follow standard iOS constraints. Defaults to YES. (Does not affect the manual entry screen.)
55 | @property(nonatomic, assign, readwrite) BOOL allowFreelyRotatingCardGuide;
56 |
57 | /// Set the scan instruction text. If nil, use the default text. Defaults to nil.
58 | /// Use newlines as desired to control the wrapping of text onto multiple lines.
59 | @property(nonatomic, copy, readwrite) NSString *scanInstructions;
60 |
61 | /// A custom view that will be overlaid atop the entire scan view. Defaults to nil.
62 | /// If you set a scanOverlayView, be sure to:
63 | ///
64 | /// * Consider rotation. Be sure to test on the iPad with rotation both enabled and disabled.
65 | /// To make rotation synchronization easier, whenever a scanOverlayView is set, and card.io does an
66 | /// in-place rotation (rotates its UI elements relative to their containers), card.io will generate
67 | /// rotation notifications; see CardIOScanningOrientationDidChangeNotification
68 | /// and associated userInfo key documentation below.
69 | /// As with UIKit, the initial rotation is always UIInterfaceOrientationPortrait.
70 | ///
71 | /// * Be sure to pass touches through to the superview as appropriate. Note that the entire camera
72 | /// preview responds to touches (triggers refocusing). Test the light button and the toolbar buttons.
73 | ///
74 | /// * Minimize animations, redrawing, or any other CPU/GPU/memory intensive activities
75 | @property(nonatomic, retain, readwrite) UIView *scanOverlayView;
76 |
77 | /// Set to NO if you don't want the camera to try to scan the card expiration.
78 | /// Defaults to YES.
79 | @property(nonatomic, assign, readwrite) BOOL scanExpiry;
80 |
81 | /// CardIODetectionModeCardImageAndNumber: the scanner must successfully identify the card number.
82 | /// CardIODetectionModeCardImageOnly: don't scan the card, just detect a credit-card-shaped card.
83 | /// CardIODetectionModeAutomatic: start as CardIODetectionModeCardImageAndNumber, but fall back to
84 | /// CardIODetectionModeCardImageOnly if scanning has not succeeded within a reasonable time.
85 | /// Defaults to CardIODetectionModeCardImageAndNumber.
86 | ///
87 | /// @note Images returned in CardIODetectionModeCardImageOnly mode may be less focused, to accomodate scanning
88 | /// cards that are dominantly white (e.g., the backs of drivers licenses), and thus
89 | /// hard to calculate accurate focus scores for.
90 | @property(nonatomic, assign, readwrite) CardIODetectionMode detectionMode;
91 |
92 | /// After a successful scan, the CardIOView will briefly display an image of the card with
93 | /// the computed card number superimposed. This property controls how long (in seconds)
94 | /// that image will be displayed.
95 | /// Set this to 0.0 to suppress the display entirely.
96 | /// Defaults to 1.0.
97 | @property(nonatomic, assign, readwrite) CGFloat scannedImageDuration;
98 |
99 | /// Name for orientation change notification.
100 | extern NSString * const CardIOScanningOrientationDidChangeNotification;
101 |
102 | /// userInfo key for orientation change notification, to get the current scanning orientation.
103 | ///
104 | /// Returned as an NSValue wrapping a UIDeviceOrientation. Sample extraction code:
105 | /// @code
106 | /// NSValue *wrappedOrientation = notification.userInfo[CardIOCurrentScanningOrientation];
107 | /// UIDeviceOrientation scanningOrientation = UIDeviceOrientationPortrait; // set a default value just to be safe
108 | /// [wrappedOrientation getValue:&scanningOrientation];
109 | /// // use scanningOrientation...
110 | /// @endcode
111 | extern NSString * const CardIOCurrentScanningOrientation;
112 |
113 | /// userInfo key for orientation change notification, to get the duration of the card.io rotation animations.
114 | ///
115 | /// Returned as an NSNumber wrapping an NSTimeInterval (i.e. a double).
116 | extern NSString * const CardIOScanningOrientationAnimationDuration;
117 |
118 |
119 | #pragma mark - Property you MAY get
120 |
121 | /// The actual camera preview area within the CardIOView. Location is relative to the CardIOView's origin.
122 | /// You might want to use this, for example, when adjusting your view controller's view layout.
123 | @property(nonatomic, assign, readonly) CGRect cameraPreviewFrame;
124 |
125 | @end
126 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/CardIO/CardIOViewDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // CardIOViewDelegate.h
3 | // Version 5.2.0
4 | //
5 | // See the file "LICENSE.md" for the full license governing this code.
6 | //
7 |
8 | #import
9 |
10 | @class CardIOCreditCardInfo;
11 | @class CardIOView;
12 |
13 | /// The receiver will be notified when the CardIOView completes it work.
14 | @protocol CardIOViewDelegate
15 |
16 | @required
17 |
18 | /// This method will be called when the CardIOView completes its work.
19 | /// It is up to you to hide or remove the CardIOView.
20 | /// At a minimum, you should give the user an opportunity to confirm that the card information was captured correctly.
21 | /// @param cardIOView The active CardIOView.
22 | /// @param cardInfo The results of the scan.
23 | /// @note cardInfo will be nil if exiting due to a problem (e.g., no available camera).
24 | - (void)cardIOView:(CardIOView *)cardIOView didScanCard:(CardIOCreditCardInfo *)cardInfo;
25 |
26 | @end
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/CardIO/libCardIO.a.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kayla-tech/react-native-card-io/ea4470c53b9438e716d0fe7b8fe18a79675c3d37/ios/libs/card.io-iOS-SDK/CardIO/libCardIO.a.zip
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/LICENSE.md:
--------------------------------------------------------------------------------
1 | All header files are released under the MIT License:
2 |
3 | The MIT License (MIT)
4 |
5 | Copyright (c) 2013-2014 eBay Software Foundation
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in
15 | all copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | THE SOFTWARE.
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/README.md:
--------------------------------------------------------------------------------
1 | [](https://www.card.io)
2 |
3 | card.io SDK for iOS
4 | ===================
5 |
6 | [card.io](https://www.card.io/) provides fast, easy credit card scanning in mobile apps.
7 |
8 | > #### *NEW!!! card.io is now an open-source project!*
9 | >
10 | > As of December 2014, all of the source code for card.io is now available at the [card.io-iOS-source repo](https://github.com/card-io/card.io-iOS-source).
11 | >
12 | > ##### What does this mean for you?
13 | >
14 | > * If you simply wish to integrate card.io into your mobile apps, then you can (and probably should) ignore the existence of [card.io-iOS-source](https://github.com/card-io/card.io-iOS-source).
15 | > * But if you're curious about how card.io performs its magic, or if you'd like to improve the appearance or behavior of card.io, then come visit [card.io-iOS-source](https://github.com/card-io/card.io-iOS-source)!
16 |
17 | Brought to you by
18 | [](https://paypal.com/ "PayPal")
19 |
20 |
21 | Stay up to date
22 | ---------------
23 |
24 | Please keep your app up to date with the latest version of the SDK.
25 | All releases follow [semantic versioning](http://semver.org/).
26 |
27 | To receive updates about new versions:
28 |
29 | * Follow [@cardio](https://twitter.com/cardio) (also great to send us feedback)
30 | * Subscribe to our [card-io-sdk-announce](https://groups.google.com/forum/#!forum/card-io-sdk-announce) list
31 | * "Watch" this GitHub repository
32 |
33 | You can find and start technical discussions using the [Stack Overflow card.io tag](http://stackoverflow.com/questions/tagged/card.io).
34 |
35 | Sample app
36 | ----------
37 |
38 | For a quick first look at card.io, we have included a very small sample application that you can build and run.
39 |
40 | 1. Download the latest version of the SDK.
41 | 2. Simply open the `SampleApp` folder or the `SampleApp-Swift` folder and follow the instructions in the `README.md` file you find there.
42 |
43 |
44 | Instructions
45 | ------------
46 |
47 | The card.io iOS SDK includes header files and a single static library. We'll walk you through integration and usage.
48 |
49 | ### Requirements
50 |
51 | * The latest non-beta version of Xcode. (Older or newer versions *might* also work.)
52 | * Supports target deployment of iOS version 6.1+ and instruction set armv7+ (including 64-bit).
53 |
54 | ### Setup
55 |
56 | ##### If you use [CocoaPods](http://cocoapods.org), then add this line to your podfile:
57 |
58 | ```ruby
59 | pod 'CardIO'
60 | ```
61 |
62 | ##### If you don't use CocoaPods, then:
63 |
64 | 1. Download the latest version of the SDK.
65 | 2. Add the CardIO directory (containing several .h files and libCardIO.a) to your Xcode project. You will need to unzip `libCardIO.a.zip` to get the `libCardIO.a`.
66 | 3. In your project's Build Settings (in the `TARGETS` section, not the `PROJECTS` section), add `-lc++` to `Other Linker Flags`.
67 | 4. *Either:*
68 | * Add these frameworks to your project.
69 | [Weak linking](http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html) is supported.
70 | * AudioToolbox
71 | * AVFoundation
72 | * CoreGraphics
73 | * CoreMedia
74 | * CoreVideo
75 | * Foundation
76 | * MobileCoreServices
77 | * OpenGLES
78 | * QuartzCore
79 | * Security
80 | * UIKit
81 | 5. *or:*
82 | * Add only these frameworks to your project (as `Optional` [i.e., weak-linked] libraries):
83 | * AVFoundation
84 | * AudioToolbox
85 | * CoreMedia
86 | * MobileCoreServices
87 | * and confirm that these two Build Settings are both enabled:
88 | * `Enable Modules (C and Objective-C)`
89 | * `Link Frameworks Automatically`
90 |
91 | ##### With or without CocoaPods:
92 |
93 | 1. Add [card.io's open source license acknowledgments](acknowledgments.md) to
94 | [your app's acknowledgments](http://stackoverflow.com/questions/3966116/where-to-put-open-source-credit-information-for-an-iphone-app).
95 | 2. Refer to the header files for more usage options and information.
96 |
97 | ### Sample code
98 |
99 | You can use card.io in two ways:
100 |
101 | * **As a view controller**: *Quick and easy.* Create a `CardIOPaymentViewController` and present it modally. The card.io view controller handles all aspects of the UX, including manual entry as a fallback, all transitions, and number confirmation.
102 |
103 | * **As a view**: *More flexible.* Create a `CardIOView` to do card scanning only and manage everything else yourself. This enables a broader range of presentations, such as in-place transitions, but requires that you handle the rest of the UI yourself.
104 |
105 |
106 | #### Integrate as a View Controller
107 |
108 | Create a class (most likely a subclass of `UIViewController`) that conforms to `CardIOPaymentViewControllerDelegate`.
109 |
110 | ```obj-c
111 | // SomeViewController.h
112 |
113 | #import "CardIO.h"
114 | @interface SomeViewController : UIViewController
115 | // ...
116 | ```
117 |
118 | Make an optional call to speed up the subsequent launch of card.io scanning:
119 |
120 | ```obj-c
121 | // SomeViewController.m
122 |
123 | - (void)viewWillAppear:(BOOL)animated {
124 | [super viewWillAppear:animated];
125 | [CardIOUtilities preload];
126 | }
127 |
128 | ```
129 |
130 | Start card.io card scanning:
131 |
132 | ```obj-c
133 | // SomeViewController.m
134 |
135 | - (IBAction)scanCard:(id)sender {
136 | CardIOPaymentViewController *scanViewController = [[CardIOPaymentViewController alloc] initWithPaymentDelegate:self];
137 | [self presentViewController:scanViewController animated:YES completion:nil];
138 | }
139 | ```
140 |
141 | Write delegate methods to receive the card info or a cancellation:
142 |
143 | ```obj-c
144 | // SomeViewController.m
145 |
146 | - (void)userDidCancelPaymentViewController:(CardIOPaymentViewController *)scanViewController {
147 | NSLog(@"User canceled payment info");
148 | // Handle user cancellation here...
149 | [scanViewController dismissViewControllerAnimated:YES completion:nil];
150 | }
151 |
152 | - (void)userDidProvideCreditCardInfo:(CardIOCreditCardInfo *)info inPaymentViewController:(CardIOPaymentViewController *)scanViewController {
153 | // The full card number is available as info.cardNumber, but don't log that!
154 | NSLog(@"Received card info. Number: %@, expiry: %02i/%i, cvv: %@.", info.redactedCardNumber, info.expiryMonth, info.expiryYear, info.cvv);
155 | // Use the card info...
156 | [scanViewController dismissViewControllerAnimated:YES completion:nil];
157 | }
158 | ```
159 |
160 | #### Integrate as a View
161 |
162 | *CardIOView is new as of card.io Version 3.3.0 (September 2013). We look forward to seeing how creative developers integrate it into their apps. If you do something cool with it, share it with [@cardio](https://twitter.com/cardio)! We also look forward to quickly resolving any issues that you may discover.*
163 |
164 | Create a class (most likely a subclass of `UIViewController`) that conforms to `CardIOViewDelegate`.
165 |
166 | ```obj-c
167 | // SomeViewController.h
168 |
169 | #import "CardIO.h"
170 | @interface SomeViewController : UIViewController
171 | // ...
172 | ```
173 |
174 | Using a CardIOView provides UI flexibility. Here are two sample integration options:
175 |
176 | * Create a CardIOView when you need it, and then delete it when its work is finished.
177 | * Include a hidden CardIOView in your view, show it when you need it, and then hide it when its work is finished.
178 |
179 | ##### Option 1: Create a CardIOView when you need it
180 |
181 | Confirm that the user's device is capable of scanning cards:
182 |
183 | ```obj-c
184 | // SomeViewController.m
185 |
186 | - (void)viewDidLoad {
187 | [super viewDidLoad];
188 |
189 | if (![CardIOUtilities canReadCardWithCamera]) {
190 | // Hide your "Scan Card" button, or take other appropriate action...
191 | }
192 | }
193 | ```
194 |
195 | Make an optional call to speed up the subsequent launch of card.io scanning:
196 |
197 | ```obj-c
198 | // SomeViewController.m
199 |
200 | - (void)viewWillAppear:(BOOL)animated {
201 | [super viewWillAppear:animated];
202 | [CardIOUtilities preload];
203 | }
204 |
205 | ```
206 |
207 | Start card.io card scanning:
208 |
209 | ```obj-c
210 | // SomeViewController.m
211 |
212 | - (IBAction)scanCard:(id)sender {
213 | CardIOView *cardIOView = [[CardIOView alloc] initWithFrame:CGRECT_WITHIN_YOUR_VIEW];
214 | cardIOView.delegate = self;
215 |
216 | [self.view addSubview:cardIOView];
217 | }
218 | ```
219 |
220 | Write the delegate method to receive the results:
221 |
222 | ```obj-c
223 | // SomeViewController.m
224 |
225 | - (void)cardIOView:(CardIOView *)cardIOView didScanCard:(CardIOCreditCardInfo *)info {
226 | if (info) {
227 | // The full card number is available as info.cardNumber, but don't log that!
228 | NSLog(@"Received card info. Number: %@, expiry: %02i/%i, cvv: %@.", info.redactedCardNumber, info.expiryMonth, info.expiryYear, info.cvv);
229 | // Use the card info...
230 | }
231 | else {
232 | NSLog(@"User cancelled payment info");
233 | // Handle user cancellation here...
234 | }
235 |
236 | [cardIOView removeFromSuperview];
237 | }
238 | ```
239 |
240 | Include a method to cancel card scanning:
241 |
242 | ```obj-c
243 | // SomeViewController.m
244 |
245 | - (IBAction)cancelScanCard:(id)sender {
246 | [cardIOView removeFromSuperview];
247 | }
248 | ```
249 |
250 | ##### Option 2: Include a hidden CardIOView in your view
251 |
252 | Make an IBOutlet property:
253 |
254 | ```obj-c
255 | // SomeViewController.m
256 |
257 | @interface SomeViewController ()
258 | @property(nonatomic, strong, readwrite) IBOutlet CardIOView *cardIOView;
259 | @end
260 | ```
261 |
262 | In your .xib, include a CardIOView, mark it as `hidden`, and connect it to the IBOutlet property. (Note: usually you will want to set the background color of the CardIOView to `clearColor`.)
263 |
264 | After confirming that the user's device is capable of scanning cards, set the `delegate` property of the CardIOView:
265 |
266 | ```obj-c
267 | // SomeViewController.m
268 |
269 | - (void)viewDidLoad {
270 | [super viewDidLoad];
271 |
272 | if (![CardIOUtilities canReadCardWithCamera]) {
273 | // Hide your "Scan Card" button, remove the CardIOView from your view, and/or take other appropriate action...
274 | } else {
275 | self.cardIOView.delegate = self;
276 | }
277 | }
278 | ```
279 |
280 | Make an optional call to speed up the subsequent launch of card.io scanning:
281 |
282 | ```obj-c
283 | // SomeViewController.m
284 |
285 | - (void)viewWillAppear:(BOOL)animated {
286 | [super viewWillAppear:animated];
287 | [CardIOUtilities preload];
288 | }
289 |
290 | ```
291 |
292 | Start card.io card scanning:
293 |
294 | ```obj-c
295 | // SomeViewController.m
296 |
297 | - (IBAction)scanCard:(id)sender {
298 | self.cardIOView.hidden = NO;
299 | }
300 | ```
301 |
302 | Write the delegate method to receive the results:
303 |
304 | ```obj-c
305 | // SomeViewController.m
306 |
307 | - (void)cardIOView:(CardIOView *)cardIOView didScanCard:(CardIOCreditCardInfo *)info {
308 | if (info) {
309 | // The full card number is available as info.cardNumber, but don't log that!
310 | NSLog(@"Received card info. Number: %@, expiry: %02i/%i, cvv: %@.", info.redactedCardNumber, info.expiryMonth, info.expiryYear, info.cvv);
311 | // Use the card info...
312 | }
313 | else {
314 | NSLog(@"User canceled payment info");
315 | // Handle user cancellation here...
316 | }
317 |
318 | cardIOView.hidden = YES;
319 | }
320 | ```
321 |
322 | Include a method to cancel card scanning:
323 |
324 | ```obj-c
325 | // SomeViewController.m
326 |
327 | - (IBAction)cancelScanCard:(id)sender {
328 | self.cardIOView.hidden = YES;
329 | }
330 | ```
331 |
332 |
333 | ### Hints & Tips
334 |
335 | * Processing images can be memory intensive, so make sure to test that your app properly handles memory warnings.
336 | * For your users' security, [obscure your app's cached screenshots](https://viaforensics.com/resources/reports/best-practices-ios-android-secure-mobile-development/ios-avoid-cached-application-snapshots/).
337 | **Note:** By default, a `CardIOPaymentViewController` automatically blurs its own screens when the app is backgrounded. A `CardIOView` does not do any automatic blurring.
338 | * The first time that you create either a `CardIOPaymentViewController` or a `CardIOView`, the card.io SDK must load resources, which can result in a noticeable delay. To avoid this delay you may optionally call `[CardIOUtilities preload]` in advance, so that this resource loading occurs in advance on a background thread.
339 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp-Swift/README.md:
--------------------------------------------------------------------------------
1 | Credit card scanning example for iOS card.io
2 | ============================================
3 |
4 | To give this a try:
5 |
6 | 1. Download an archive of [the most recent release](https://github.com/card-io/card.io-iOS-SDK/releases) of the card.io SDK.
7 | 2. Using Xcode 6.0 or newer, open `SampleApp-Swift.xcodeproj`, build and run.
8 |
9 | That's it!!
10 |
11 | Questions? Comments? Email support@card.io
12 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp-Swift/SampleApp-Swift.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | D534F1C71A324F63003C3AB4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D534F1C61A324F63003C3AB4 /* AppDelegate.swift */; };
11 | D534F1C91A324F63003C3AB4 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D534F1C81A324F63003C3AB4 /* ViewController.swift */; };
12 | D534F1CC1A324F63003C3AB4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D534F1CA1A324F63003C3AB4 /* Main.storyboard */; };
13 | D534F1CE1A324F63003C3AB4 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D534F1CD1A324F63003C3AB4 /* Images.xcassets */; };
14 | D534F1D11A324F63003C3AB4 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = D534F1CF1A324F63003C3AB4 /* LaunchScreen.xib */; };
15 | D534F1DD1A324F64003C3AB4 /* SampleApp_SwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D534F1DC1A324F64003C3AB4 /* SampleApp_SwiftTests.swift */; };
16 | D534F1FA1A324F97003C3AB4 /* libCardIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D534F1F91A324F97003C3AB4 /* libCardIO.a */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | D534F1D71A324F63003C3AB4 /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = D534F1B91A324F63003C3AB4 /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = D534F1C01A324F63003C3AB4;
25 | remoteInfo = "SampleApp-Swift";
26 | };
27 | /* End PBXContainerItemProxy section */
28 |
29 | /* Begin PBXFileReference section */
30 | D534F1C11A324F63003C3AB4 /* SampleApp-Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SampleApp-Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; };
31 | D534F1C51A324F63003C3AB4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
32 | D534F1C61A324F63003C3AB4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
33 | D534F1C81A324F63003C3AB4 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
34 | D534F1CB1A324F63003C3AB4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
35 | D534F1CD1A324F63003C3AB4 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
36 | D534F1D01A324F63003C3AB4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
37 | D534F1D61A324F63003C3AB4 /* SampleApp-SwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SampleApp-SwiftTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
38 | D534F1DB1A324F64003C3AB4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
39 | D534F1DC1A324F64003C3AB4 /* SampleApp_SwiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleApp_SwiftTests.swift; sourceTree = ""; };
40 | D534F1F11A324F97003C3AB4 /* CardIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIO.h; sourceTree = ""; };
41 | D534F1F21A324F97003C3AB4 /* CardIOCreditCardInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIOCreditCardInfo.h; sourceTree = ""; };
42 | D534F1F31A324F97003C3AB4 /* CardIODetectionMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIODetectionMode.h; sourceTree = ""; };
43 | D534F1F41A324F97003C3AB4 /* CardIOPaymentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIOPaymentViewController.h; sourceTree = ""; };
44 | D534F1F51A324F97003C3AB4 /* CardIOPaymentViewControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIOPaymentViewControllerDelegate.h; sourceTree = ""; };
45 | D534F1F61A324F97003C3AB4 /* CardIOUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIOUtilities.h; sourceTree = ""; };
46 | D534F1F71A324F97003C3AB4 /* CardIOView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIOView.h; sourceTree = ""; };
47 | D534F1F81A324F97003C3AB4 /* CardIOViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIOViewDelegate.h; sourceTree = ""; };
48 | D534F1F91A324F97003C3AB4 /* libCardIO.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libCardIO.a; sourceTree = ""; };
49 | D5F80D3C1A32507E00338199 /* SampleApp-Swift-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SampleApp-Swift-Bridging-Header.h"; sourceTree = ""; };
50 | /* End PBXFileReference section */
51 |
52 | /* Begin PBXFrameworksBuildPhase section */
53 | D534F1BE1A324F63003C3AB4 /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | D534F1FA1A324F97003C3AB4 /* libCardIO.a in Frameworks */,
58 | );
59 | runOnlyForDeploymentPostprocessing = 0;
60 | };
61 | D534F1D31A324F63003C3AB4 /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | /* End PBXFrameworksBuildPhase section */
69 |
70 | /* Begin PBXGroup section */
71 | D534F1B81A324F63003C3AB4 = {
72 | isa = PBXGroup;
73 | children = (
74 | D534F1F01A324F97003C3AB4 /* CardIO */,
75 | D534F1C31A324F63003C3AB4 /* SampleApp-Swift */,
76 | D534F1D91A324F64003C3AB4 /* SampleApp-SwiftTests */,
77 | D534F1C21A324F63003C3AB4 /* Products */,
78 | );
79 | sourceTree = "";
80 | };
81 | D534F1C21A324F63003C3AB4 /* Products */ = {
82 | isa = PBXGroup;
83 | children = (
84 | D534F1C11A324F63003C3AB4 /* SampleApp-Swift.app */,
85 | D534F1D61A324F63003C3AB4 /* SampleApp-SwiftTests.xctest */,
86 | );
87 | name = Products;
88 | sourceTree = "";
89 | };
90 | D534F1C31A324F63003C3AB4 /* SampleApp-Swift */ = {
91 | isa = PBXGroup;
92 | children = (
93 | D534F1C61A324F63003C3AB4 /* AppDelegate.swift */,
94 | D534F1C81A324F63003C3AB4 /* ViewController.swift */,
95 | D534F1CA1A324F63003C3AB4 /* Main.storyboard */,
96 | D534F1CD1A324F63003C3AB4 /* Images.xcassets */,
97 | D534F1CF1A324F63003C3AB4 /* LaunchScreen.xib */,
98 | D534F1C41A324F63003C3AB4 /* Supporting Files */,
99 | D5F80D3C1A32507E00338199 /* SampleApp-Swift-Bridging-Header.h */,
100 | );
101 | path = "SampleApp-Swift";
102 | sourceTree = "";
103 | };
104 | D534F1C41A324F63003C3AB4 /* Supporting Files */ = {
105 | isa = PBXGroup;
106 | children = (
107 | D534F1C51A324F63003C3AB4 /* Info.plist */,
108 | );
109 | name = "Supporting Files";
110 | sourceTree = "";
111 | };
112 | D534F1D91A324F64003C3AB4 /* SampleApp-SwiftTests */ = {
113 | isa = PBXGroup;
114 | children = (
115 | D534F1DC1A324F64003C3AB4 /* SampleApp_SwiftTests.swift */,
116 | D534F1DA1A324F64003C3AB4 /* Supporting Files */,
117 | );
118 | path = "SampleApp-SwiftTests";
119 | sourceTree = "";
120 | };
121 | D534F1DA1A324F64003C3AB4 /* Supporting Files */ = {
122 | isa = PBXGroup;
123 | children = (
124 | D534F1DB1A324F64003C3AB4 /* Info.plist */,
125 | );
126 | name = "Supporting Files";
127 | sourceTree = "";
128 | };
129 | D534F1F01A324F97003C3AB4 /* CardIO */ = {
130 | isa = PBXGroup;
131 | children = (
132 | D534F1F11A324F97003C3AB4 /* CardIO.h */,
133 | D534F1F21A324F97003C3AB4 /* CardIOCreditCardInfo.h */,
134 | D534F1F31A324F97003C3AB4 /* CardIODetectionMode.h */,
135 | D534F1F41A324F97003C3AB4 /* CardIOPaymentViewController.h */,
136 | D534F1F51A324F97003C3AB4 /* CardIOPaymentViewControllerDelegate.h */,
137 | D534F1F61A324F97003C3AB4 /* CardIOUtilities.h */,
138 | D534F1F71A324F97003C3AB4 /* CardIOView.h */,
139 | D534F1F81A324F97003C3AB4 /* CardIOViewDelegate.h */,
140 | D534F1F91A324F97003C3AB4 /* libCardIO.a */,
141 | );
142 | name = CardIO;
143 | path = ../CardIO;
144 | sourceTree = "";
145 | };
146 | /* End PBXGroup section */
147 |
148 | /* Begin PBXNativeTarget section */
149 | D534F1C01A324F63003C3AB4 /* SampleApp-Swift */ = {
150 | isa = PBXNativeTarget;
151 | buildConfigurationList = D534F1E01A324F64003C3AB4 /* Build configuration list for PBXNativeTarget "SampleApp-Swift" */;
152 | buildPhases = (
153 | A5DFB2B31BBC985E00AA810C /* Unzip libCardIO.a.zip */,
154 | D534F1BD1A324F63003C3AB4 /* Sources */,
155 | D534F1BE1A324F63003C3AB4 /* Frameworks */,
156 | D534F1BF1A324F63003C3AB4 /* Resources */,
157 | );
158 | buildRules = (
159 | );
160 | dependencies = (
161 | );
162 | name = "SampleApp-Swift";
163 | productName = "SampleApp-Swift";
164 | productReference = D534F1C11A324F63003C3AB4 /* SampleApp-Swift.app */;
165 | productType = "com.apple.product-type.application";
166 | };
167 | D534F1D51A324F63003C3AB4 /* SampleApp-SwiftTests */ = {
168 | isa = PBXNativeTarget;
169 | buildConfigurationList = D534F1E31A324F64003C3AB4 /* Build configuration list for PBXNativeTarget "SampleApp-SwiftTests" */;
170 | buildPhases = (
171 | D534F1D21A324F63003C3AB4 /* Sources */,
172 | D534F1D31A324F63003C3AB4 /* Frameworks */,
173 | D534F1D41A324F63003C3AB4 /* Resources */,
174 | );
175 | buildRules = (
176 | );
177 | dependencies = (
178 | D534F1D81A324F63003C3AB4 /* PBXTargetDependency */,
179 | );
180 | name = "SampleApp-SwiftTests";
181 | productName = "SampleApp-SwiftTests";
182 | productReference = D534F1D61A324F63003C3AB4 /* SampleApp-SwiftTests.xctest */;
183 | productType = "com.apple.product-type.bundle.unit-test";
184 | };
185 | /* End PBXNativeTarget section */
186 |
187 | /* Begin PBXProject section */
188 | D534F1B91A324F63003C3AB4 /* Project object */ = {
189 | isa = PBXProject;
190 | attributes = {
191 | LastSwiftMigration = 0700;
192 | LastSwiftUpdateCheck = 0700;
193 | LastUpgradeCheck = 0610;
194 | ORGANIZATIONNAME = "Punskyy, Roman";
195 | TargetAttributes = {
196 | D534F1C01A324F63003C3AB4 = {
197 | CreatedOnToolsVersion = 6.1.1;
198 | };
199 | D534F1D51A324F63003C3AB4 = {
200 | CreatedOnToolsVersion = 6.1.1;
201 | TestTargetID = D534F1C01A324F63003C3AB4;
202 | };
203 | };
204 | };
205 | buildConfigurationList = D534F1BC1A324F63003C3AB4 /* Build configuration list for PBXProject "SampleApp-Swift" */;
206 | compatibilityVersion = "Xcode 3.2";
207 | developmentRegion = English;
208 | hasScannedForEncodings = 0;
209 | knownRegions = (
210 | en,
211 | Base,
212 | );
213 | mainGroup = D534F1B81A324F63003C3AB4;
214 | productRefGroup = D534F1C21A324F63003C3AB4 /* Products */;
215 | projectDirPath = "";
216 | projectRoot = "";
217 | targets = (
218 | D534F1C01A324F63003C3AB4 /* SampleApp-Swift */,
219 | D534F1D51A324F63003C3AB4 /* SampleApp-SwiftTests */,
220 | );
221 | };
222 | /* End PBXProject section */
223 |
224 | /* Begin PBXResourcesBuildPhase section */
225 | D534F1BF1A324F63003C3AB4 /* Resources */ = {
226 | isa = PBXResourcesBuildPhase;
227 | buildActionMask = 2147483647;
228 | files = (
229 | D534F1CC1A324F63003C3AB4 /* Main.storyboard in Resources */,
230 | D534F1D11A324F63003C3AB4 /* LaunchScreen.xib in Resources */,
231 | D534F1CE1A324F63003C3AB4 /* Images.xcassets in Resources */,
232 | );
233 | runOnlyForDeploymentPostprocessing = 0;
234 | };
235 | D534F1D41A324F63003C3AB4 /* Resources */ = {
236 | isa = PBXResourcesBuildPhase;
237 | buildActionMask = 2147483647;
238 | files = (
239 | );
240 | runOnlyForDeploymentPostprocessing = 0;
241 | };
242 | /* End PBXResourcesBuildPhase section */
243 |
244 | /* Begin PBXShellScriptBuildPhase section */
245 | A5DFB2B31BBC985E00AA810C /* Unzip libCardIO.a.zip */ = {
246 | isa = PBXShellScriptBuildPhase;
247 | buildActionMask = 2147483647;
248 | files = (
249 | );
250 | inputPaths = (
251 | );
252 | name = "Unzip libCardIO.a.zip";
253 | outputPaths = (
254 | );
255 | runOnlyForDeploymentPostprocessing = 0;
256 | shellPath = /bin/sh;
257 | shellScript = "[ -f ../CardIO/libCardIO.a ] && rm ../CardIO/libCardIO.a\nunzip -d ../CardIO/ ../CardIO/libCardIO.a.zip";
258 | };
259 | /* End PBXShellScriptBuildPhase section */
260 |
261 | /* Begin PBXSourcesBuildPhase section */
262 | D534F1BD1A324F63003C3AB4 /* Sources */ = {
263 | isa = PBXSourcesBuildPhase;
264 | buildActionMask = 2147483647;
265 | files = (
266 | D534F1C91A324F63003C3AB4 /* ViewController.swift in Sources */,
267 | D534F1C71A324F63003C3AB4 /* AppDelegate.swift in Sources */,
268 | );
269 | runOnlyForDeploymentPostprocessing = 0;
270 | };
271 | D534F1D21A324F63003C3AB4 /* Sources */ = {
272 | isa = PBXSourcesBuildPhase;
273 | buildActionMask = 2147483647;
274 | files = (
275 | D534F1DD1A324F64003C3AB4 /* SampleApp_SwiftTests.swift in Sources */,
276 | );
277 | runOnlyForDeploymentPostprocessing = 0;
278 | };
279 | /* End PBXSourcesBuildPhase section */
280 |
281 | /* Begin PBXTargetDependency section */
282 | D534F1D81A324F63003C3AB4 /* PBXTargetDependency */ = {
283 | isa = PBXTargetDependency;
284 | target = D534F1C01A324F63003C3AB4 /* SampleApp-Swift */;
285 | targetProxy = D534F1D71A324F63003C3AB4 /* PBXContainerItemProxy */;
286 | };
287 | /* End PBXTargetDependency section */
288 |
289 | /* Begin PBXVariantGroup section */
290 | D534F1CA1A324F63003C3AB4 /* Main.storyboard */ = {
291 | isa = PBXVariantGroup;
292 | children = (
293 | D534F1CB1A324F63003C3AB4 /* Base */,
294 | );
295 | name = Main.storyboard;
296 | sourceTree = "";
297 | };
298 | D534F1CF1A324F63003C3AB4 /* LaunchScreen.xib */ = {
299 | isa = PBXVariantGroup;
300 | children = (
301 | D534F1D01A324F63003C3AB4 /* Base */,
302 | );
303 | name = LaunchScreen.xib;
304 | sourceTree = "";
305 | };
306 | /* End PBXVariantGroup section */
307 |
308 | /* Begin XCBuildConfiguration section */
309 | D534F1DE1A324F64003C3AB4 /* Debug */ = {
310 | isa = XCBuildConfiguration;
311 | buildSettings = {
312 | ALWAYS_SEARCH_USER_PATHS = NO;
313 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
314 | CLANG_CXX_LIBRARY = "libc++";
315 | CLANG_ENABLE_MODULES = YES;
316 | CLANG_ENABLE_OBJC_ARC = YES;
317 | CLANG_WARN_BOOL_CONVERSION = YES;
318 | CLANG_WARN_CONSTANT_CONVERSION = YES;
319 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
320 | CLANG_WARN_EMPTY_BODY = YES;
321 | CLANG_WARN_ENUM_CONVERSION = YES;
322 | CLANG_WARN_INT_CONVERSION = YES;
323 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
324 | CLANG_WARN_UNREACHABLE_CODE = YES;
325 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
326 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
327 | COPY_PHASE_STRIP = NO;
328 | ENABLE_STRICT_OBJC_MSGSEND = YES;
329 | GCC_C_LANGUAGE_STANDARD = gnu99;
330 | GCC_DYNAMIC_NO_PIC = NO;
331 | GCC_OPTIMIZATION_LEVEL = 0;
332 | GCC_PREPROCESSOR_DEFINITIONS = (
333 | "DEBUG=1",
334 | "$(inherited)",
335 | );
336 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
339 | GCC_WARN_UNDECLARED_SELECTOR = YES;
340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
341 | GCC_WARN_UNUSED_FUNCTION = YES;
342 | GCC_WARN_UNUSED_VARIABLE = YES;
343 | IPHONEOS_DEPLOYMENT_TARGET = 8.1;
344 | MTL_ENABLE_DEBUG_INFO = YES;
345 | ONLY_ACTIVE_ARCH = YES;
346 | OTHER_LDFLAGS = "-lc++";
347 | SDKROOT = iphoneos;
348 | SWIFT_OBJC_BRIDGING_HEADER = "SampleApp-Swift/SampleApp-Swift-Bridging-Header.h";
349 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
350 | TARGETED_DEVICE_FAMILY = "1,2";
351 | };
352 | name = Debug;
353 | };
354 | D534F1DF1A324F64003C3AB4 /* Release */ = {
355 | isa = XCBuildConfiguration;
356 | buildSettings = {
357 | ALWAYS_SEARCH_USER_PATHS = NO;
358 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
359 | CLANG_CXX_LIBRARY = "libc++";
360 | CLANG_ENABLE_MODULES = YES;
361 | CLANG_ENABLE_OBJC_ARC = YES;
362 | CLANG_WARN_BOOL_CONVERSION = YES;
363 | CLANG_WARN_CONSTANT_CONVERSION = YES;
364 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
365 | CLANG_WARN_EMPTY_BODY = YES;
366 | CLANG_WARN_ENUM_CONVERSION = YES;
367 | CLANG_WARN_INT_CONVERSION = YES;
368 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
369 | CLANG_WARN_UNREACHABLE_CODE = YES;
370 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
371 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
372 | COPY_PHASE_STRIP = YES;
373 | ENABLE_NS_ASSERTIONS = NO;
374 | ENABLE_STRICT_OBJC_MSGSEND = YES;
375 | GCC_C_LANGUAGE_STANDARD = gnu99;
376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
378 | GCC_WARN_UNDECLARED_SELECTOR = YES;
379 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
380 | GCC_WARN_UNUSED_FUNCTION = YES;
381 | GCC_WARN_UNUSED_VARIABLE = YES;
382 | IPHONEOS_DEPLOYMENT_TARGET = 8.1;
383 | MTL_ENABLE_DEBUG_INFO = NO;
384 | OTHER_LDFLAGS = "-lc++";
385 | SDKROOT = iphoneos;
386 | SWIFT_OBJC_BRIDGING_HEADER = "SampleApp-Swift/SampleApp-Swift-Bridging-Header.h";
387 | TARGETED_DEVICE_FAMILY = "1,2";
388 | VALIDATE_PRODUCT = YES;
389 | };
390 | name = Release;
391 | };
392 | D534F1E11A324F64003C3AB4 /* Debug */ = {
393 | isa = XCBuildConfiguration;
394 | buildSettings = {
395 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
396 | INFOPLIST_FILE = "SampleApp-Swift/Info.plist";
397 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
398 | LIBRARY_SEARCH_PATHS = (
399 | "$(inherited)",
400 | ../CardIO,
401 | );
402 | OTHER_LDFLAGS = (
403 | "-lc++",
404 | "-ObjC",
405 | );
406 | PRODUCT_NAME = "$(TARGET_NAME)";
407 | };
408 | name = Debug;
409 | };
410 | D534F1E21A324F64003C3AB4 /* Release */ = {
411 | isa = XCBuildConfiguration;
412 | buildSettings = {
413 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
414 | INFOPLIST_FILE = "SampleApp-Swift/Info.plist";
415 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
416 | LIBRARY_SEARCH_PATHS = (
417 | "$(inherited)",
418 | ../CardIO,
419 | );
420 | OTHER_LDFLAGS = (
421 | "-lc++",
422 | "-ObjC",
423 | );
424 | PRODUCT_NAME = "$(TARGET_NAME)";
425 | };
426 | name = Release;
427 | };
428 | D534F1E41A324F64003C3AB4 /* Debug */ = {
429 | isa = XCBuildConfiguration;
430 | buildSettings = {
431 | BUNDLE_LOADER = "$(TEST_HOST)";
432 | FRAMEWORK_SEARCH_PATHS = (
433 | "$(SDKROOT)/Developer/Library/Frameworks",
434 | "$(inherited)",
435 | );
436 | GCC_PREPROCESSOR_DEFINITIONS = (
437 | "DEBUG=1",
438 | "$(inherited)",
439 | );
440 | INFOPLIST_FILE = "SampleApp-SwiftTests/Info.plist";
441 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
442 | PRODUCT_NAME = "$(TARGET_NAME)";
443 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SampleApp-Swift.app/SampleApp-Swift";
444 | };
445 | name = Debug;
446 | };
447 | D534F1E51A324F64003C3AB4 /* Release */ = {
448 | isa = XCBuildConfiguration;
449 | buildSettings = {
450 | BUNDLE_LOADER = "$(TEST_HOST)";
451 | FRAMEWORK_SEARCH_PATHS = (
452 | "$(SDKROOT)/Developer/Library/Frameworks",
453 | "$(inherited)",
454 | );
455 | INFOPLIST_FILE = "SampleApp-SwiftTests/Info.plist";
456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
457 | PRODUCT_NAME = "$(TARGET_NAME)";
458 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SampleApp-Swift.app/SampleApp-Swift";
459 | };
460 | name = Release;
461 | };
462 | /* End XCBuildConfiguration section */
463 |
464 | /* Begin XCConfigurationList section */
465 | D534F1BC1A324F63003C3AB4 /* Build configuration list for PBXProject "SampleApp-Swift" */ = {
466 | isa = XCConfigurationList;
467 | buildConfigurations = (
468 | D534F1DE1A324F64003C3AB4 /* Debug */,
469 | D534F1DF1A324F64003C3AB4 /* Release */,
470 | );
471 | defaultConfigurationIsVisible = 0;
472 | defaultConfigurationName = Release;
473 | };
474 | D534F1E01A324F64003C3AB4 /* Build configuration list for PBXNativeTarget "SampleApp-Swift" */ = {
475 | isa = XCConfigurationList;
476 | buildConfigurations = (
477 | D534F1E11A324F64003C3AB4 /* Debug */,
478 | D534F1E21A324F64003C3AB4 /* Release */,
479 | );
480 | defaultConfigurationIsVisible = 0;
481 | defaultConfigurationName = Release;
482 | };
483 | D534F1E31A324F64003C3AB4 /* Build configuration list for PBXNativeTarget "SampleApp-SwiftTests" */ = {
484 | isa = XCConfigurationList;
485 | buildConfigurations = (
486 | D534F1E41A324F64003C3AB4 /* Debug */,
487 | D534F1E51A324F64003C3AB4 /* Release */,
488 | );
489 | defaultConfigurationIsVisible = 0;
490 | defaultConfigurationName = Release;
491 | };
492 | /* End XCConfigurationList section */
493 | };
494 | rootObject = D534F1B91A324F63003C3AB4 /* Project object */;
495 | }
496 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp-Swift/SampleApp-Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp-Swift/SampleApp-Swift/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // SampleApp-Swift
4 | //
5 | // Copyright (c) 2014 PayPal. All rights reserved.
6 | //
7 |
8 | import UIKit
9 |
10 | @UIApplicationMain
11 | class AppDelegate: UIResponder, UIApplicationDelegate {
12 |
13 | var window: UIWindow?
14 |
15 |
16 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
17 | // Override point for customization after application launch.
18 | return true
19 | }
20 |
21 | func applicationWillResignActive(application: UIApplication) {
22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
23 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
24 | }
25 |
26 | func applicationDidEnterBackground(application: UIApplication) {
27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
29 | }
30 |
31 | func applicationWillEnterForeground(application: UIApplication) {
32 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
33 | }
34 |
35 | func applicationDidBecomeActive(application: UIApplication) {
36 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
37 | }
38 |
39 | func applicationWillTerminate(application: UIApplication) {
40 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
41 | }
42 |
43 |
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp-Swift/SampleApp-Swift/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp-Swift/SampleApp-Swift/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
29 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp-Swift/SampleApp-Swift/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp-Swift/SampleApp-Swift/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | zz.mycompany.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp-Swift/SampleApp-Swift/SampleApp-Swift-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 PayPal. All rights reserved.
2 | #import "CardIO.h"
3 |
4 | @import AudioToolbox;
5 | @import AVFoundation;
6 | @import CoreMedia;
7 | @import CoreVideo;
8 | @import MobileCoreServices;
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp-Swift/SampleApp-Swift/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // SampleApp-Swift
4 | //
5 | // Copyright (c) 2014 PayPal. All rights reserved.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController: UIViewController, CardIOPaymentViewControllerDelegate {
11 |
12 | @IBOutlet weak var resultLabel: UILabel!
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | CardIOUtilities.preload()
17 | }
18 |
19 | override func didReceiveMemoryWarning() {
20 | super.didReceiveMemoryWarning()
21 | // Dispose of any resources that can be recreated.
22 | }
23 |
24 | @IBAction func scanCard(sender: AnyObject) {
25 | let cardIOVC = CardIOPaymentViewController(paymentDelegate: self)
26 | cardIOVC.modalPresentationStyle = .FormSheet
27 | presentViewController(cardIOVC, animated: true, completion: nil)
28 | }
29 |
30 | func userDidCancelPaymentViewController(paymentViewController: CardIOPaymentViewController!) {
31 | resultLabel.text = "user canceled"
32 | paymentViewController?.dismissViewControllerAnimated(true, completion: nil)
33 | }
34 |
35 | func userDidProvideCreditCardInfo(cardInfo: CardIOCreditCardInfo!, inPaymentViewController paymentViewController: CardIOPaymentViewController!) {
36 | if let info = cardInfo {
37 | let str = NSString(format: "Received card info.\n Number: %@\n expiry: %02lu/%lu\n cvv: %@.", info.redactedCardNumber, info.expiryMonth, info.expiryYear, info.cvv)
38 | resultLabel.text = str as String
39 | }
40 | paymentViewController?.dismissViewControllerAnimated(true, completion: nil)
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp-Swift/SampleApp-SwiftTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | zz.mycompany.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp-Swift/SampleApp-SwiftTests/SampleApp_SwiftTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // SampleApp-Swift
4 | //
5 | // Copyright (c) 2014 PayPal. All rights reserved.
6 | //
7 |
8 | import UIKit
9 | import XCTest
10 |
11 | class SampleApp_SwiftTests: XCTestCase {
12 |
13 | override func setUp() {
14 | super.setUp()
15 | // Put setup code here. This method is called before the invocation of each test method in the class.
16 | }
17 |
18 | override func tearDown() {
19 | // Put teardown code here. This method is called after the invocation of each test method in the class.
20 | super.tearDown()
21 | }
22 |
23 | func testExample() {
24 | // This is an example of a functional test case.
25 | XCTAssert(true, "Pass")
26 | }
27 |
28 | func testPerformanceExample() {
29 | // This is an example of a performance test case.
30 | self.measureBlock() {
31 | // Put the code you want to measure the time of here.
32 | }
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kayla-tech/react-native-card-io/ea4470c53b9438e716d0fe7b8fe18a79675c3d37/ios/libs/card.io-iOS-SDK/SampleApp/Default-568h@2x.png
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp/README.md:
--------------------------------------------------------------------------------
1 | Credit card scanning example for iOS card.io
2 | ============================================
3 |
4 | To give this a try:
5 |
6 | 1. Download an archive of [the most recent release](https://github.com/card-io/card.io-iOS-SDK/releases) of the card.io SDK.
7 | 2. Using Xcode 5.0 or newer, open `ScanExample.xcodeproj`, build and run.
8 |
9 | That's it!!
10 |
11 | Questions? Comments? Email support@card.io
12 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp/ScanExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 0A2C90381564175A000727BC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A2C90371564175A000727BC /* UIKit.framework */; };
11 | 0A2C903A1564175A000727BC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A2C90391564175A000727BC /* Foundation.framework */; };
12 | 0A2C90421564175A000727BC /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0A2C90401564175A000727BC /* InfoPlist.strings */; };
13 | 0A2C90441564175A000727BC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A2C90431564175A000727BC /* main.m */; };
14 | 0A2C90481564175A000727BC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A2C90471564175A000727BC /* AppDelegate.m */; };
15 | 0A2C904B1564175A000727BC /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0A2C90491564175A000727BC /* MainStoryboard_iPhone.storyboard */; };
16 | 0A2C904E1564175A000727BC /* MainStoryboard_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0A2C904C1564175A000727BC /* MainStoryboard_iPad.storyboard */; };
17 | 0A2C90511564175A000727BC /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A2C90501564175A000727BC /* ViewController.m */; };
18 | 0A96B63B156447A300DBA017 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A96B63A156447A300DBA017 /* AVFoundation.framework */; };
19 | 0A96B63D156447AC00DBA017 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A96B63C156447AC00DBA017 /* AudioToolbox.framework */; };
20 | 0A96B63F156447B400DBA017 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A96B63E156447B400DBA017 /* CoreMedia.framework */; };
21 | 0A96B641156447BC00DBA017 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A96B640156447BC00DBA017 /* CoreVideo.framework */; };
22 | 0A96B645156447CD00DBA017 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A96B644156447CD00DBA017 /* MobileCoreServices.framework */; };
23 | 0A96B647156447D400DBA017 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A96B646156447D400DBA017 /* QuartzCore.framework */; };
24 | 0A96B649156447DB00DBA017 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A96B648156447DB00DBA017 /* Security.framework */; };
25 | 2680866116FFAC7A0058FD24 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2680866016FFAC7A0058FD24 /* Default-568h@2x.png */; };
26 | 2680867016FFB2A00058FD24 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2680866F16FFB2A00058FD24 /* OpenGLES.framework */; };
27 | 3EB7592518341EE80008860A /* libCardIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EB7592318341EB80008860A /* libCardIO.a */; };
28 | 3ED76B6417ECF9F50014F059 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3ED76B6317ECF9F50014F059 /* CoreGraphics.framework */; };
29 | /* End PBXBuildFile section */
30 |
31 | /* Begin PBXFileReference section */
32 | 0A2C90331564175A000727BC /* ScanExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScanExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
33 | 0A2C90371564175A000727BC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
34 | 0A2C90391564175A000727BC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
35 | 0A2C903F1564175A000727BC /* ScanExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ScanExample-Info.plist"; sourceTree = ""; };
36 | 0A2C90411564175A000727BC /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
37 | 0A2C90431564175A000727BC /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
38 | 0A2C90451564175A000727BC /* ScanExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ScanExample-Prefix.pch"; sourceTree = ""; };
39 | 0A2C90461564175A000727BC /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
40 | 0A2C90471564175A000727BC /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
41 | 0A2C904A1564175A000727BC /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPhone.storyboard; sourceTree = ""; };
42 | 0A2C904D1564175A000727BC /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPad.storyboard; sourceTree = ""; };
43 | 0A2C904F1564175A000727BC /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
44 | 0A2C90501564175A000727BC /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
45 | 0A96B63A156447A300DBA017 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
46 | 0A96B63C156447AC00DBA017 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
47 | 0A96B63E156447B400DBA017 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
48 | 0A96B640156447BC00DBA017 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
49 | 0A96B644156447CD00DBA017 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
50 | 0A96B646156447D400DBA017 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
51 | 0A96B648156447DB00DBA017 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
52 | 2680866016FFAC7A0058FD24 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "../Default-568h@2x.png"; sourceTree = ""; };
53 | 2680866F16FFB2A00058FD24 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
54 | 3EB7591D18341EB80008860A /* CardIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIO.h; sourceTree = ""; };
55 | 3EB7591E18341EB80008860A /* CardIOCreditCardInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIOCreditCardInfo.h; sourceTree = ""; };
56 | 3EB7591F18341EB80008860A /* CardIOPaymentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIOPaymentViewController.h; sourceTree = ""; };
57 | 3EB7592018341EB80008860A /* CardIOPaymentViewControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIOPaymentViewControllerDelegate.h; sourceTree = ""; };
58 | 3EB7592118341EB80008860A /* CardIOView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIOView.h; sourceTree = ""; };
59 | 3EB7592218341EB80008860A /* CardIOViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIOViewDelegate.h; sourceTree = ""; };
60 | 3EB7592318341EB80008860A /* libCardIO.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libCardIO.a; sourceTree = ""; };
61 | 3ED76B6317ECF9F50014F059 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
62 | /* End PBXFileReference section */
63 |
64 | /* Begin PBXFrameworksBuildPhase section */
65 | 0A2C90301564175A000727BC /* Frameworks */ = {
66 | isa = PBXFrameworksBuildPhase;
67 | buildActionMask = 2147483647;
68 | files = (
69 | 3EB7592518341EE80008860A /* libCardIO.a in Frameworks */,
70 | 0A96B63D156447AC00DBA017 /* AudioToolbox.framework in Frameworks */,
71 | 0A96B63B156447A300DBA017 /* AVFoundation.framework in Frameworks */,
72 | 3ED76B6417ECF9F50014F059 /* CoreGraphics.framework in Frameworks */,
73 | 0A96B63F156447B400DBA017 /* CoreMedia.framework in Frameworks */,
74 | 0A96B641156447BC00DBA017 /* CoreVideo.framework in Frameworks */,
75 | 0A2C903A1564175A000727BC /* Foundation.framework in Frameworks */,
76 | 0A96B645156447CD00DBA017 /* MobileCoreServices.framework in Frameworks */,
77 | 2680867016FFB2A00058FD24 /* OpenGLES.framework in Frameworks */,
78 | 0A96B647156447D400DBA017 /* QuartzCore.framework in Frameworks */,
79 | 0A96B649156447DB00DBA017 /* Security.framework in Frameworks */,
80 | 0A2C90381564175A000727BC /* UIKit.framework in Frameworks */,
81 | );
82 | runOnlyForDeploymentPostprocessing = 0;
83 | };
84 | /* End PBXFrameworksBuildPhase section */
85 |
86 | /* Begin PBXGroup section */
87 | 0A2C90281564175A000727BC = {
88 | isa = PBXGroup;
89 | children = (
90 | 0A2C903D1564175A000727BC /* ScanExample */,
91 | 3EB7591C18341EB80008860A /* CardIO */,
92 | 0A2C90361564175A000727BC /* Frameworks */,
93 | 0A2C90341564175A000727BC /* Products */,
94 | );
95 | sourceTree = "";
96 | };
97 | 0A2C90341564175A000727BC /* Products */ = {
98 | isa = PBXGroup;
99 | children = (
100 | 0A2C90331564175A000727BC /* ScanExample.app */,
101 | );
102 | name = Products;
103 | sourceTree = "";
104 | };
105 | 0A2C90361564175A000727BC /* Frameworks */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 0A96B63C156447AC00DBA017 /* AudioToolbox.framework */,
109 | 0A96B63A156447A300DBA017 /* AVFoundation.framework */,
110 | 3ED76B6317ECF9F50014F059 /* CoreGraphics.framework */,
111 | 0A96B63E156447B400DBA017 /* CoreMedia.framework */,
112 | 0A96B640156447BC00DBA017 /* CoreVideo.framework */,
113 | 0A2C90391564175A000727BC /* Foundation.framework */,
114 | 0A96B644156447CD00DBA017 /* MobileCoreServices.framework */,
115 | 2680866F16FFB2A00058FD24 /* OpenGLES.framework */,
116 | 0A96B646156447D400DBA017 /* QuartzCore.framework */,
117 | 0A96B648156447DB00DBA017 /* Security.framework */,
118 | 0A2C90371564175A000727BC /* UIKit.framework */,
119 | );
120 | name = Frameworks;
121 | sourceTree = "";
122 | };
123 | 0A2C903D1564175A000727BC /* ScanExample */ = {
124 | isa = PBXGroup;
125 | children = (
126 | 0A2C903E1564175A000727BC /* Supporting Files */,
127 | 0A2C90461564175A000727BC /* AppDelegate.h */,
128 | 0A2C90471564175A000727BC /* AppDelegate.m */,
129 | 0A2C90491564175A000727BC /* MainStoryboard_iPhone.storyboard */,
130 | 0A2C904C1564175A000727BC /* MainStoryboard_iPad.storyboard */,
131 | 0A2C904F1564175A000727BC /* ViewController.h */,
132 | 0A2C90501564175A000727BC /* ViewController.m */,
133 | );
134 | path = ScanExample;
135 | sourceTree = "";
136 | };
137 | 0A2C903E1564175A000727BC /* Supporting Files */ = {
138 | isa = PBXGroup;
139 | children = (
140 | 2680866016FFAC7A0058FD24 /* Default-568h@2x.png */,
141 | 0A2C903F1564175A000727BC /* ScanExample-Info.plist */,
142 | 0A2C90401564175A000727BC /* InfoPlist.strings */,
143 | 0A2C90431564175A000727BC /* main.m */,
144 | 0A2C90451564175A000727BC /* ScanExample-Prefix.pch */,
145 | );
146 | name = "Supporting Files";
147 | sourceTree = "";
148 | };
149 | 3EB7591C18341EB80008860A /* CardIO */ = {
150 | isa = PBXGroup;
151 | children = (
152 | 3EB7591D18341EB80008860A /* CardIO.h */,
153 | 3EB7591E18341EB80008860A /* CardIOCreditCardInfo.h */,
154 | 3EB7591F18341EB80008860A /* CardIOPaymentViewController.h */,
155 | 3EB7592018341EB80008860A /* CardIOPaymentViewControllerDelegate.h */,
156 | 3EB7592118341EB80008860A /* CardIOView.h */,
157 | 3EB7592218341EB80008860A /* CardIOViewDelegate.h */,
158 | 3EB7592318341EB80008860A /* libCardIO.a */,
159 | );
160 | name = CardIO;
161 | path = ../CardIO;
162 | sourceTree = "";
163 | };
164 | /* End PBXGroup section */
165 |
166 | /* Begin PBXNativeTarget section */
167 | 0A2C90321564175A000727BC /* ScanExample */ = {
168 | isa = PBXNativeTarget;
169 | buildConfigurationList = 0A2C90541564175A000727BC /* Build configuration list for PBXNativeTarget "ScanExample" */;
170 | buildPhases = (
171 | A5DFB2B41BBC994400AA810C /* Unzip libCardIO.a.zip */,
172 | 0A2C902F1564175A000727BC /* Sources */,
173 | 0A2C90301564175A000727BC /* Frameworks */,
174 | 0A2C90311564175A000727BC /* Resources */,
175 | );
176 | buildRules = (
177 | );
178 | dependencies = (
179 | );
180 | name = ScanExample;
181 | productName = ScanExample;
182 | productReference = 0A2C90331564175A000727BC /* ScanExample.app */;
183 | productType = "com.apple.product-type.application";
184 | };
185 | /* End PBXNativeTarget section */
186 |
187 | /* Begin PBXProject section */
188 | 0A2C902A1564175A000727BC /* Project object */ = {
189 | isa = PBXProject;
190 | attributes = {
191 | LastUpgradeCheck = 0630;
192 | ORGANIZATIONNAME = card.io;
193 | };
194 | buildConfigurationList = 0A2C902D1564175A000727BC /* Build configuration list for PBXProject "ScanExample" */;
195 | compatibilityVersion = "Xcode 3.2";
196 | developmentRegion = English;
197 | hasScannedForEncodings = 0;
198 | knownRegions = (
199 | en,
200 | );
201 | mainGroup = 0A2C90281564175A000727BC;
202 | productRefGroup = 0A2C90341564175A000727BC /* Products */;
203 | projectDirPath = "";
204 | projectRoot = "";
205 | targets = (
206 | 0A2C90321564175A000727BC /* ScanExample */,
207 | );
208 | };
209 | /* End PBXProject section */
210 |
211 | /* Begin PBXResourcesBuildPhase section */
212 | 0A2C90311564175A000727BC /* Resources */ = {
213 | isa = PBXResourcesBuildPhase;
214 | buildActionMask = 2147483647;
215 | files = (
216 | 0A2C90421564175A000727BC /* InfoPlist.strings in Resources */,
217 | 0A2C904B1564175A000727BC /* MainStoryboard_iPhone.storyboard in Resources */,
218 | 0A2C904E1564175A000727BC /* MainStoryboard_iPad.storyboard in Resources */,
219 | 2680866116FFAC7A0058FD24 /* Default-568h@2x.png in Resources */,
220 | );
221 | runOnlyForDeploymentPostprocessing = 0;
222 | };
223 | /* End PBXResourcesBuildPhase section */
224 |
225 | /* Begin PBXShellScriptBuildPhase section */
226 | A5DFB2B41BBC994400AA810C /* Unzip libCardIO.a.zip */ = {
227 | isa = PBXShellScriptBuildPhase;
228 | buildActionMask = 2147483647;
229 | files = (
230 | );
231 | inputPaths = (
232 | );
233 | name = "Unzip libCardIO.a.zip";
234 | outputPaths = (
235 | );
236 | runOnlyForDeploymentPostprocessing = 0;
237 | shellPath = /bin/sh;
238 | shellScript = "[ -f ../CardIO/libCardIO.a ] && rm ../CardIO/libCardIO.a\nunzip -d ../CardIO/ ../CardIO/libCardIO.a.zip";
239 | };
240 | /* End PBXShellScriptBuildPhase section */
241 |
242 | /* Begin PBXSourcesBuildPhase section */
243 | 0A2C902F1564175A000727BC /* Sources */ = {
244 | isa = PBXSourcesBuildPhase;
245 | buildActionMask = 2147483647;
246 | files = (
247 | 0A2C90441564175A000727BC /* main.m in Sources */,
248 | 0A2C90481564175A000727BC /* AppDelegate.m in Sources */,
249 | 0A2C90511564175A000727BC /* ViewController.m in Sources */,
250 | );
251 | runOnlyForDeploymentPostprocessing = 0;
252 | };
253 | /* End PBXSourcesBuildPhase section */
254 |
255 | /* Begin PBXVariantGroup section */
256 | 0A2C90401564175A000727BC /* InfoPlist.strings */ = {
257 | isa = PBXVariantGroup;
258 | children = (
259 | 0A2C90411564175A000727BC /* en */,
260 | );
261 | name = InfoPlist.strings;
262 | sourceTree = "";
263 | };
264 | 0A2C90491564175A000727BC /* MainStoryboard_iPhone.storyboard */ = {
265 | isa = PBXVariantGroup;
266 | children = (
267 | 0A2C904A1564175A000727BC /* en */,
268 | );
269 | name = MainStoryboard_iPhone.storyboard;
270 | sourceTree = "";
271 | };
272 | 0A2C904C1564175A000727BC /* MainStoryboard_iPad.storyboard */ = {
273 | isa = PBXVariantGroup;
274 | children = (
275 | 0A2C904D1564175A000727BC /* en */,
276 | );
277 | name = MainStoryboard_iPad.storyboard;
278 | sourceTree = "";
279 | };
280 | /* End PBXVariantGroup section */
281 |
282 | /* Begin XCBuildConfiguration section */
283 | 0A2C90521564175A000727BC /* Debug */ = {
284 | isa = XCBuildConfiguration;
285 | buildSettings = {
286 | ALWAYS_SEARCH_USER_PATHS = NO;
287 | CLANG_ENABLE_OBJC_ARC = YES;
288 | CLANG_WARN_BOOL_CONVERSION = YES;
289 | CLANG_WARN_CONSTANT_CONVERSION = YES;
290 | CLANG_WARN_EMPTY_BODY = YES;
291 | CLANG_WARN_ENUM_CONVERSION = YES;
292 | CLANG_WARN_INT_CONVERSION = YES;
293 | CLANG_WARN_UNREACHABLE_CODE = YES;
294 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
295 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
296 | COPY_PHASE_STRIP = NO;
297 | ENABLE_STRICT_OBJC_MSGSEND = YES;
298 | GCC_C_LANGUAGE_STANDARD = gnu99;
299 | GCC_DYNAMIC_NO_PIC = NO;
300 | GCC_NO_COMMON_BLOCKS = YES;
301 | GCC_OPTIMIZATION_LEVEL = 0;
302 | GCC_PREPROCESSOR_DEFINITIONS = (
303 | "DEBUG=1",
304 | "$(inherited)",
305 | );
306 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
307 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
308 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
309 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
310 | GCC_WARN_UNDECLARED_SELECTOR = YES;
311 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
312 | GCC_WARN_UNUSED_FUNCTION = YES;
313 | GCC_WARN_UNUSED_VARIABLE = YES;
314 | IPHONEOS_DEPLOYMENT_TARGET = 5.1;
315 | ONLY_ACTIVE_ARCH = YES;
316 | OTHER_LDFLAGS = "-ObjC";
317 | SDKROOT = iphoneos;
318 | TARGETED_DEVICE_FAMILY = "1,2";
319 | };
320 | name = Debug;
321 | };
322 | 0A2C90531564175A000727BC /* Release */ = {
323 | isa = XCBuildConfiguration;
324 | buildSettings = {
325 | ALWAYS_SEARCH_USER_PATHS = NO;
326 | CLANG_ENABLE_OBJC_ARC = YES;
327 | CLANG_WARN_BOOL_CONVERSION = YES;
328 | CLANG_WARN_CONSTANT_CONVERSION = YES;
329 | CLANG_WARN_EMPTY_BODY = YES;
330 | CLANG_WARN_ENUM_CONVERSION = YES;
331 | CLANG_WARN_INT_CONVERSION = YES;
332 | CLANG_WARN_UNREACHABLE_CODE = YES;
333 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
334 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
335 | COPY_PHASE_STRIP = YES;
336 | ENABLE_STRICT_OBJC_MSGSEND = YES;
337 | GCC_C_LANGUAGE_STANDARD = gnu99;
338 | GCC_NO_COMMON_BLOCKS = YES;
339 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
340 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
341 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
342 | GCC_WARN_UNDECLARED_SELECTOR = YES;
343 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
344 | GCC_WARN_UNUSED_FUNCTION = YES;
345 | GCC_WARN_UNUSED_VARIABLE = YES;
346 | IPHONEOS_DEPLOYMENT_TARGET = 5.1;
347 | ONLY_ACTIVE_ARCH = NO;
348 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
349 | OTHER_LDFLAGS = "-ObjC";
350 | SDKROOT = iphoneos;
351 | TARGETED_DEVICE_FAMILY = "1,2";
352 | VALIDATE_PRODUCT = YES;
353 | };
354 | name = Release;
355 | };
356 | 0A2C90551564175A000727BC /* Debug */ = {
357 | isa = XCBuildConfiguration;
358 | buildSettings = {
359 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
360 | GCC_PREFIX_HEADER = "ScanExample/ScanExample-Prefix.pch";
361 | INFOPLIST_FILE = "ScanExample/ScanExample-Info.plist";
362 | IPHONEOS_DEPLOYMENT_TARGET = 6.0;
363 | LIBRARY_SEARCH_PATHS = (
364 | "$(inherited)",
365 | "$(SRCROOT)/../CardIO",
366 | );
367 | OTHER_LDFLAGS = (
368 | "-lc++",
369 | "-ObjC",
370 | );
371 | PRODUCT_NAME = "$(TARGET_NAME)";
372 | WRAPPER_EXTENSION = app;
373 | };
374 | name = Debug;
375 | };
376 | 0A2C90561564175A000727BC /* Release */ = {
377 | isa = XCBuildConfiguration;
378 | buildSettings = {
379 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
380 | GCC_PREFIX_HEADER = "ScanExample/ScanExample-Prefix.pch";
381 | INFOPLIST_FILE = "ScanExample/ScanExample-Info.plist";
382 | IPHONEOS_DEPLOYMENT_TARGET = 6.0;
383 | LIBRARY_SEARCH_PATHS = (
384 | "$(inherited)",
385 | "$(SRCROOT)/../CardIO",
386 | );
387 | OTHER_LDFLAGS = (
388 | "-lc++",
389 | "-ObjC",
390 | );
391 | PRODUCT_NAME = "$(TARGET_NAME)";
392 | WRAPPER_EXTENSION = app;
393 | };
394 | name = Release;
395 | };
396 | /* End XCBuildConfiguration section */
397 |
398 | /* Begin XCConfigurationList section */
399 | 0A2C902D1564175A000727BC /* Build configuration list for PBXProject "ScanExample" */ = {
400 | isa = XCConfigurationList;
401 | buildConfigurations = (
402 | 0A2C90521564175A000727BC /* Debug */,
403 | 0A2C90531564175A000727BC /* Release */,
404 | );
405 | defaultConfigurationIsVisible = 0;
406 | defaultConfigurationName = Release;
407 | };
408 | 0A2C90541564175A000727BC /* Build configuration list for PBXNativeTarget "ScanExample" */ = {
409 | isa = XCConfigurationList;
410 | buildConfigurations = (
411 | 0A2C90551564175A000727BC /* Debug */,
412 | 0A2C90561564175A000727BC /* Release */,
413 | );
414 | defaultConfigurationIsVisible = 0;
415 | defaultConfigurationName = Release;
416 | };
417 | /* End XCConfigurationList section */
418 | };
419 | rootObject = 0A2C902A1564175A000727BC /* Project object */;
420 | }
421 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp/ScanExample/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ScanExample
4 | //
5 | // Copyright (c) 2012 PayPal. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | @interface AppDelegate : UIResponder
11 |
12 | @property (strong, nonatomic) UIWindow *window;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp/ScanExample/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // ScanExample
4 | //
5 | // Copyright (c) 2012 PayPal. All rights reserved.
6 | //
7 |
8 | #import "AppDelegate.h"
9 |
10 | @implementation AppDelegate
11 |
12 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
13 | // Override point for customization after application launch.
14 | return YES;
15 | }
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp/ScanExample/ScanExample-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | org.my.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIMainStoryboardFile
28 | MainStoryboard_iPhone
29 | UIMainStoryboardFile~ipad
30 | MainStoryboard_iPad
31 | UIRequiredDeviceCapabilities
32 |
33 | armv7
34 |
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp/ScanExample/ScanExample-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'ScanExample' target in the 'ScanExample' project
3 | //
4 |
5 | #import
6 |
7 | #ifndef __IPHONE_5_0
8 | #warning "This project uses features only available in iOS SDK 5.0 and later."
9 | #endif
10 |
11 | #ifdef __OBJC__
12 | #import
13 | #import
14 | #endif
15 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp/ScanExample/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // ScanExample
4 | //
5 | // Copyright (c) 2012 PayPal. All rights reserved.
6 | //
7 |
8 | #import
9 | #import "CardIOPaymentViewControllerDelegate.h"
10 |
11 | @interface ViewController : UIViewController
12 |
13 | @end
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp/ScanExample/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // ScanExample
4 | //
5 | // Copyright (c) 2012 PayPal. All rights reserved.
6 | //
7 |
8 | #import "ViewController.h"
9 |
10 | #import "CardIO.h"
11 |
12 | @interface ViewController ()
13 |
14 | @property (weak, nonatomic) IBOutlet UILabel *infoLabel;
15 |
16 | @end
17 |
18 | @implementation ViewController
19 |
20 | #pragma mark - View Lifecycle
21 | #pragma mark -
22 |
23 | - (void)viewDidLoad {
24 | [super viewDidLoad];
25 | self.infoLabel.text = @"";
26 | }
27 |
28 | - (void)viewWillAppear:(BOOL)animated {
29 | [super viewWillAppear:animated];
30 | [CardIOUtilities preload];
31 | }
32 |
33 | #pragma mark - User Actions
34 |
35 | - (void)scanCardClicked:(id)sender {
36 | CardIOPaymentViewController *scanViewController = [[CardIOPaymentViewController alloc] initWithPaymentDelegate:self];
37 | scanViewController.modalPresentationStyle = UIModalPresentationFormSheet;
38 | [self presentViewController:scanViewController animated:YES completion:nil];
39 | }
40 |
41 | #pragma mark - CardIOPaymentViewControllerDelegate
42 |
43 | - (void)userDidProvideCreditCardInfo:(CardIOCreditCardInfo *)info inPaymentViewController:(CardIOPaymentViewController *)paymentViewController {
44 | NSLog(@"Scan succeeded with info: %@", info);
45 | // Do whatever needs to be done to deliver the purchased items.
46 | [self dismissViewControllerAnimated:YES completion:nil];
47 |
48 | self.infoLabel.text = [NSString stringWithFormat:@"Received card info. Number: %@, expiry: %02lu/%lu, cvv: %@.", info.redactedCardNumber, (unsigned long)info.expiryMonth, (unsigned long)info.expiryYear, info.cvv];
49 | }
50 |
51 | - (void)userDidCancelPaymentViewController:(CardIOPaymentViewController *)paymentViewController {
52 | NSLog(@"User cancelled scan");
53 | [self dismissViewControllerAnimated:YES completion:nil];
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp/ScanExample/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp/ScanExample/en.lproj/MainStoryboard_iPad.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
26 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp/ScanExample/en.lproj/MainStoryboard_iPhone.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
31 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/SampleApp/ScanExample/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ScanExample
4 | //
5 | // Copyright (c) 2012 PayPal. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char *argv[])
13 | {
14 | @autoreleasepool {
15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/acknowledgments.md:
--------------------------------------------------------------------------------
1 | Summary
2 | -------
3 |
4 | card.io's iOS SDK uses code from the following libraries (with gratitude!):
5 |
6 | * Willow Garage's [OpenCV](http://opencv.willowgarage.com/wiki/)
7 | * [Eigen](http://eigen.tuxfamily.org)
8 | * Erica Sadun's [iPhone Developer's Cookbook Code Samples and uidevice-extension categories](https://github.com/erica/)
9 | * Georg Kitz's [UIDevice-with-UniqueIdentifier-for-iOS-5](https://github.com/gekitz/UIDevice-with-UniqueIdentifier-for-iOS-5)
10 | * Tomáš Znamenáček's [Lambda Alert](https://github.com/zoul/Lambda-Alert)
11 | * Josh Bleecher Snyder's [TLCommon](https://github.com/treelinelabs/TLCommon)
12 | * [Openstack](http://openstack.org/)
13 |
14 | Full licenses
15 | -------------
16 |
17 | Eigen: MPLv2 license text can be found at [http://www.mozilla.org/MPL/2.0/](http://www.mozilla.org/MPL/2.0/); the source code is available at [https://bitbucket.org/eigen/eigen/](https://bitbucket.org/eigen/eigen/) or via [http://eigen.tuxfamily.org/](http://eigen.tuxfamily.org/)
18 |
19 | Erica Sadun's code, BSD license:
20 |
21 | Copyright (c) 2012, Erica Sadun
22 | All rights reserved.
23 |
24 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
25 |
26 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
27 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | George Kitz's UIDevice-with-UniqueIdentifier-for-iOS-5, MIT license:
31 |
32 | Copyright (C) 2012, Georg Kitz, @gekitz
33 |
34 | Permission is hereby granted, free of charge, to any person obtaining a copy of
35 | this software and associated documentation files (the "Software"), to deal in
36 | the Software without restriction, including without limitation the rights to
37 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
38 | of the Software, and to permit persons to whom the Software is furnished to do
39 | so, subject to the following conditions:
40 |
41 | The above copyright notice and this permission notice shall be included in all
42 | copies or substantial portions of the Software.
43 |
44 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
45 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
46 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
47 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
48 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
49 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
50 | SOFTWARE.
51 |
52 | Willow Garage's OpenCV, BSD license:
53 |
54 | Actual license text not provided -- [the OpenCV website](http://opencv.willowgarage.com/wiki/) says "OpenCV is released under a BSD license, it is free for both academic and commercial use.", with links to http://opensource.org/licenses/bsd-license.php and http://en.wikipedia.org/wiki/BSD_licenses
55 |
56 | Josh Bleecher Snyder's TLCommon, MIT license:
57 |
58 | The MIT License
59 |
60 | Copyright (c) <2009>
61 |
62 | Permission is hereby granted, free of charge, to any person obtaining a copy
63 | of this software and associated documentation files (the "Software"), to deal
64 | in the Software without restriction, including without limitation the rights
65 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
66 | copies of the Software, and to permit persons to whom the Software is
67 | furnished to do so, subject to the following conditions:
68 |
69 | The above copyright notice and this permission notice shall be included in
70 | all copies or substantial portions of the Software.
71 |
72 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
73 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
74 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
75 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
76 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
77 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
78 | THE SOFTWARE.
79 |
80 |
81 | Tomáš Znamenáček's Lambda Alert, MIT license:
82 |
83 | Copyright (c) 2010–2011 Tomáš Znamenáček,
84 |
85 | Permission is hereby granted, free of charge, to any person obtaining a copy
86 | of this software and associated documentation files (the “Software”), to deal
87 | in the Software without restriction, including without limitation the rights
88 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
89 | copies of the Software, and to permit persons to whom the Software is
90 | furnished to do so, subject to the following conditions:
91 |
92 | The above copyright notice and this permission notice shall be included in
93 | all copies or substantial portions of the Software.
94 |
95 | The software is provided “as is”, without warranty of any kind, express or
96 | implied, including but not limited to the warranties of merchantability,
97 | fitness for a particular purpose and noninfringement. In no event shall the
98 | authors or copyright holders be liable for any claim, damages or other
99 | liability, whether in an action of contract, tort or otherwise, arising from,
100 | out of or in connection with the Software or the use or other dealings in
101 | the Software.
102 |
103 | Openstack, Apache 2.0 license:
104 |
105 | Actual license text not provided -- [the Openstack website](http://openstack.org/) says "The OpenStack project is provided under the Apache 2.0 license."; the Apache 2.0 license text can be found at http://www.apache.org/licenses/LICENSE-2.0.txt
106 |
--------------------------------------------------------------------------------
/ios/libs/card.io-iOS-SDK/release_notes.txt:
--------------------------------------------------------------------------------
1 | card.io iOS SDK release notes
2 | =============================
3 |
4 | 5.2.0 (Wed 9/30/2015)
5 |
6 | * Enable Bitcode
7 | (https://github.com/card-io/card.io-iOS-SDK/issues/119)
8 | The library is now built with Xcode 7.0. It has Bitcode enabled which
9 | does significantly increase the static library. However, when an app
10 | is compiled and distributed by the App Store, the app size should not
11 | significantly increase compared to before Bitcode enablement. You must also
12 | use Xcode 7 since previous versions of Xcode are not fully compatible
13 | with Bitcode enabled libraries.
14 |
15 | --
16 |
17 | 5.1.1 (Wed 8/26/2015)
18 |
19 | * Update CocoaPods podspec to use `vendored_libraries`.
20 | (https://github.com/card-io/card.io-iOS-SDK/pull/126)
21 |
22 | --
23 |
24 | 5.1.0 (Sun 7/12/2015)
25 |
26 | * Update project and sample apps for Xcode 6.4.
27 | * Expose `scannedImageDuration` in CardIOPaymentViewController.
28 | (https://github.com/card-io/card.io-iOS-source/pull/29)
29 | * Better respect UISupportedInterfaceOrientation from the app plist.
30 | (https://github.com/card-io/card.io-iOS-SDK/issues/117)
31 | * Fix iOS 9 crash by removing some obsolete localization code.
32 | (https://github.com/card-io/card.io-iOS-SDK/issues/120)
33 |
34 | --
35 |
36 | 5.0.6 (Thu 5/21/2015)
37 |
38 | * Prevent crash when user simultaneously taps `Cancel` and `Enter Manually` buttons.
39 | (https://github.com/card-io/card.io-iOS-SDK/issues/112)
40 |
41 | --
42 |
43 | 5.0.5 (Tue 5/19/2015)
44 |
45 | * Update Chinese translations for "CVV".
46 | (https://github.com/paypal/PayPal-iOS-SDK/issues/278)
47 | * Update project and sample apps for Xcode 6.3, but
48 | build SDK with Xcode 6.2 this one last time to prevent
49 | compatibility issues for clients still using Xcode 6.2.
50 |
51 | --
52 |
53 | 5.0.4 (Tue 4/14/2015)
54 |
55 | * Check existing video permissions before presenting camera view.
56 | (https://github.com/card-io/card.io-iOS-SDK/issues/99)
57 | * Restrict expiry year manual input to 2 digits in all cases.
58 | (https://github.com/card-io/card.io-iOS-SDK/issues/104)
59 |
60 | --
61 |
62 | 5.0.3 (Tue 3/17/2015)
63 |
64 | * On scan cancelation, eliminate a visual stutter.
65 | (https://github.com/card-io/card.io-iOS-SDK/issues/97)
66 | * On scan completion, reset camera focus range to nonrestricted.
67 | (https://github.com/card-io/card.io-iOS-source/issues/17)
68 |
69 | --
70 |
71 | 5.0.2 (Mon 2/23/2015)
72 |
73 | * Re-enable expiry-scanning for 32-bit devices (e.g., iPhone 4S).
74 |
75 | --
76 |
77 | 5.0.1 (Tue 2/10/2015)
78 |
79 | * Simplify expiry-scanning code to improve accuracy and also decrease library size a bit.
80 | * For now, disable expiry-scanning for 32-bit devices (e.g., iPhone 4S).
81 | - This is because of an apparent compiler bug for which we haven't yet found a workaround.
82 |
83 | --
84 |
85 | 5.0.0 (Tue 1/20/2015)
86 |
87 | * Add automatic expiry-scanning.
88 | You can disable this feature via the new `scanExpiry` property of either CardIOView or CardIOPaymentViewController.
89 | Note: Expiry scans will not infrequently fail to obtain the correct expiry date.
90 | We are continuing to work to improve expiry-scanning accuracy.
91 | * Remove various deprecated properties.
92 |
93 | --
94 |
95 | 4.0.2 (Tue 1/13/2015)
96 |
97 | * Fix an iOS 8 display issue involving right-to-left languages. (https://github.com/card-io/card.io-iOS-SDK/issues/90)
98 | * In the manual-input screen combine Expiry and CVV into a single row, for more languages than before.
99 |
100 | --
101 |
102 | 4.0.1 (Mon 1/5/2015)
103 |
104 | * Fix a potential rare crash. (see https://github.com/paypal/PayPal-iOS-SDK/issues/220 for a similar case)
105 |
106 | --
107 |
108 | 4.0.0 (Mon 12/1/2014)
109 |
110 | * Build from the new open-source edition of card.io: https://github.com/card-io/card.io-iOS-source
111 | * New class: CardIOUtilities
112 | - libraryVersion (formerly a method of CardIOPaymentViewController)
113 | - canReadCardWithCamera (formerly a method of CardIOPaymentViewController)
114 | - preload (formerly a method of CardIOView and of CardIOPaymentViewController)
115 | - blurredScreenImageView (new method)
116 | * New property on CardIOCreditCardInfo:
117 | - cardImage
118 | * New properties on CardIOView and CardIOPaymentViewController:
119 | - scanInstructions
120 | - hideCardIOLogo
121 | - scanOverlayView
122 | - detectionMode
123 | * New notification:
124 | - CardIOScanningOrientationDidChangeNotification
125 |
126 | --
127 |
128 | 3.10.1 (Wed 11/5/2014)
129 |
130 | * Restore App Token as a deprecated property, so that existing card.io integrations will continue to build without modification.
131 |
132 | --
133 |
134 | 3.10.0 (Thu 10/2/2014)
135 |
136 | * Eliminate App Token. Developers no longer need to sign up on the card.io site before using card.io.
137 | * Add Icelandic (is) to our supported localizations. (Thank you, Martin Kaplan!)
138 |
139 | --
140 |
141 | 3.9.0 (Tue 9/23/2014)
142 |
143 | * Add new optional method `preload` to noticeably speed up the creation of your first CardIOView or CardIOPaymentViewController.
144 |
145 | --
146 |
147 | 3.8.7 (Tue 9/16/2014)
148 |
149 | * Fix a crash that could occur if a user has restricted your app's camera access.
150 |
151 | --
152 |
153 | 3.8.6 (Fri 9/12/2014)
154 |
155 | * Solve (hopefully!) a build problem for Xcode 5 users. (see https://github.com/card-io/card.io-iOS-SDK/issues/66)
156 |
157 | --
158 |
159 | 3.8.5 (Thu 9/11/2014)
160 |
161 | * Add armv7s slice (work around an Xcode 6 bug).
162 |
163 | --
164 |
165 | 3.8.4 (Wed 9/10/2014)
166 |
167 | * Build with Xcode 6 GM seed.
168 | * Update a few localized strings. (including: https://github.com/card-io/card.io-iOS-SDK/issues/65)
169 |
170 | --
171 |
172 | 3.8.3 (Tue 7/8/2014)
173 |
174 | * Fix a very rare problem involving the app caches directory getting cleared. (see https://github.com/paypal/PayPal-iOS-SDK/issues/163)
175 |
176 | --
177 |
178 | 3.8.2 (Thu 7/3/2014)
179 |
180 | * Fix some localization issues. (see https://github.com/paypal/PayPal-iOS-SDK/issues/164)
181 |
182 | --
183 |
184 | 3.8.1 (Thu 6/19/2014)
185 |
186 | * Fix an iOS 8 (beta 2) crash.
187 |
188 | --
189 |
190 | 3.8.0 (Wed 6/11/2014)
191 |
192 | * Accept Diners Club and China UnionPay card numbers as valid Discover card numbers.
193 | * Allow manual entry of card numbers with unrecognized prefixes, as long as the card number passes the Luhn checksum test.
194 | * Make zh-Hant_HK the default dialect for zh-Hant (Traditional Chinese). (zh-Hant_TW remains available, as well.)
195 |
196 | --
197 |
198 | 3.7.1 (Mon 5/19/2014)
199 |
200 | * Improve handling of Traditional Chinese. (github issue #47)
201 |
202 | --
203 |
204 | 3.7.0 (Wed 4/30/2014)
205 |
206 | * Add new maskManualEntryDigits property to CardIOPaymentViewController.
207 | * Update PayPal logo.
208 |
209 | --
210 |
211 | 3.6.5 (Mon 4/21/2014)
212 |
213 | * Add Thai (th) to our supported localizations.
214 |
215 | --
216 |
217 | 3.6.4 (Tue 4/1/2014)
218 |
219 | * When the data-entry screen appears, automatically enter text-editing mode. (github issue #41)
220 |
221 | --
222 |
223 | 3.6.3 (Mon 3/10/2014)
224 |
225 | * Repair the disableManualEntryButtons property. (github issue #38)
226 |
227 | --
228 |
229 | 3.6.2 (Fri 3/7/2014)
230 |
231 | * Fix an orientation glitch when no camera is available.
232 |
233 | --
234 |
235 | 3.6.1 (Thu 3/6/2014)
236 |
237 | * Fix a compiler issue caused by a change in header file import ordering.
238 |
239 | --
240 |
241 | 3.6.0 (Thu 3/6/2014)
242 |
243 | * New appearance of the "Cancel" and "Enter Manually" buttons in camera view, including automatic button rotation to match device orientation.
244 | * New property, allowFreelyRotatingCardGuide, for both CardIOPaymentViewController and CardIOView; provides the option to constrain camera-view UI rotation to follow standard iOS behavior.
245 | * The manual entry screen now includes a landscape orientation.
246 |
247 | --
248 |
249 | 3.5.0 (Wed 2/26/2014)
250 |
251 | * Add suppressScannedCardImage property to CardIOPaymentViewController (github issue #33)
252 |
253 | --
254 |
255 | 3.4.4 (Tue 1/14/2014)
256 |
257 | * Fix two very rare bugs:
258 | - Card-scan succeeds, but then reports a nil card number;
259 | - Card-scan completes while the camera focus is being adjusted -> crash.
260 |
261 | --
262 |
263 | 3.4.3 (Thu 12/12/2013)
264 |
265 | * Restore use of CardIOView, which was accidentally broken in release 3.4.1.
266 |
267 | --
268 |
269 | 3.4.2 (Wed 12/11/2013)
270 |
271 | * Enable linking against iOS 6 SDK, for apps not yet targeted at iOS 7.
272 | * Add Arabic (ar) and Malay (ms) to our supported localizations.
273 | * Fix a memory leak when a user rapidly and repeatedly starts camera sessions.
274 |
275 | --
276 |
277 | 3.4.1 (Thu 12/05/2013)
278 |
279 | * Respect the setting for UIViewControllerBasedStatusBarAppearance in your app's Info.plist
280 | * Enable copy/paste for the manual-entry fields.
281 | * Improve the handling of right-to-left languages (e.g., Hebrew).
282 |
283 | --
284 |
285 | 3.4.0 (Tue 11/12/2013)
286 |
287 | * Now 64-bit compatible.
288 |
289 | --
290 |
291 | 3.3.0 (Tue 9/24/2013)
292 |
293 | * Introduce CardIOView for highly customizable, scan-only integration.
294 | * Fix a few small bugs.
295 |
296 | --
297 |
298 | 3.2.4 (Mon 9/16/2013)
299 |
300 | * Build with Xcode 5 GM seed.
301 | * Modify header comments to support Xcode 5 Quick Help.
302 | * Fix a few small bugs.
303 |
304 | --
305 |
306 | 3.2.3 (Thu 8/29/2013)
307 |
308 | * Ready for iOS 7 (please let us know if you discover any issues!)
309 | * Additional customizability in CardIOPaymentViewController:
310 | - guideColor
311 | - suppressScanConfirmation
312 | * The former first-time/how-to alert is no more.
313 | * Add human-readable version number to the string returned by +libraryVersion.
314 | * Correct a Russian localization issue (github issue #13).
315 |
316 | --
317 |
318 | 3.2.2 (Thu 8/8/2013)
319 |
320 | * Change all uses of ZIP to postalCode.
321 | * Fix a bug with translucent navigation bar (github issue #8).
322 | * Fix a bug with MKMapKit (github issue #10).
323 | * Add card.io version number to all header files (github issue #1).
324 |
325 | --
326 |
327 | 3.2.1 (Mon 7/29/2013)
328 |
329 | * Fix a rotation issue for apps which constrain their Supported Interface Orientations.
330 | * Add ko, pt_BR, and es_MX to our supported localizations.
331 |
332 | --
333 |
334 | 3.2.0 (Thu 5/30/2013)
335 |
336 | * Update the required C++ Standard Library from libstdc++ to libc++
337 | - NOTE: this will probably require a corresponding change to your app's
338 | "Other Linker Flags", from "-lstdc++" to "-lc++".
339 | (If you still need libstdc++ for a component other than card.io,
340 | you should be able to specify BOTH "-lstdc++" AND "-lc++".)
341 |
342 | ---
343 |
344 | 3.1.1 (Wed 5/15/2013)
345 |
346 | * Fix torch-related crash on certain devices (particularly including some models of iPod Touch)
347 |
348 | ---
349 |
350 | 3.1.0 (Tue 5/14/2013)
351 |
352 | * Add translations of all strings into ~20 languages, in addition to American English.
353 | - Translation choice is controlled by a new "languageOrLocale" property of CardIOPaymentViewController.
354 | - The translations that a few developers had previously created for their own apps will no longer be used by the SDK.
355 | - NOTE: Default language, if not set by your app, will now be based upon the device's current language setting.
356 | * Automatic control of the camera torch (for devices which support it).
357 |
358 | ---
359 |
360 | 3.0.11 (Fri 4/5/2013)
361 |
362 | * Add work-around for a linker bug that affected some simulator builds.
363 |
364 | ---
365 |
366 | 3.0.10 (Thu 4/4/2013)
367 |
368 | * Improve performance when card is lying on a flat surface.
369 | * Blur screen when app is backgrounded, for security purposes.
370 | * Eliminate some rare crashes caused by backgrounding the app during a scan.
371 |
372 | ---
373 |
374 | 3.0.9 (Fri 3/22/2013)
375 |
376 | * CardIOCreditCardTypeUnknown has been deprecated and will be removed in a future release.
377 | Use CardIOCreditCardTypeUnrecognized or CardIOCreditCardTypeAmbiguous instead.
378 | * Improved autofocus behavior.
379 | * Fix final iPad rotation bugs. (Really!)
380 |
381 | ---
382 |
383 | 3.0.8 (Tue 3/5/2013)
384 |
385 | * Add +logoForCardType: to CardIOCreditCardInfo.
386 | * Fix yet more iPad rotation bugs. (Sigh.)
387 |
388 | ---
389 |
390 | 3.0.7 (Thu 2/21/2013)
391 |
392 | * Add useCardIOLogo property to CardIOPaymentViewController.
393 | * Fix iPad rotation support for landscape-only iPad apps.
394 | * Improve credit card number validation.
395 |
396 | ---
397 |
398 | 3.0.6 (Mon 2/11/2013)
399 |
400 | * Add keepStatusBarStyle, navigationBarStyle, and navigationBarTintColor properties to CardIOPaymentViewController.
401 | * Minor accessibility improvements.
402 | * Fix crash when used with MapKit due to OpenGL interactions.
403 |
404 | ---
405 |
406 | 3.0.5 (Tue 1/29/2013)
407 |
408 | * Fix simulator-only linker failure.
409 |
410 | ---
411 |
412 | 3.0.4 (Tue 1/22/2013)
413 |
414 | * Now requires iOS 5+.
415 | * Improve iPad rotation support.
416 |
417 | ---
418 |
419 | 3.0.3 (Mon 12/3/2012)
420 |
421 | * Fix iOS 6 rotation bug.
422 | * Improve UI for iPhone 5 and iPad.
423 | * Reduce network chatter.
424 | * Switch to PayPal logo.
425 |
426 | ---
427 |
428 | 3.0.2 (Mon 9/17/2012)
429 |
430 | * Add armv7s support. Remove armv6 support.
431 |
432 | ---
433 |
434 | 3.0.1 (Wed 8/29/2012)
435 |
436 | * Fix Simulator build issues.
437 | * Minor bug fixes.
438 |
439 | ---
440 |
441 | 3.0 (Tue 8/21/2012)
442 |
443 | * Card scanning can now be done without network access.
444 | * The SDK now requires the OpenGLES framework.
445 | * The SDK no longer requires the SystemConfiguration framework.
446 | * Minor UI updates.
447 | * Expiry is not scanned in this version.
448 | * Scan availability notifications have been removed; scan availability no longer changes (a device either supports
449 | scanning or not), so notifications are unnecessary. In particular, CardIOPaymentViewController's
450 | +beginGeneratingScanAvailabilityNotifications, +endGeneratingScanAvailabilityNotifications,
451 | CardIOCardScanningDidBecomeAvailable, and CardIOCardScanningDidBecomeUnavailable have been removed.
452 |
453 | ---
454 |
455 | 2.3 (Tue 6/26/2012)
456 |
457 | * Add JCB support.
458 | * Add scanned property to CardIOCreditCardInfo.
459 | * Replace CardIOPaymentViewController's -initWithPaymentDelegate:forceManualEntry: with -initWithPaymentDelegate:scanningEnabled:. As before, this method should only be used for testing purposes. Note that the semantics for forceManualEntry: and scanningEnabled: are flipped (if you were using YES, now use NO).
460 | * Remove support for payment processing (now scan only).
461 | * The MessageUI framework is no longer used.
462 |
463 | -------------
464 |
465 | 2.2 (Mon 3/26/2012)
466 |
467 | * Add disableManualEntryButtons and supporting methods to CardIOPaymentViewController.
468 | * Remove calls to UIDevice's uniqueIdentifier.
469 |
470 | -------------
471 |
472 | 2.1 (Tue 2/7/2012)
473 |
474 | * Drop support for 3.x. The minimum iOS version supported is now 4.0.
475 | * The SDK now requires the Security framework.
476 | * Minor UI and usability improvements.
477 | * Bug fixes.
478 | * Enhanced fraud detection and security.
479 |
480 | -------------
481 |
482 | 2.0 (Thu 1/19/2012)
483 |
484 | * Added payment processing capabilities. See CardIO.h for a list of header files, and https://www.card.io/integrate/ios for integration instructions and sample code.
485 | * Removed deprecated CardIOPaymentViewControllerDelegate methods.
486 | * CardIOCreditCardInfo now implements NSCopying and uses copy properties.
487 | * CardIOPaymentViewController can now be used in a form sheet on the iPad.
488 | * UI improvements and bug fixes.
489 |
490 | -------------
491 |
492 | 1.2 (Thu 8/24/2011)
493 |
494 | * Easier integration: Instead of requiring files to be Objective-C++ (.mm), you can just use the linker flag -lstdc++ (add it to "Other Linker Flags").
495 | * Added -redactedCardNumber to CardIOCreditCardInfo class.
496 | * Improved card detection.
497 | * Fixed minor memory leak.
498 | * Minor data entry bug fixes.
499 |
500 | -------------
501 |
502 | 1.1.1 (Wed 8/3/2011)
503 |
504 | * Bug fix: Returned card number no longer contains spaces.
505 | * Several manual entry bug fixes.
506 |
507 | -------------
508 |
509 | 1.1 (Wed 7/27/2011)
510 |
511 | * Added CardIOCreditCardInfo class. This is a data class that encapsulates the properties of a card: number, expiration, cvv, card type, etc.
512 | * CardIOPaymentViewControllerDelegate now vends CardIOCreditCardInfo instances.
513 | * Deprecated userDidProvideCreditCardNumber:expiryMonth:expiryYear:cvv:inPaymentViewController: in favor of userDidProvideCreditCardInfo:inPaymentViewController:.
514 | * Added ability to optionally collect any/all of expiry, cvv, and zip code. (Previously, expiry was always collected and cvv was optional.)
515 | * Improved capture frame rate.
516 | * Usability improvements to manual entry.
517 |
518 | -------------
519 |
520 | 1.0 (Tue 5/17/2011)
521 |
522 | * First release.
523 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-card-io",
3 | "version": "1.0.5",
4 | "description": "React Native component for card.io",
5 | "repository": {
6 | "type": "git",
7 | "url": "git@github.com:kayla-tech/react-native-card-io.git"
8 | },
9 | "main": "index.js",
10 | "scripts": {
11 | "postinstall": "unzip ios/libs/card.io-iOS-SDK/CardIO/libCardIO.a.zip -d ios/libs/card.io-iOS-SDK/CardIO/"
12 | },
13 | "keywords": [
14 | "react-component",
15 | "react-native",
16 | "card.io",
17 | "credit",
18 | "card",
19 | "scanner",
20 | "native",
21 | "ios",
22 | "android"
23 | ],
24 | "author": "Roger Chapman",
25 | "license": "MIT"
26 | }
27 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # card.io component for React Native
2 |
3 | A fully featured implementation of [card.io](https://www.card.io/) for iOS and Android.
4 |
5 | 
6 |
7 | ## Installation iOS
8 |
9 | 1. Run `npm install react-native-card-io --save` in your project directory.
10 | 1. Open your project in XCode (make sure to open `.xcworkspace` NOT `.xcproject`), right click on `Libraries` and click `Add Files to "Your Project Name"`.
11 | 1. Within `node_modules`, find `react-native-card-io/ios` and add `RCTCardIO.xcodeproj` to your project.
12 | 1. Add `libRCTCardIO.a` to `Build Phases -> Link Binary With Libraries`.
13 | 1. Add the `-lc++` flag to `Build Settings -> Other Linker Flags`.
14 |
15 | ## Installation Android
16 |
17 | TODO: Currently building a react-native app for iOS and Android, so this will be done soon :)
18 |
19 | ## Usage
20 |
21 | ``` javascript
22 | import {CardIOView, CardIOUtilities} from 'react-native-card-io'
23 |
24 | ...
25 |
26 | componentDidMount() {
27 | // The preload method prepares card.io to launch faster. Calling preload is optional but suggested.
28 | // On an iPhone 5S, for example, preloading makes card.io launch ~400ms faster.
29 | // The best time to call preload is when displaying a view from which card.io might be launched;
30 | // e.g., inside your view controller's componentDidMount method.
31 | // preload works in the background; the call to preload returns immediately.
32 | CardIOUtilities.preload();
33 | },
34 |
35 | render() {
36 | if (CardIOUtilities.canReadCardWithCamera) {
37 | return (
38 |
39 | console.log(result)} />
50 |
51 | );
52 | }
53 | return (
54 |
55 | card.io requires a camera
56 |
57 | );
58 | }
59 |
60 | ```
61 |
62 | ## CardIOView
63 |
64 | ### props
65 |
66 | See `card_io_view.js` for all `React.PropTypes`.
67 | All props are optional and the view can be used with simply:
68 |
69 | ``` javascript
70 |
71 | ```
72 |
73 | ### didScanCard
74 |
75 | The `didScanCard` function returns the following object:
76 |
77 | ``` Javascript
78 | {
79 | cardNumber: string,
80 | redactedCardNumber: string,
81 | expiryMonth: number, // January == 1
82 | expiryYear: number,
83 | cvv: string,
84 | postalCode: string,
85 | scanned: boolean,
86 | cardImage: string, // base64
87 | cardType: string,
88 | logoForCardType: string, // base64
89 | }
90 | ```
91 |
92 | To display the images returned by `didScanCard` use the following:
93 |
94 | ``` javascript
95 |
96 | ```
97 |
98 | ## TODO
99 |
100 | - [ ] Android implementation
101 | - [ ] implement `CardIOPaymentViewController`
102 | - [ ] add rotation notifications
103 |
104 | ## Secure
105 |
106 | card.io does not store or transmit credit card numbers.
107 | Recommend using the [Privacy Snapshot react-native component](https://github.com/kayla-tech/react-native-privacy-snapshot) if using with iOS to blur the screen when the app is backgrounded.
108 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kayla-tech/react-native-card-io/ea4470c53b9438e716d0fe7b8fe18a79675c3d37/screenshot.png
--------------------------------------------------------------------------------