diff --git a/.gitignore b/.gitignore index 0a15922..9662255 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ demo/platforms/ios/DemoApp.xcodeproj/project.xcworkspace demo/platforms/ios/Pods demo/platforms/ios/Podfile.lock demo/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata +demo/package-lock.json # Log Files *.log diff --git a/README.md b/README.md index e241f3c..d113cc5 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Official Jumio Mobile SDK plugin for Apache Cordova +This plugin is compatible with version 2.12.0 of the Jumio SDK. This is the final update to the Cordova plugin — future SDK compatibility can not be guaranteed. If you have questions, please reach out to your Account Manager or contact Jumio Support at support@jumio.com or https://support.jumio.com + ## Compatibility With this release, we only ensure compatibility with the latest Cordova versions and plugins. At the time of this release, the following minimum versions are supported: @@ -17,14 +19,14 @@ cordova create MyProject com.my.project "MyProject" cd MyProject cordova platform add ios cordova platform add android -cordova plugin add https://github.com/Jumio/mobile-cordova.git#v2.11.0 +cordova plugin add https://github.com/Jumio/mobile-cordova.git#v2.12.0 ``` ## Integration ### iOS -Manual integration or dependency management via cocoapods possible, please see [the official documentation of the Jumio Mobile SDK for iOS](https://github.com/Jumio/mobile-sdk-ios/tree/v2.11.0#basic-setup) +Manual integration or dependency management via cocoapods possible, please see [the official documentation of the Jumio Mobile SDK for iOS](https://github.com/Jumio/mobile-sdk-ios/tree/v2.12.0#basic-setup) ### Android @@ -41,17 +43,17 @@ Add a parameter for your SDK_VERSION into the ext-section: ``` ext { - SDK_VERSION = "2.11.0" + SDK_VERSION = "2.12.0" } ``` -Add required permissions for the products as described in chapter [Permissions](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/README.md#permissions) +Add required permissions for the products as described in chapter [Permissions](https://github.com/Jumio/mobile-sdk-android/blob/v2.12.0/README.md#permissions) Open the android project of your cordova project located in */platforms/android* and insert the dependencies from the products you require to your **build.gradle** file. (Module: android) -* [Netverify & Fastfill](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_netverify-fastfill.md#dependencies) -* [Document Verification](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_document-verification.md#dependencies) -* [BAM Checkout](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_bam-checkout.md#dependencies) +* [Netverify & Fastfill](https://github.com/Jumio/mobile-sdk-android/blob/v2.12.0/docs/integration_netverify-fastfill.md#dependencies) +* [Document Verification](https://github.com/Jumio/mobile-sdk-android/blob/v2.12.0/docs/integration_document-verification.md#dependencies) +* [BAM Checkout](https://github.com/Jumio/mobile-sdk-android/blob/v2.12.0/docs/integration_bam-checkout.md#dependencies) __Note:__ If you are using Netverify, make sure to add the Google vision meta-data to you **AndroidManifest.xml** accordingly: @@ -64,7 +66,6 @@ __Note:__ If you are using Netverify, make sure to add the Google vision meta-da ## Usage - ### Netverify / Fastfill To initialize the SDK, perform the following call. @@ -88,7 +89,6 @@ Configure the SDK with the *configuration*-Object. | merchantScanReference | String | Allows you to identify the scan (max. 100 characters) | | merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) | | customerId | String | Set a customer identifier (max. 100 characters) | -| additionalInformation | String | Add additional paramter (max. 255 characters) | | sendDebugInfoToJumio | Boolean | Send debug information to Jumio. | | dataExtractionOnMobileOnly | Boolean | Limit data extraction to be done on device only | | cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. | @@ -170,10 +170,10 @@ Configure the SDK with the *configuration*-Object. **(configuration marked with | **merchantScanReference*** | String | Allows you to identify the scan (max. 100 characters) | | merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) | | callbackUrl | String | Specify an URL for individual transactions | -| additionalInformation | String | Add additional paramter (max. 255 characters) | | documentName | String | Override the document label on the help screen | | customDocumentCode | String | Set your custom document code (set in the merchant backend under "Settings" - "Multi Documents" - "Custom" | | cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. | +| enableExtraction | bool | Enable/disable data extraction for documents. | Possible types: @@ -295,13 +295,13 @@ Jumio.startBAM(function(cardInformation) { ### Android #### Netverify -The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_netverify-fastfill.md#customization). +The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v2.12.0/docs/integration_netverify-fastfill.md#customization). #### BAM Checkout -The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_bam-checkout.md#customization). +The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v2.12.0/docs/integration_bam-checkout.md#customization). #### Document Verification -The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_document-verification.md#customization). +The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v2.12.0/docs/integration_document-verification.md#customization). ### iOS The SDK can be customized to the respective needs. You can pass the following customization options to the initializer: diff --git a/demo/README.md b/demo/README.md index 272a066..5e101e4 100755 --- a/demo/README.md +++ b/demo/README.md @@ -7,7 +7,7 @@ Update your SDK credentials in www/js/index.js and run the following commands. ### iOS ``` -cd platform/ios +cd platforms/ios pod install cd ../.. cordova run ios diff --git a/demo/config.xml b/demo/config.xml index 0d2612c..4861da9 100644 --- a/demo/config.xml +++ b/demo/config.xml @@ -1,5 +1,5 @@ - + DemoApp A sample Apache Cordova application that responds to the deviceready event. diff --git a/demo/node_modules/cordova-plugin-jumio-mobilesdk/README.md b/demo/node_modules/cordova-plugin-jumio-mobilesdk/README.md index 4bf84cc..a2a233a 100644 --- a/demo/node_modules/cordova-plugin-jumio-mobilesdk/README.md +++ b/demo/node_modules/cordova-plugin-jumio-mobilesdk/README.md @@ -88,7 +88,6 @@ Configure the SDK with the *configuration*-Object. | merchantScanReference | String | Allows you to identify the scan (max. 100 characters) | | merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) | | customerId | String | Set a customer identifier (max. 100 characters) | -| additionalInformation | String | Add additional paramter (max. 255 characters) | | sendDebugInfoToJumio | Boolean | Send debug information to Jumio. | | dataExtractionOnMobileOnly | Boolean | Limit data extraction to be done on device only | | cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. | @@ -170,7 +169,6 @@ Configure the SDK with the *configuration*-Object. **(configuration marked with | **merchantScanReference*** | String | Allows you to identify the scan (max. 100 characters) | | merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) | | callbackUrl | String | Specify an URL for individual transactions | -| additionalInformation | String | Add additional paramter (max. 255 characters) | | documentName | String | Override the document label on the help screen | | customDocumentCode | String | Set your custom document code (set in the merchant backend under "Settings" - "Multi Documents" - "Custom" | | cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. | diff --git a/demo/node_modules/cordova-plugin-jumio-mobilesdk/package.json b/demo/node_modules/cordova-plugin-jumio-mobilesdk/package.json index ab23890..b5abd97 100644 --- a/demo/node_modules/cordova-plugin-jumio-mobilesdk/package.json +++ b/demo/node_modules/cordova-plugin-jumio-mobilesdk/package.json @@ -80,7 +80,7 @@ "license": "ISC", "name": "cordova-plugin-jumio-mobilesdk", "optionalDependencies": {}, - "readme": "# Plugin for Apache Cordova\r\n\r\nOfficial Jumio Mobile SDK plugin for Apache Cordova\r\n\r\n## Compatibility\r\nWith this release, we only ensure compatibility with the latest Cordova versions and plugins.\r\nAt the time of this release, the following minimum versions are supported:\r\n* Cordova: 7.1.0\r\n* Cordova Android: 6.3.0\r\n* Cordova iOS: 4.5.3\r\n\r\n## Setup\r\n\r\nCreate Cordova project and add our plugin\r\n```\r\ncordova create MyProject com.my.project \"MyProject\"\r\ncd MyProject\r\ncordova platform add ios\r\ncordova platform add android\r\ncordova plugin add https://github.com/Jumio/mobile-cordova.git#v2.11.0\r\n```\r\n\r\n## Integration\r\n\r\n### iOS\r\n\r\nManual integration or dependency management via cocoapods possible, please see [the official documentation of the Jumio Mobile SDK for iOS](https://github.com/Jumio/mobile-sdk-ios/tree/v2.11.0#basic-setup)\r\n\r\n### Android\r\n\r\nAdd the Jumio repository:\r\n\r\n```\r\nrepositories {\r\n maven { url 'http://mobile-sdk.jumio.com' }\r\n maven { url 'https://maven.google.com/' }\r\n}\r\n```\r\n\r\nAdd a parameter for your SDK_VERSION into the ext-section:\r\n\r\n```\r\next {\r\n SDK_VERSION = \"2.11.0\"\r\n}\r\n```\r\n\r\nAdd required permissions for the products as described in chapter [Permissions](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/README.md#permissions)\r\n\r\nOpen the android project of your cordova project located in */platforms/android* and insert the dependencies from the products you require to your **build.gradle** file. (Module: android)\r\n\r\n* [Netverify & Fastfill](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_netverify-fastfill.md#dependencies)\r\n* [Document Verification](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_document-verification.md#dependencies)\r\n* [BAM Checkout](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_bam-checkout.md#dependencies)\r\n\r\n__Note:__ If you are using Netverify, make sure to add the Google vision meta-data to you **AndroidManifest.xml** accordingly:\r\n\r\n```\r\n\r\n```\r\n\r\n## Usage\r\n\r\n\r\n### Netverify / Fastfill\r\n\r\nTo initialize the SDK, perform the following call.\r\n\r\n```javascript\r\nJumio.initNetverify(, , , {configuration});\r\n```\r\n\r\nDatacenter can either be **US** or **EU**.\r\n\r\n\r\n\r\nConfigure the SDK with the *configuration*-Object.\r\n\r\n| Configuration | Datatype | Description |\r\n| ------ | -------- | ----------- |\r\n| requireVerification | Boolean | Enable ID verification |\r\n| callbackUrl | String | Specify an URL for individual transactions |\r\n| requireFaceMatch | Boolean | Enable face match during the ID verification for a specific transaction |\r\n| preselectedCountry | Boolean | Specify the issuing country (ISO 3166-1 alpha-3 country code) |\r\n| merchantScanReference | String | Allows you to identify the scan (max. 100 characters) |\r\n| merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) |\r\n| customerId | String | Set a customer identifier (max. 100 characters) |\r\n| additionalInformation | String | Add additional paramter (max. 255 characters) |\r\n| sendDebugInfoToJumio | Boolean | Send debug information to Jumio. |\r\n| dataExtractionOnMobileOnly | Boolean | Limit data extraction to be done on device only |\r\n| cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. |\r\n| preselectedDocumentVariant | String | Which types of document variants are available. Can be **PAPER** or **PLASTIC** |\r\n| documentTypes | String-Array | An array of accepted document types: Available document types: **PASSPORT**, **DRIVER_LICENSE**, **IDENTITY_CARD**, **VISA** |\r\n\r\n\r\nInitialization example with configuration.\r\n\r\n```javascript\r\nJumio.initNetverify(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n requireVerification: false,\r\n customerId: \"CUSTOMERID\",\r\n preselectedCountry: \"USA\",\r\n cameraPosition: \"BACK\",\r\n documentTypes: [\"DRIVER_LICENSE\", \"PASSPORT\", \"IDENTITY_CARD\", \"VISA\"]\r\n});\r\n```\r\n\r\n***Android eMRTD scanning***\r\n\r\nIf you are using eMRTD scanning, following lines are needed in your Manifest file:\r\n\r\n```javascript\r\n-keep class net.sf.scuba.smartcards.IsoDepCardService {*;}\r\n-keep class org.jmrtd.** { *; }\r\n-keep class net.sf.scuba.** {*;}\r\n-keep class org.spongycastle.** {*;}\r\n-keep class org.ejbca.** {*;}\r\n\r\n-dontwarn java.nio.**\r\n-dontwarn org.codehaus.**\r\n-dontwarn org.ejbca.**\r\n-dontwarn org.spongycastle.**\r\n```\r\n\r\nAdd the needed dependencies following [this chapter](https://github.com/Jumio/mobile-sdk-android/blob/master/docs/integration_netverify-fastfill.md#dependencies) of the android integration guide.\r\n\r\nEnable eMRTD by using the following method in your native android code:\r\n\r\n```javascript\r\nnetverifySDK.setEnableEMRTD(true);\r\n```\r\n\r\n\r\nAs soon as the sdk is initialized, the sdk is started by the following call.\r\n\r\n```javascript\r\nJumio.startNetverify(successCallback, errorCallback);\r\n```\r\n\r\nExample\r\n\r\n```javascript\r\nJumio.startNetverify(function(documentData) {\r\n // YOUR CODE\r\n}, function(error) {\r\n // YOUR CODE\r\n});\r\n```\r\n\r\n### Document Verification\r\n\r\nTo initialize the SDK, perform the following call.\r\n\r\n```javascript\r\nJumio.initDocumentVerification(, , , {configuration});\r\n```\r\n\r\nDatacenter can either be **US** or **EU**.\r\n\r\nConfigure the SDK with the *configuration*-Object. **(configuration marked with * are mandatory)**\r\n\r\n| Configuration | Datatype | Description |\r\n| ------ | -------- | ----------- |\r\n| **type*** | String | See the list below |\r\n| **customerId*** | String | Set a customer identifier (max. 100 characters) |\r\n| **country*** | String | Set the country (ISO-3166-1 alpha-3 code) |\r\n| **merchantScanReference*** | String | Allows you to identify the scan (max. 100 characters) |\r\n| merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) |\r\n| callbackUrl | String | Specify an URL for individual transactions |\r\n| additionalInformation | String | Add additional paramter (max. 255 characters) |\r\n| documentName | String | Override the document label on the help screen |\r\n| customDocumentCode | String | Set your custom document code (set in the merchant backend under \"Settings\" - \"Multi Documents\" - \"Custom\" |\r\n| cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. |\r\n\r\nPossible types:\r\n\r\n* BS (Bank statement)\r\n* IC (Insurance card)\r\n* UB (Utility bill, front side)\r\n* CAAP (Cash advance application)\r\n* CRC (Corporate resolution certificate)\r\n* CCS (Credit card statement)\r\n* LAG (Lease agreement)\r\n* LOAP (Loan application)\r\n* MOAP (Mortgage application)\r\n* TR (Tax return)\r\n* VT (Vehicle title)\r\n* VC (Voided check)\r\n* STUC (Student card)\r\n* HCC (Health care card)\r\n* CB (Council bill)\r\n* SENC (Seniors card)\r\n* MEDC (Medicare card)\r\n* BC (Birth certificate)\r\n* WWCC (Working with children check)\r\n* SS (Superannuation statement)\r\n* TAC (Trade association card)\r\n* SEL (School enrolment letter)\r\n* PB (Phone bill)\r\n* USSS (US social security card)\r\n* SSC (Social security card)\r\n* CUSTOM (Custom document type)\r\n\r\nInitialization example with configuration.\r\n\r\n```javascript\r\nJumio.initDocumentVerification(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n type: \"BC\",\r\n customerId: \"CUSTOMER ID\",\r\n country: \"USA\",\r\n merchantScanReference: \"YOURSCANREFERENCE\",\r\n cameraPosition: \"BACK\"\r\n});\r\n```\r\n\r\nAs soon as the SDK is initialized, the SDK is started by the following call.\r\n\r\n```javascript\r\nJumio.startDocumentVerification(successCallback, errorCallback);\r\n```\r\n\r\nExample\r\n\r\n```javascript\r\nJumio.startDocumentVerification(function(documentData) {\r\n // YOUR CODE\r\n}, function(error) {\r\n // YOUR CODE\r\n});\r\n```\r\n\r\n### BAM Checkout\r\n\r\nTo Initialize the SDK, perform the following call.\r\n\r\n```javascript\r\nJumio.initBAM(, , , {configuration});\r\n```\r\n\r\nDatacenter can either be **US** or **EU**.\r\n\r\n\r\n\r\nConfigure the SDK with the *configuration*-Object.\r\n\r\n| Configuration | Datatype | Description |\r\n| ------ | -------- | ----------- |\r\n| cardHolderNameRequired | Boolean |\r\n| sortCodeAndAccountNumberRequired | Boolean |\r\n| expiryRequired | Boolean |\r\n| cvvRequired | Boolean |\r\n| expiryEditable | Boolean |\r\n| cardHolderNameEditable | Boolean |\r\n| merchantReportingCriteria | String | Overwrite your specified reporting criteria to identify each scan attempt in your reports (max. 100 characters)\r\n| vibrationEffectEnabled | Boolean |\r\n| enableFlashOnScanStart | Boolean |\r\n| cardNumberMaskingEnabled | Boolean |\r\n| offlineToken | String | In your Jumio merchant backend on the \"Settings\" page under \"API credentials\" you can find your Offline token. In case you use your offline token, you must not set the API token and secret|\r\n| cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. |\r\n| cardTypes | String-Array | An array of accepted card types. Available card types: **VISA**, **MASTER_CARD**, **AMERICAN_EXPRESS**, **CHINA_UNIONPAY**, **DINERS_CLUB**, **DISCOVER**, **JCB**, **STARBUCKS** |\r\n\r\nInitialization example with configuration.\r\n\r\n```javascript\r\nJumio.initBAM(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n cardHolderNameRequired: false,\r\n cvvRequired: true,\r\n cameraPosition: \"BACK\",\r\n cardTypes: [\"VISA\", \"MASTER_CARD\"]\r\n});\r\n```\r\n\r\n\r\nAs soon as the sdk is initialized, the sdk is started by the following call.\r\n\r\n```javascript\r\nJumio.startBAM(successCallback, errorCallback);\r\n```\r\n\r\nExample\r\n\r\n```javascript\r\nJumio.startBAM(function(cardInformation) {\r\n // YOUR CODE\r\n}, function(error) {\r\n // YOUR CODE\r\n});\r\n```\r\n\r\n## Customization\r\n\r\n### Android\r\nThe Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_netverify-fastfill.md#customization).\r\n\r\n### iOS\r\nThe SDK can be customized to the respective needs. You can pass the following customization options to the initializer:\r\n\r\n| Customization key | Type | Description |\r\n|:------------------|:-----|:------------|\r\n| disableBlur | BOOL | Deactivate the blur effect |\r\n| backgroundColor | STRING | Change base view's background color |\r\n| foregroundColor | STRING | Change base view's foreground color |\r\n| tintColor | STRING | Change the tint color of the navigation bar |\r\n| barTintColor | STRING | Change the bar tint color of the navigation bar |\r\n| textTitleColor | STRING | Change the text title color of the navigation bar |\r\n| documentSelectionHeaderBackgroundColor | STRING | Change the background color of the document selection header |\r\n| documentSelectionHeaderTitleColor | STRING | Change the title color of the document selection header |\r\n| documentSelectionHeaderIconColor | STRING | Change the icon color of the document selection header |\r\n| documentSelectionButtonBackgroundColor | STRING | Change the background color of the document selection button |\r\n| documentSelectionButtonTitleColor | STRING | Change the title color of the document selection button |\r\n| documentSelectionButtonIconColor | STRING | Change the icon color of the document selection button |\r\n| fallbackButtonBackgroundColor | STRING | Change the background color of the fallback button |\r\n| fallbackButtonBorderColor | STRING | Change the border color of the fallback button |\r\n| fallbackButtonTitleColor | STRING | Change the title color of the fallback button |\r\n| positiveButtonBackgroundColor | STRING | Change the background color of the positive button |\r\n| positiveButtonBorderColor | STRING | Change the border color of the positive button |\r\n| positiveButtonTitleColor | STRING | Change the title color of the positive button |\r\n| negativeButtonBackgroundColor | STRING | Change the background color of the negative button |\r\n| negativeButtonBorderColor | STRING | Change the border color of the negative button |\r\n| negativeButtonTitleColor | STRING | Change the title color of the negative button |\r\n| scanOverlayStandardColor (NV only) | STRING | Change the standard color of the scan overlay |\r\n| scanOverlayValidColor (NV only) | STRING | Change the valid color of the scan overlay |\r\n| scanOverlayInvalidColor (NV only) | STRING | Change the invalid color of the scan overlay |\r\n| scanOverlayTextColor (BAM only) | STRING | Change the text color of the scan overlay |\r\n| scanOverlayBorderColor (BAM only) | STRING | Change the border color of the scan overlay |\r\n\r\nAll colors are provided with a HEX string with the following format: #ff00ff.\r\n\r\n**Customization example**\r\n```javascript\r\nJumio.initNetverify(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n requireVerification: false,\r\n ...\r\n}, {\r\n disableBlur: true,\r\n backgroundColor: \"#ff00ff\",\r\n barTintColor: \"#ff1298\"\r\n);\r\n```\r\n\r\n## Callback\r\n\r\nTo get information about callbacks, Netverify Retrieval API, Netverify Delete API and Global Netverify settings and more, please read our [page with server related information](https://github.com/Jumio/implementation-guides/blob/master/netverify/callback.md).\r\n\r\nThe JSONObject with all the extracted data that is returned for the specific products is described in the following subchapters:\r\n\r\n### Netverify & Fastfill\r\n\r\n*NetverifyDocumentData:*\r\n\r\n| Parameter | Type | Max. length | Description |\r\n|:-------------------|:----------- \t|:-------------|:-----------------|\r\n| selectedCountry | String| 3| [ISO 3166-1 alpha-3](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code as provided or selected |\r\n| selectedDocumentType | String | 16| PASSPORT, DRIVER_LICENSE, IDENTITY_CARD or VISA |\r\n| idNumber | String | 100 | Identification number of the document |\r\n| personalNumber | String | 14| Personal number of the document|\r\n| issuingDate | Date | | Date of issue |\r\n| expiryDate | Date | | Date of expiry |\r\n| issuingCountry | String | 3 | Country of issue as ([ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)) country code |\r\n| lastName | String | 100 | Last name of the customer|\r\n| firstName | String | 100 | First name of the customer|\r\n| middleName | String | 100 | Middle name of the customer |\r\n| dob | Date | | Date of birth |\r\n| gender | String | 1| m or f |\r\n| originatingCountry | String | 3|Country of origin as ([ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)) country code |\r\n| addressLine | String | 64 | Street name\t|\r\n| city | String | 64 | City |\r\n| subdivision | String | 3 | Last three characters of [ISO 3166-2:US](http://en.wikipedia.org/wiki/ISO_3166-2:US) state code\t|\r\n| postCode | String | 15 | Postal code |\r\n| mrzData | MRZ-DATA | | MRZ data, see table below |\r\n| optionalData1 | String | 50 | Optional field of MRZ line 1 |\r\n| optionalData2 | String | 50 | Optional field of MRZ line 2 |\r\n| placeOfBirth | String | 255 | Place of Birth |\r\n| extractionMethod | String | 12| MRZ, OCR, BARCODE, BARCODE_OCR or NONE |\r\n\r\n*MRZ-Data*\r\n\r\n| Parameter |Type | Max. length | Description |\r\n|:---------------|:------------- |:-------------|:-----------------|\r\n| format | String | 8| MRP, TD1, TD2, CNIS, MRVA, MRVB or UNKNOWN |\r\n| line1 | String | 50 | MRZ line 1 |\r\n| line2 | String | 50 | MRZ line 2 |\r\n| line3 | String | 50| MRZ line 3 |\r\n| idNumberValid | BOOL| | True if ID number check digit is valid, otherwise false |\r\n| dobValid | BOOL | | True if date of birth check digit is valid, otherwise false |\r\n| expiryDateValid |\tBOOL| |\tTrue if date of expiry check digit is valid or not available, otherwise false|\r\n| personalNumberValid | BOOL | | True if personal number check digit is valid or not available, otherwise false |\r\n| compositeValid | BOOL | | True if composite check digit is valid, otherwise false |\r\n\r\n### BAM Checkout\r\n\r\n*BAMCardInformation*\r\n\r\n|Parameter | Type | Max. length | Description |\r\n|:---------------------------- \t|:-------------|:-----------------|:-------------|\r\n| cardType | String | 16| VISA, MASTER_CARD, AMERICAN_EXPRESS, CHINA_UNIONPAY, DINERS_CLUB, DISCOVER, JCB or STARBUCKS |\r\n| cardNumber | String | 16 | Full credit card number |\r\n| cardNumberGrouped | String | 19 | Grouped credit card number |\r\n| cardNumberMasked | String | 19 | First 6 and last 4 digits of the grouped credit card number, other digits are masked with \"X\" |\r\n| cardExpiryMonth | String | 2 | Month card expires if enabled and readable |\r\n| CardExpiryYear | String | 2 | Year card expires if enabled and readable |\r\n| cardExpiryDate | String | 5 | Date card expires in the format MM/yy if enabled and readable |\r\n| cardCVV | String | 4 | Entered CVV if enabled |\r\n| cardHolderName | String | 100 | Name of the card holder in capital letters if enabled and readable, or as entered if editable |\r\n| cardSortCode | String | 8 | Sort code in the format xx-xx-xx or xxxxxx if enabled, available and readable |\r\n| cardAccountNumber | String | 8 | Account number if enabled, available and readable |\r\n| cardSortCodeValid | BOOL | | True if sort code valid, otherwise false |\r\n| cardAccountNumberValid | BOOL | | True if account number code valid, otherwise false |\r\n\r\n### Document Verification\r\n\r\nNo data returned.\r\n\r\n# Support\r\n\r\n## Contact\r\n\r\nIf you have any questions regarding our implementation guide please contact Jumio Customer Service at support@jumio.com or https://support.jumio.com. The Jumio online helpdesk contains a wealth of information regarding our service including demo videos, product descriptions, FAQs and other things that may help to get you started with Jumio. Check it out at: https://support.jumio.com.\r\n\r\n## Copyright\r\n\r\n© Jumio Corp. 268 Lambert Avenue, Palo Alto, CA 94306\r\n", + "readme": "# Plugin for Apache Cordova\r\n\r\nOfficial Jumio Mobile SDK plugin for Apache Cordova\r\n\r\n## Compatibility\r\nWith this release, we only ensure compatibility with the latest Cordova versions and plugins.\r\nAt the time of this release, the following minimum versions are supported:\r\n* Cordova: 7.1.0\r\n* Cordova Android: 6.3.0\r\n* Cordova iOS: 4.5.3\r\n\r\n## Setup\r\n\r\nCreate Cordova project and add our plugin\r\n```\r\ncordova create MyProject com.my.project \"MyProject\"\r\ncd MyProject\r\ncordova platform add ios\r\ncordova platform add android\r\ncordova plugin add https://github.com/Jumio/mobile-cordova.git#v2.11.0\r\n```\r\n\r\n## Integration\r\n\r\n### iOS\r\n\r\nManual integration or dependency management via cocoapods possible, please see [the official documentation of the Jumio Mobile SDK for iOS](https://github.com/Jumio/mobile-sdk-ios/tree/v2.11.0#basic-setup)\r\n\r\n### Android\r\n\r\nAdd the Jumio repository:\r\n\r\n```\r\nrepositories {\r\n maven { url 'http://mobile-sdk.jumio.com' }\r\n maven { url 'https://maven.google.com/' }\r\n}\r\n```\r\n\r\nAdd a parameter for your SDK_VERSION into the ext-section:\r\n\r\n```\r\next {\r\n SDK_VERSION = \"2.11.0\"\r\n}\r\n```\r\n\r\nAdd required permissions for the products as described in chapter [Permissions](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/README.md#permissions)\r\n\r\nOpen the android project of your cordova project located in */platforms/android* and insert the dependencies from the products you require to your **build.gradle** file. (Module: android)\r\n\r\n* [Netverify & Fastfill](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_netverify-fastfill.md#dependencies)\r\n* [Document Verification](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_document-verification.md#dependencies)\r\n* [BAM Checkout](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_bam-checkout.md#dependencies)\r\n\r\n__Note:__ If you are using Netverify, make sure to add the Google vision meta-data to you **AndroidManifest.xml** accordingly:\r\n\r\n```\r\n\r\n```\r\n\r\n## Usage\r\n\r\n\r\n### Netverify / Fastfill\r\n\r\nTo initialize the SDK, perform the following call.\r\n\r\n```javascript\r\nJumio.initNetverify(, , , {configuration});\r\n```\r\n\r\nDatacenter can either be **US** or **EU**.\r\n\r\n\r\n\r\nConfigure the SDK with the *configuration*-Object.\r\n\r\n| Configuration | Datatype | Description |\r\n| ------ | -------- | ----------- |\r\n| requireVerification | Boolean | Enable ID verification |\r\n| callbackUrl | String | Specify an URL for individual transactions |\r\n| requireFaceMatch | Boolean | Enable face match during the ID verification for a specific transaction |\r\n| preselectedCountry | Boolean | Specify the issuing country (ISO 3166-1 alpha-3 country code) |\r\n| merchantScanReference | String | Allows you to identify the scan (max. 100 characters) |\r\n| merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) |\r\n| customerId | String | Set a customer identifier (max. 100 characters) |\r\n| sendDebugInfoToJumio | Boolean | Send debug information to Jumio. |\r\n| dataExtractionOnMobileOnly | Boolean | Limit data extraction to be done on device only |\r\n| cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. |\r\n| preselectedDocumentVariant | String | Which types of document variants are available. Can be **PAPER** or **PLASTIC** |\r\n| documentTypes | String-Array | An array of accepted document types: Available document types: **PASSPORT**, **DRIVER_LICENSE**, **IDENTITY_CARD**, **VISA** |\r\n\r\n\r\nInitialization example with configuration.\r\n\r\n```javascript\r\nJumio.initNetverify(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n requireVerification: false,\r\n customerId: \"CUSTOMERID\",\r\n preselectedCountry: \"USA\",\r\n cameraPosition: \"BACK\",\r\n documentTypes: [\"DRIVER_LICENSE\", \"PASSPORT\", \"IDENTITY_CARD\", \"VISA\"]\r\n});\r\n```\r\n\r\n***Android eMRTD scanning***\r\n\r\nIf you are using eMRTD scanning, following lines are needed in your Manifest file:\r\n\r\n```javascript\r\n-keep class net.sf.scuba.smartcards.IsoDepCardService {*;}\r\n-keep class org.jmrtd.** { *; }\r\n-keep class net.sf.scuba.** {*;}\r\n-keep class org.spongycastle.** {*;}\r\n-keep class org.ejbca.** {*;}\r\n\r\n-dontwarn java.nio.**\r\n-dontwarn org.codehaus.**\r\n-dontwarn org.ejbca.**\r\n-dontwarn org.spongycastle.**\r\n```\r\n\r\nAdd the needed dependencies following [this chapter](https://github.com/Jumio/mobile-sdk-android/blob/master/docs/integration_netverify-fastfill.md#dependencies) of the android integration guide.\r\n\r\nEnable eMRTD by using the following method in your native android code:\r\n\r\n```javascript\r\nnetverifySDK.setEnableEMRTD(true);\r\n```\r\n\r\n\r\nAs soon as the sdk is initialized, the sdk is started by the following call.\r\n\r\n```javascript\r\nJumio.startNetverify(successCallback, errorCallback);\r\n```\r\n\r\nExample\r\n\r\n```javascript\r\nJumio.startNetverify(function(documentData) {\r\n // YOUR CODE\r\n}, function(error) {\r\n // YOUR CODE\r\n});\r\n```\r\n\r\n### Document Verification\r\n\r\nTo initialize the SDK, perform the following call.\r\n\r\n```javascript\r\nJumio.initDocumentVerification(, , , {configuration});\r\n```\r\n\r\nDatacenter can either be **US** or **EU**.\r\n\r\nConfigure the SDK with the *configuration*-Object. **(configuration marked with * are mandatory)**\r\n\r\n| Configuration | Datatype | Description |\r\n| ------ | -------- | ----------- |\r\n| **type*** | String | See the list below |\r\n| **customerId*** | String | Set a customer identifier (max. 100 characters) |\r\n| **country*** | String | Set the country (ISO-3166-1 alpha-3 code) |\r\n| **merchantScanReference*** | String | Allows you to identify the scan (max. 100 characters) |\r\n| merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) |\r\n| callbackUrl | String | Specify an URL for individual transactions |\r\n| documentName | String | Override the document label on the help screen |\r\n| customDocumentCode | String | Set your custom document code (set in the merchant backend under \"Settings\" - \"Multi Documents\" - \"Custom\" |\r\n| cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. |\r\n\r\nPossible types:\r\n\r\n* BS (Bank statement)\r\n* IC (Insurance card)\r\n* UB (Utility bill, front side)\r\n* CAAP (Cash advance application)\r\n* CRC (Corporate resolution certificate)\r\n* CCS (Credit card statement)\r\n* LAG (Lease agreement)\r\n* LOAP (Loan application)\r\n* MOAP (Mortgage application)\r\n* TR (Tax return)\r\n* VT (Vehicle title)\r\n* VC (Voided check)\r\n* STUC (Student card)\r\n* HCC (Health care card)\r\n* CB (Council bill)\r\n* SENC (Seniors card)\r\n* MEDC (Medicare card)\r\n* BC (Birth certificate)\r\n* WWCC (Working with children check)\r\n* SS (Superannuation statement)\r\n* TAC (Trade association card)\r\n* SEL (School enrolment letter)\r\n* PB (Phone bill)\r\n* USSS (US social security card)\r\n* SSC (Social security card)\r\n* CUSTOM (Custom document type)\r\n\r\nInitialization example with configuration.\r\n\r\n```javascript\r\nJumio.initDocumentVerification(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n type: \"BC\",\r\n customerId: \"CUSTOMER ID\",\r\n country: \"USA\",\r\n merchantScanReference: \"YOURSCANREFERENCE\",\r\n cameraPosition: \"BACK\"\r\n});\r\n```\r\n\r\nAs soon as the SDK is initialized, the SDK is started by the following call.\r\n\r\n```javascript\r\nJumio.startDocumentVerification(successCallback, errorCallback);\r\n```\r\n\r\nExample\r\n\r\n```javascript\r\nJumio.startDocumentVerification(function(documentData) {\r\n // YOUR CODE\r\n}, function(error) {\r\n // YOUR CODE\r\n});\r\n```\r\n\r\n### BAM Checkout\r\n\r\nTo Initialize the SDK, perform the following call.\r\n\r\n```javascript\r\nJumio.initBAM(, , , {configuration});\r\n```\r\n\r\nDatacenter can either be **US** or **EU**.\r\n\r\n\r\n\r\nConfigure the SDK with the *configuration*-Object.\r\n\r\n| Configuration | Datatype | Description |\r\n| ------ | -------- | ----------- |\r\n| cardHolderNameRequired | Boolean |\r\n| sortCodeAndAccountNumberRequired | Boolean |\r\n| expiryRequired | Boolean |\r\n| cvvRequired | Boolean |\r\n| expiryEditable | Boolean |\r\n| cardHolderNameEditable | Boolean |\r\n| merchantReportingCriteria | String | Overwrite your specified reporting criteria to identify each scan attempt in your reports (max. 100 characters)\r\n| vibrationEffectEnabled | Boolean |\r\n| enableFlashOnScanStart | Boolean |\r\n| cardNumberMaskingEnabled | Boolean |\r\n| offlineToken | String | In your Jumio merchant backend on the \"Settings\" page under \"API credentials\" you can find your Offline token. In case you use your offline token, you must not set the API token and secret|\r\n| cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. |\r\n| cardTypes | String-Array | An array of accepted card types. Available card types: **VISA**, **MASTER_CARD**, **AMERICAN_EXPRESS**, **CHINA_UNIONPAY**, **DINERS_CLUB**, **DISCOVER**, **JCB**, **STARBUCKS** |\r\n\r\nInitialization example with configuration.\r\n\r\n```javascript\r\nJumio.initBAM(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n cardHolderNameRequired: false,\r\n cvvRequired: true,\r\n cameraPosition: \"BACK\",\r\n cardTypes: [\"VISA\", \"MASTER_CARD\"]\r\n});\r\n```\r\n\r\n\r\nAs soon as the sdk is initialized, the sdk is started by the following call.\r\n\r\n```javascript\r\nJumio.startBAM(successCallback, errorCallback);\r\n```\r\n\r\nExample\r\n\r\n```javascript\r\nJumio.startBAM(function(cardInformation) {\r\n // YOUR CODE\r\n}, function(error) {\r\n // YOUR CODE\r\n});\r\n```\r\n\r\n## Customization\r\n\r\n### Android\r\nThe Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_netverify-fastfill.md#customization).\r\n\r\n### iOS\r\nThe SDK can be customized to the respective needs. You can pass the following customization options to the initializer:\r\n\r\n| Customization key | Type | Description |\r\n|:------------------|:-----|:------------|\r\n| disableBlur | BOOL | Deactivate the blur effect |\r\n| backgroundColor | STRING | Change base view's background color |\r\n| foregroundColor | STRING | Change base view's foreground color |\r\n| tintColor | STRING | Change the tint color of the navigation bar |\r\n| barTintColor | STRING | Change the bar tint color of the navigation bar |\r\n| textTitleColor | STRING | Change the text title color of the navigation bar |\r\n| documentSelectionHeaderBackgroundColor | STRING | Change the background color of the document selection header |\r\n| documentSelectionHeaderTitleColor | STRING | Change the title color of the document selection header |\r\n| documentSelectionHeaderIconColor | STRING | Change the icon color of the document selection header |\r\n| documentSelectionButtonBackgroundColor | STRING | Change the background color of the document selection button |\r\n| documentSelectionButtonTitleColor | STRING | Change the title color of the document selection button |\r\n| documentSelectionButtonIconColor | STRING | Change the icon color of the document selection button |\r\n| fallbackButtonBackgroundColor | STRING | Change the background color of the fallback button |\r\n| fallbackButtonBorderColor | STRING | Change the border color of the fallback button |\r\n| fallbackButtonTitleColor | STRING | Change the title color of the fallback button |\r\n| positiveButtonBackgroundColor | STRING | Change the background color of the positive button |\r\n| positiveButtonBorderColor | STRING | Change the border color of the positive button |\r\n| positiveButtonTitleColor | STRING | Change the title color of the positive button |\r\n| negativeButtonBackgroundColor | STRING | Change the background color of the negative button |\r\n| negativeButtonBorderColor | STRING | Change the border color of the negative button |\r\n| negativeButtonTitleColor | STRING | Change the title color of the negative button |\r\n| scanOverlayStandardColor (NV only) | STRING | Change the standard color of the scan overlay |\r\n| scanOverlayValidColor (NV only) | STRING | Change the valid color of the scan overlay |\r\n| scanOverlayInvalidColor (NV only) | STRING | Change the invalid color of the scan overlay |\r\n| scanOverlayTextColor (BAM only) | STRING | Change the text color of the scan overlay |\r\n| scanOverlayBorderColor (BAM only) | STRING | Change the border color of the scan overlay |\r\n\r\nAll colors are provided with a HEX string with the following format: #ff00ff.\r\n\r\n**Customization example**\r\n```javascript\r\nJumio.initNetverify(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n requireVerification: false,\r\n ...\r\n}, {\r\n disableBlur: true,\r\n backgroundColor: \"#ff00ff\",\r\n barTintColor: \"#ff1298\"\r\n);\r\n```\r\n\r\n## Callback\r\n\r\nTo get information about callbacks, Netverify Retrieval API, Netverify Delete API and Global Netverify settings and more, please read our [page with server related information](https://github.com/Jumio/implementation-guides/blob/master/netverify/callback.md).\r\n\r\nThe JSONObject with all the extracted data that is returned for the specific products is described in the following subchapters:\r\n\r\n### Netverify & Fastfill\r\n\r\n*NetverifyDocumentData:*\r\n\r\n| Parameter | Type | Max. length | Description |\r\n|:-------------------|:----------- \t|:-------------|:-----------------|\r\n| selectedCountry | String| 3| [ISO 3166-1 alpha-3](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code as provided or selected |\r\n| selectedDocumentType | String | 16| PASSPORT, DRIVER_LICENSE, IDENTITY_CARD or VISA |\r\n| idNumber | String | 100 | Identification number of the document |\r\n| personalNumber | String | 14| Personal number of the document|\r\n| issuingDate | Date | | Date of issue |\r\n| expiryDate | Date | | Date of expiry |\r\n| issuingCountry | String | 3 | Country of issue as ([ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)) country code |\r\n| lastName | String | 100 | Last name of the customer|\r\n| firstName | String | 100 | First name of the customer|\r\n| middleName | String | 100 | Middle name of the customer |\r\n| dob | Date | | Date of birth |\r\n| gender | String | 1| m or f |\r\n| originatingCountry | String | 3|Country of origin as ([ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)) country code |\r\n| addressLine | String | 64 | Street name\t|\r\n| city | String | 64 | City |\r\n| subdivision | String | 3 | Last three characters of [ISO 3166-2:US](http://en.wikipedia.org/wiki/ISO_3166-2:US) state code\t|\r\n| postCode | String | 15 | Postal code |\r\n| mrzData | MRZ-DATA | | MRZ data, see table below |\r\n| optionalData1 | String | 50 | Optional field of MRZ line 1 |\r\n| optionalData2 | String | 50 | Optional field of MRZ line 2 |\r\n| placeOfBirth | String | 255 | Place of Birth |\r\n| extractionMethod | String | 12| MRZ, OCR, BARCODE, BARCODE_OCR or NONE |\r\n\r\n*MRZ-Data*\r\n\r\n| Parameter |Type | Max. length | Description |\r\n|:---------------|:------------- |:-------------|:-----------------|\r\n| format | String | 8| MRP, TD1, TD2, CNIS, MRVA, MRVB or UNKNOWN |\r\n| line1 | String | 50 | MRZ line 1 |\r\n| line2 | String | 50 | MRZ line 2 |\r\n| line3 | String | 50| MRZ line 3 |\r\n| idNumberValid | BOOL| | True if ID number check digit is valid, otherwise false |\r\n| dobValid | BOOL | | True if date of birth check digit is valid, otherwise false |\r\n| expiryDateValid |\tBOOL| |\tTrue if date of expiry check digit is valid or not available, otherwise false|\r\n| personalNumberValid | BOOL | | True if personal number check digit is valid or not available, otherwise false |\r\n| compositeValid | BOOL | | True if composite check digit is valid, otherwise false |\r\n\r\n### BAM Checkout\r\n\r\n*BAMCardInformation*\r\n\r\n|Parameter | Type | Max. length | Description |\r\n|:---------------------------- \t|:-------------|:-----------------|:-------------|\r\n| cardType | String | 16| VISA, MASTER_CARD, AMERICAN_EXPRESS, CHINA_UNIONPAY, DINERS_CLUB, DISCOVER, JCB or STARBUCKS |\r\n| cardNumber | String | 16 | Full credit card number |\r\n| cardNumberGrouped | String | 19 | Grouped credit card number |\r\n| cardNumberMasked | String | 19 | First 6 and last 4 digits of the grouped credit card number, other digits are masked with \"X\" |\r\n| cardExpiryMonth | String | 2 | Month card expires if enabled and readable |\r\n| CardExpiryYear | String | 2 | Year card expires if enabled and readable |\r\n| cardExpiryDate | String | 5 | Date card expires in the format MM/yy if enabled and readable |\r\n| cardCVV | String | 4 | Entered CVV if enabled |\r\n| cardHolderName | String | 100 | Name of the card holder in capital letters if enabled and readable, or as entered if editable |\r\n| cardSortCode | String | 8 | Sort code in the format xx-xx-xx or xxxxxx if enabled, available and readable |\r\n| cardAccountNumber | String | 8 | Account number if enabled, available and readable |\r\n| cardSortCodeValid | BOOL | | True if sort code valid, otherwise false |\r\n| cardAccountNumberValid | BOOL | | True if account number code valid, otherwise false |\r\n\r\n### Document Verification\r\n\r\nNo data returned.\r\n\r\n# Support\r\n\r\n## Contact\r\n\r\nIf you have any questions regarding our implementation guide please contact Jumio Customer Service at support@jumio.com or https://support.jumio.com. The Jumio online helpdesk contains a wealth of information regarding our service including demo videos, product descriptions, FAQs and other things that may help to get you started with Jumio. Check it out at: https://support.jumio.com.\r\n\r\n## Copyright\r\n\r\n© Jumio Corp. 268 Lambert Avenue, Palo Alto, CA 94306\r\n", "readmeFilename": "README.md", "repository": { "type": "git", diff --git a/demo/node_modules/cordova-plugin-jumio-mobilesdk/plugin.xml b/demo/node_modules/cordova-plugin-jumio-mobilesdk/plugin.xml index b648e0a..49133d2 100644 --- a/demo/node_modules/cordova-plugin-jumio-mobilesdk/plugin.xml +++ b/demo/node_modules/cordova-plugin-jumio-mobilesdk/plugin.xml @@ -1,5 +1,5 @@ - + JumioMobileSDK @@ -24,7 +24,7 @@ - + diff --git a/demo/node_modules/cordova-plugin-jumio-mobilesdk/src/android/JumioMobileSDK.java b/demo/node_modules/cordova-plugin-jumio-mobilesdk/src/android/JumioMobileSDK.java index e783dd2..ee9dac2 100644 --- a/demo/node_modules/cordova-plugin-jumio-mobilesdk/src/android/JumioMobileSDK.java +++ b/demo/node_modules/cordova-plugin-jumio-mobilesdk/src/android/JumioMobileSDK.java @@ -253,8 +253,6 @@ private void initNetverify(JSONArray data) { netverifySDK.setMerchantReportingCriteria(options.getString(key)); } else if (key.equalsIgnoreCase("customerID")) { netverifySDK.setCustomerId(options.getString(key)); - } else if (key.equalsIgnoreCase("additionalInformation")) { - netverifySDK.setAdditionalInformation(options.getString(key)); } else if (key.equalsIgnoreCase("enableEpassport")) { netverifySDK.setEnableEMRTD(options.getBoolean(key)); } else if (key.equalsIgnoreCase("sendDebugInfoToJumio")) { @@ -359,8 +357,6 @@ private void initDocumentVerification(JSONArray data) { documentVerificationSDK.setMerchantReportingCriteria(options.getString(key)); } else if (key.equalsIgnoreCase("callbackUrl")) { documentVerificationSDK.setCallbackUrl(options.getString(key)); - } else if (key.equalsIgnoreCase("additionalInformation")) { - documentVerificationSDK.setAdditionalInformation(options.getString(key)); } else if (key.equalsIgnoreCase("merchantScanReference")) { documentVerificationSDK.setMerchantScanReference(options.getString(key)); } else if (key.equalsIgnoreCase("customerId")) { @@ -370,6 +366,8 @@ private void initDocumentVerification(JSONArray data) { } else if (key.equalsIgnoreCase("cameraPosition")) { JumioCameraPosition cameraPosition = (options.getString(key).toLowerCase().equals("front")) ? JumioCameraPosition.FRONT : JumioCameraPosition.BACK; documentVerificationSDK.setCameraPosition(cameraPosition); + } else if (key.equalsIgnoreCase("enableExtraction")) { + documentVerificationSDK.setEnableExtraction(options.getBoolean(key)); } } } @@ -507,7 +505,17 @@ public void onActivityResult(int requestCode, int resultCode, Intent intent) { } else if (resultCode == Activity.RESULT_CANCELED) { String errorCode = intent.getStringExtra(BamSDK.EXTRA_ERROR_CODE); String errorMsg = intent.getStringExtra(BamSDK.EXTRA_ERROR_MESSAGE); - sendErrorObject(errorCode, errorMsg, ""); + ArrayList scanReferenceList = intent.getStringArrayListExtra(BamSDK.EXTRA_SCAN_ATTEMPTS); + String scanRef = null; + if (scanReferenceList != null && scanReferenceList.size() > 0) { + scanRef = scanReferenceList.get(0); + } + sendErrorObject(errorCode, errorMsg, scanRef != null ? scanRef : ""); + } + + if (bamSDK != null) { + bamSDK.destroy(); + bamSDK = null; } // Netverify Results } else if (requestCode == NetverifySDK.REQUEST_CODE) { @@ -567,8 +575,14 @@ public void onActivityResult(int requestCode, int resultCode, Intent intent) { String errorMsg = intent.getStringExtra(NetverifySDK.EXTRA_ERROR_MESSAGE); sendErrorObject(errorCode, errorMsg, scanReference); } + + if (netverifySDK != null) { + netverifySDK.destroy(); + netverifySDK = null; + } + // Document Verification Results } else if (requestCode == DocumentVerificationSDK.REQUEST_CODE) { - String scanReference = intent.getStringExtra(NetverifySDK.EXTRA_SCAN_REFERENCE) != null ? intent.getStringExtra(NetverifySDK.EXTRA_SCAN_REFERENCE) : ""; + String scanReference = intent.getStringExtra(DocumentVerificationSDK.EXTRA_SCAN_REFERENCE) != null ? intent.getStringExtra(DocumentVerificationSDK.EXTRA_SCAN_REFERENCE) : ""; if (resultCode == Activity.RESULT_OK) { try { @@ -585,6 +599,11 @@ public void onActivityResult(int requestCode, int resultCode, Intent intent) { Log.e(TAG, errorMsg); sendErrorObject(errorCode, errorMsg, scanReference); } + + if (documentVerificationSDK != null) { + documentVerificationSDK.destroy(); + documentVerificationSDK = null; + } } } diff --git a/demo/package-lock.json b/demo/package-lock.json deleted file mode 100644 index 8856204..0000000 --- a/demo/package-lock.json +++ /dev/null @@ -1,690 +0,0 @@ -{ - "name": "com.jumio.cordova.demo", - "version": "2.8.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "android-versions": { - "version": "https://registry.npmjs.org/android-versions/-/android-versions-1.2.1.tgz", - "integrity": "sha1-P1C69pPnOlEsPFQDVCKRzq2QAGM=" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "cordova-android": { - "version": "https://registry.npmjs.org/cordova-android/-/cordova-android-6.3.0.tgz", - "integrity": "sha1-2lQYQz0lx1pZd7QoJEu+Q30BKNI=", - "requires": { - "android-versions": "https://registry.npmjs.org/android-versions/-/android-versions-1.2.1.tgz", - "cordova-common": "https://registry.npmjs.org/cordova-common/-/cordova-common-2.1.0.tgz", - "elementtree": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz", - "nopt": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "properties-parser": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.2.3.tgz", - "q": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", - "shelljs": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz" - }, - "dependencies": { - "abbrev": { - "version": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", - "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=" - }, - "ansi": { - "version": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", - "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=" - }, - "balanced-match": { - "version": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base64-js": { - "version": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", - "integrity": "sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=" - }, - "big-integer": { - "version": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.25.tgz", - "integrity": "sha1-HeRan1dUKsIBIcaC+NZCIgo06CM=" - }, - "bplist-parser": { - "version": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", - "integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=", - "requires": { - "big-integer": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.25.tgz" - } - }, - "brace-expansion": { - "version": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "requires": { - "balanced-match": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "concat-map": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - } - }, - "concat-map": { - "version": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "cordova-common": { - "version": "https://registry.npmjs.org/cordova-common/-/cordova-common-2.1.0.tgz", - "integrity": "sha1-uzV+4bmCUDHtnbPFa1ku/pc9FkA=", - "requires": { - "ansi": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", - "bplist-parser": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", - "cordova-registry-mapper": "https://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz", - "elementtree": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz", - "glob": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "osenv": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "plist": "https://registry.npmjs.org/plist/-/plist-1.2.0.tgz", - "q": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", - "semver": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "shelljs": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", - "underscore": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "unorm": "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz" - } - }, - "cordova-registry-mapper": { - "version": "https://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz", - "integrity": "sha1-4kS5GFuBdUc7/2B5MkkFEV+D3Hw=" - }, - "elementtree": { - "version": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz", - "integrity": "sha1-KsTEbqMFFsjEy9teOsdBjlkt4gw=", - "requires": { - "sax": "https://registry.npmjs.org/sax/-/sax-0.3.5.tgz" - } - }, - "glob": { - "version": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "requires": { - "inflight": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - } - }, - "inflight": { - "version": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "wrappy": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - } - }, - "inherits": { - "version": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "lodash": { - "version": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" - }, - "minimatch": { - "version": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", - "requires": { - "brace-expansion": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz" - } - }, - "nopt": { - "version": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "requires": { - "abbrev": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz" - } - }, - "once": { - "version": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - } - }, - "os-homedir": { - "version": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-tmpdir": { - "version": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "osenv": { - "version": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", - "requires": { - "os-homedir": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "os-tmpdir": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" - } - }, - "path-is-absolute": { - "version": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "plist": { - "version": "https://registry.npmjs.org/plist/-/plist-1.2.0.tgz", - "integrity": "sha1-CEtQk93JJQbiWfh0uNmxr7jHlZM=", - "requires": { - "base64-js": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", - "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "xmlbuilder": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.0.0.tgz", - "xmldom": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz" - } - }, - "properties-parser": { - "version": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.2.3.tgz", - "integrity": "sha1-91kSVfcHq7/yJ8e1a2N9uwNzoQ8=" - }, - "q": { - "version": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", - "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=" - }, - "sax": { - "version": "https://registry.npmjs.org/sax/-/sax-0.3.5.tgz", - "integrity": "sha1-iPz8H3PAyLvVt8d2ttPzUB7tBz0=" - }, - "semver": { - "version": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha1-4FnAnYVx8FQII3M0M1BdOi8AsY4=" - }, - "shelljs": { - "version": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", - "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=" - }, - "underscore": { - "version": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, - "unorm": { - "version": "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz", - "integrity": "sha1-NkIA1fE2RsqLzURJAnEzVhR5IwA=" - }, - "util-deprecate": { - "version": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "wrappy": { - "version": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xmlbuilder": { - "version": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.0.0.tgz", - "integrity": "sha1-mLj2UcowqmJANvEn0RzGbce5B6M=", - "requires": { - "lodash": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz" - } - }, - "xmldom": { - "version": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", - "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=" - } - } - }, - "cordova-ios": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-4.5.3.tgz", - "integrity": "sha1-XTwtvomm2S5igtFyHB/dpL+Aah0=", - "requires": { - "cordova-common": "2.1.0", - "ios-sim": "6.1.2", - "nopt": "3.0.6", - "plist": "1.2.0", - "q": "1.5.1", - "shelljs": "0.5.3", - "xcode": "0.9.3", - "xml-escape": "1.1.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true - }, - "ansi": { - "version": "0.3.1", - "bundled": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true - }, - "base64-js": { - "version": "0.0.8", - "bundled": true - }, - "big-integer": { - "version": "1.6.25", - "bundled": true - }, - "bplist-creator": { - "version": "0.0.7", - "bundled": true, - "requires": { - "stream-buffers": "2.2.0" - } - }, - "bplist-parser": { - "version": "0.1.1", - "bundled": true, - "requires": { - "big-integer": "1.6.25" - } - }, - "brace-expansion": { - "version": "1.1.8", - "bundled": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "cordova-common": { - "version": "2.1.0", - "bundled": true, - "requires": { - "ansi": "0.3.1", - "bplist-parser": "0.1.1", - "cordova-registry-mapper": "1.1.15", - "elementtree": "0.1.6", - "glob": "5.0.15", - "minimatch": "3.0.4", - "osenv": "0.1.4", - "plist": "1.2.0", - "q": "1.5.1", - "semver": "5.4.1", - "shelljs": "0.5.3", - "underscore": "1.8.3", - "unorm": "1.4.1" - } - }, - "cordova-registry-mapper": { - "version": "1.1.15", - "bundled": true - }, - "elementtree": { - "version": "0.1.6", - "bundled": true, - "requires": { - "sax": "0.3.5" - } - }, - "glob": { - "version": "5.0.15", - "bundled": true, - "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "ios-sim": { - "version": "6.1.2", - "bundled": true, - "requires": { - "bplist-parser": "0.0.6", - "nopt": "1.0.9", - "plist": "1.2.0", - "simctl": "1.1.1" - }, - "dependencies": { - "bplist-parser": { - "version": "0.0.6", - "bundled": true - }, - "nopt": { - "version": "1.0.9", - "bundled": true, - "requires": { - "abbrev": "1.1.1" - } - } - } - }, - "lodash": { - "version": "3.10.1", - "bundled": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "1.1.8" - } - }, - "nopt": { - "version": "3.0.6", - "bundled": true, - "requires": { - "abbrev": "1.1.1" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "pegjs": { - "version": "0.10.0", - "bundled": true - }, - "plist": { - "version": "1.2.0", - "bundled": true, - "requires": { - "base64-js": "0.0.8", - "util-deprecate": "1.0.2", - "xmlbuilder": "4.0.0", - "xmldom": "0.1.27" - } - }, - "q": { - "version": "1.5.1", - "bundled": true - }, - "sax": { - "version": "0.3.5", - "bundled": true - }, - "semver": { - "version": "5.4.1", - "bundled": true - }, - "shelljs": { - "version": "0.5.3", - "bundled": true - }, - "simctl": { - "version": "1.1.1", - "bundled": true, - "requires": { - "shelljs": "0.2.6", - "tail": "0.4.0" - }, - "dependencies": { - "shelljs": { - "version": "0.2.6", - "bundled": true - } - } - }, - "simple-plist": { - "version": "0.2.1", - "bundled": true, - "requires": { - "bplist-creator": "0.0.7", - "bplist-parser": "0.1.1", - "plist": "2.0.1" - }, - "dependencies": { - "base64-js": { - "version": "1.1.2", - "bundled": true - }, - "plist": { - "version": "2.0.1", - "bundled": true, - "requires": { - "base64-js": "1.1.2", - "xmlbuilder": "8.2.2", - "xmldom": "0.1.27" - } - }, - "xmlbuilder": { - "version": "8.2.2", - "bundled": true - } - } - }, - "stream-buffers": { - "version": "2.2.0", - "bundled": true - }, - "tail": { - "version": "0.4.0", - "bundled": true - }, - "underscore": { - "version": "1.8.3", - "bundled": true - }, - "unorm": { - "version": "1.4.1", - "bundled": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - }, - "xcode": { - "version": "0.9.3", - "bundled": true, - "requires": { - "pegjs": "0.10.0", - "simple-plist": "0.2.1", - "uuid": "3.0.1" - } - }, - "xml-escape": { - "version": "1.1.0", - "bundled": true - }, - "xmlbuilder": { - "version": "4.0.0", - "bundled": true, - "requires": { - "lodash": "3.10.1" - } - }, - "xmldom": { - "version": "0.1.27", - "bundled": true - } - } - }, - "cordova-plugin-cocoapod-support": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/cordova-plugin-cocoapod-support/-/cordova-plugin-cocoapod-support-1.3.0.tgz", - "integrity": "sha1-fV3pbNJdpDwD6uyM/wAXz67xRkQ=", - "requires": { - "lodash": "4.17.4", - "semver": "5.4.1", - "shelljs": "0.7.8", - "xml2js": "0.4.19" - } - }, - "cordova-plugin-jumio-mobilesdk": { - "version": "git+https://github.com/Jumio/mobile-cordova.git#2c7f98502a979dde5221a87baa1742a1d93ac8a6" - }, - "cordova-plugin-whitelist": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.2.tgz", - "integrity": "sha1-W2M1/rn1MB88ATuQlsuIhb29UHY=" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "interpret": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.4.tgz", - "integrity": "sha1-ggzdWIuGj/sZGoCVBtbJyPISsbA=" - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.8" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "requires": { - "resolve": "1.5.0" - } - }, - "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", - "requires": { - "path-parse": "1.0.5" - } - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" - }, - "shelljs": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", - "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", - "requires": { - "glob": "7.1.2", - "interpret": "1.0.4", - "rechoir": "0.6.2" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "requires": { - "sax": "1.2.4", - "xmlbuilder": "9.0.4" - } - }, - "xmlbuilder": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz", - "integrity": "sha1-UZy0ymhtAFqEINNJbz8MruzKWA8=" - } - } -} diff --git a/demo/package.json b/demo/package.json index 1671930..4b6aedc 100644 --- a/demo/package.json +++ b/demo/package.json @@ -1,7 +1,7 @@ { "name": "com.jumio.cordova.demo", "displayName": "DemoApp", - "version": "2.11.0", + "version": "2.12.0", "description": "A sample Apache Cordova application that responds to the deviceready event.", "main": "index.js", "scripts": { diff --git a/demo/platforms/android/CordovaLib/build.gradle b/demo/platforms/android/CordovaLib/build.gradle index 6a62a48..8f35117 100644 --- a/demo/platforms/android/CordovaLib/build.gradle +++ b/demo/platforms/android/CordovaLib/build.gradle @@ -32,7 +32,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.1.0' + classpath 'com.android.tools.build:gradle:3.1.3' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' } diff --git a/demo/platforms/android/assets/www/js/index.js b/demo/platforms/android/assets/www/js/index.js index a92df1b..9ca7c2d 100644 --- a/demo/platforms/android/assets/www/js/index.js +++ b/demo/platforms/android/assets/www/js/index.js @@ -43,7 +43,6 @@ var app = { //merchantScanReference: "ScanRef", //merchantReportingCriteria: "Criteria", //customerId: "ID", - //additionalInformation: "Information", //sendDebugInfoToJumio: true, //dataExtractionOnMobileOnly: false, //cameraPosition: "back", @@ -91,7 +90,6 @@ var app = { merchantScanReference: "123456789", //merchantScanReportingCriteria: "Criteria", //callbackUrl: "URL", - //additionalInformation: "Information", //documentName: "Name", //customDocumentCode: "Custom", //cameraPosition: "back" diff --git a/demo/platforms/android/build.gradle b/demo/platforms/android/build.gradle index 447a7d4..f9ddfd5 100644 --- a/demo/platforms/android/build.gradle +++ b/demo/platforms/android/build.gradle @@ -31,7 +31,7 @@ buildscript { // http://tools.android.com/tech-docs/new-build-system/version-compatibility // and https://issues.apache.org/jira/browse/CB-8143 dependencies { - classpath 'com.android.tools.build:gradle:3.1.0' + classpath 'com.android.tools.build:gradle:3.1.3' } } @@ -97,7 +97,7 @@ repositories { } ext { - SDK_VERSION = "2.11.0" + SDK_VERSION = "2.12.0" } dependencies { @@ -113,17 +113,17 @@ dependencies { implementation "com.jumio.android:dv:${SDK_VERSION}@aar" //for core: - implementation "com.android.support:support-v4:27.1.0" - api "com.android.support:appcompat-v7:27.1.0" + implementation "com.android.support:support-v4:27.1.1" + api "com.android.support:appcompat-v7:27.1.1" //for nv: - implementation "com.android.support:design:27.1.0" - implementation "com.android.support:cardview-v7:27.1.0" - implementation "com.google.android.gms:play-services-vision:12.0.0" + implementation "com.android.support:design:27.1.1" + implementation "com.android.support:cardview-v7:27.1.1" + implementation "com.google.android.gms:play-services-vision:15.0.2" //only for nv-nfc implementation "com.madgag.spongycastle:prov:1.58.0.0" - implementation "net.sf.scuba:scuba-sc-android:0.0.13" + implementation "net.sf.scuba:scuba-sc-android:0.0.16" implementation fileTree(dir: 'libs', include: '*.jar') } diff --git a/demo/platforms/android/src/com/jumio/mobilesdk/JumioMobileSDK.java b/demo/platforms/android/src/com/jumio/mobilesdk/JumioMobileSDK.java index a31a013..ee9dac2 100644 --- a/demo/platforms/android/src/com/jumio/mobilesdk/JumioMobileSDK.java +++ b/demo/platforms/android/src/com/jumio/mobilesdk/JumioMobileSDK.java @@ -253,8 +253,6 @@ private void initNetverify(JSONArray data) { netverifySDK.setMerchantReportingCriteria(options.getString(key)); } else if (key.equalsIgnoreCase("customerID")) { netverifySDK.setCustomerId(options.getString(key)); - } else if (key.equalsIgnoreCase("additionalInformation")) { - netverifySDK.setAdditionalInformation(options.getString(key)); } else if (key.equalsIgnoreCase("enableEpassport")) { netverifySDK.setEnableEMRTD(options.getBoolean(key)); } else if (key.equalsIgnoreCase("sendDebugInfoToJumio")) { @@ -359,8 +357,6 @@ private void initDocumentVerification(JSONArray data) { documentVerificationSDK.setMerchantReportingCriteria(options.getString(key)); } else if (key.equalsIgnoreCase("callbackUrl")) { documentVerificationSDK.setCallbackUrl(options.getString(key)); - } else if (key.equalsIgnoreCase("additionalInformation")) { - documentVerificationSDK.setAdditionalInformation(options.getString(key)); } else if (key.equalsIgnoreCase("merchantScanReference")) { documentVerificationSDK.setMerchantScanReference(options.getString(key)); } else if (key.equalsIgnoreCase("customerId")) { @@ -370,6 +366,8 @@ private void initDocumentVerification(JSONArray data) { } else if (key.equalsIgnoreCase("cameraPosition")) { JumioCameraPosition cameraPosition = (options.getString(key).toLowerCase().equals("front")) ? JumioCameraPosition.FRONT : JumioCameraPosition.BACK; documentVerificationSDK.setCameraPosition(cameraPosition); + } else if (key.equalsIgnoreCase("enableExtraction")) { + documentVerificationSDK.setEnableExtraction(options.getBoolean(key)); } } } diff --git a/demo/platforms/ios/DemoApp.xcodeproj/project.pbxproj b/demo/platforms/ios/DemoApp.xcodeproj/project.pbxproj index ff44a89..bcb122a 100755 --- a/demo/platforms/ios/DemoApp.xcodeproj/project.pbxproj +++ b/demo/platforms/ios/DemoApp.xcodeproj/project.pbxproj @@ -15,27 +15,33 @@ 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 302D95EF14D2391D003F00A1 /* MainViewController.m */; }; 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 302D95F014D2391D003F00A1 /* MainViewController.xib */; }; 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */; }; + 77AD1B4820DD41710013A92C /* zh-Hans.lproj in Resources */ = {isa = PBXBuildFile; fileRef = 77AD1B4220DD41710013A92C /* zh-Hans.lproj */; }; + 77AD1B4920DD41710013A92C /* fr.lproj in Resources */ = {isa = PBXBuildFile; fileRef = 77AD1B4320DD41710013A92C /* fr.lproj */; }; + 77AD1B4A20DD41710013A92C /* es.lproj in Resources */ = {isa = PBXBuildFile; fileRef = 77AD1B4420DD41710013A92C /* es.lproj */; }; + 77AD1B4B20DD41710013A92C /* de.lproj in Resources */ = {isa = PBXBuildFile; fileRef = 77AD1B4520DD41710013A92C /* de.lproj */; }; + 77AD1B4C20DD41710013A92C /* en.lproj in Resources */ = {isa = PBXBuildFile; fileRef = 77AD1B4620DD41710013A92C /* en.lproj */; }; + 77AD1B4D20DD41710013A92C /* nl.lproj in Resources */ = {isa = PBXBuildFile; fileRef = 77AD1B4720DD41710013A92C /* nl.lproj */; }; 922F5423EE1B9D28E57C4A95 /* Pods_DemoApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FE191D370693296E1AABCB4 /* Pods_DemoApp.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 301BF534109A57CC0062928A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; + containerPortal = 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */; proxyType = 2; remoteGlobalIDString = D2AAC07E0554694100DB518D; remoteInfo = CordovaLib; }; 301BF550109A68C00062928A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; + containerPortal = 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */; proxyType = 1; remoteGlobalIDString = D2AAC07D0554694100DB518D; remoteInfo = CordovaLib; }; 5417F0961FB06502002A392A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; + containerPortal = 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */; proxyType = 2; remoteGlobalIDString = C0C01EB21E3911D50056E6CB; remoteInfo = Cordova; @@ -49,7 +55,7 @@ 1D6058910D05DD3D006BFB54 /* DemoApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 2FE191D370693296E1AABCB4 /* Pods_DemoApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DemoApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = CordovaLib/CordovaLib.xcodeproj; sourceTree = ""; }; + 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = CordovaLib/CordovaLib.xcodeproj; sourceTree = ""; }; 301BF56E109A69640062928A /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = SOURCE_ROOT; }; 302D95EE14D2391D003F00A1 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; 302D95EF14D2391D003F00A1 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; @@ -59,6 +65,12 @@ 3047A5111AB8059700498E2A /* build.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = build.xcconfig; path = cordova/build.xcconfig; sourceTree = SOURCE_ROOT; }; 32CA4F630368D1EE00C91783 /* DemoApp-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DemoApp-Prefix.pch"; sourceTree = ""; }; 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = CDVLaunchScreen.storyboard; path = DemoApp/CDVLaunchScreen.storyboard; sourceTree = SOURCE_ROOT; }; + 77AD1B4220DD41710013A92C /* zh-Hans.lproj */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "zh-Hans.lproj"; path = "Pods/JumioMobileSDK/frameworks/zh-Hans.lproj"; sourceTree = SOURCE_ROOT; }; + 77AD1B4320DD41710013A92C /* fr.lproj */ = {isa = PBXFileReference; lastKnownFileType = folder; name = fr.lproj; path = Pods/JumioMobileSDK/frameworks/fr.lproj; sourceTree = SOURCE_ROOT; }; + 77AD1B4420DD41710013A92C /* es.lproj */ = {isa = PBXFileReference; lastKnownFileType = folder; name = es.lproj; path = Pods/JumioMobileSDK/frameworks/es.lproj; sourceTree = SOURCE_ROOT; }; + 77AD1B4520DD41710013A92C /* de.lproj */ = {isa = PBXFileReference; lastKnownFileType = folder; name = de.lproj; path = Pods/JumioMobileSDK/frameworks/de.lproj; sourceTree = SOURCE_ROOT; }; + 77AD1B4620DD41710013A92C /* en.lproj */ = {isa = PBXFileReference; lastKnownFileType = folder; name = en.lproj; path = Pods/JumioMobileSDK/frameworks/en.lproj; sourceTree = SOURCE_ROOT; }; + 77AD1B4720DD41710013A92C /* nl.lproj */ = {isa = PBXFileReference; lastKnownFileType = folder; name = nl.lproj; path = Pods/JumioMobileSDK/frameworks/nl.lproj; sourceTree = SOURCE_ROOT; }; 81E0ECE9D11741CCA1B8B37F /* JumioMobileSDK.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = JumioMobileSDK.h; path = "cordova-plugin-jumio-mobilesdk/JumioMobileSDK.h"; sourceTree = ""; }; 8D1107310486CEB800E47090 /* DemoApp-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "DemoApp-Info.plist"; path = "DemoApp/DemoApp-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = SOURCE_ROOT; }; E11AD5E6E7C945BA99E5550C /* JumioMobileSDK.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = JumioMobileSDK.m; path = "cordova-plugin-jumio-mobilesdk/JumioMobileSDK.m"; sourceTree = ""; }; @@ -110,13 +122,14 @@ name = Products; sourceTree = ""; }; - 29B97314FDCFA39411CA2CEA = { + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( + 77AD1B4020DD41530013A92C /* Localization */, EB87FDF41871DAF40020F90C /* config.xml */, EB87FDF31871DA8E0020F90C /* www */, EB87FDF11871DA420020F90C /* Staging */, - 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */, + 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */, 080E96DDFE201D6D7F000001 /* Classes */, 307C750510C5A3420062BCA9 /* Plugins */, 29B97315FDCFA39411CA2CEA /* Other Sources */, @@ -187,6 +200,19 @@ name = Pods; sourceTree = ""; }; + 77AD1B4020DD41530013A92C /* Localization */ = { + isa = PBXGroup; + children = ( + 77AD1B4520DD41710013A92C /* de.lproj */, + 77AD1B4620DD41710013A92C /* en.lproj */, + 77AD1B4420DD41710013A92C /* es.lproj */, + 77AD1B4320DD41710013A92C /* fr.lproj */, + 77AD1B4720DD41710013A92C /* nl.lproj */, + 77AD1B4220DD41710013A92C /* zh-Hans.lproj */, + ); + path = Localization; + sourceTree = ""; + }; EB87FDF11871DA420020F90C /* Staging */ = { isa = PBXGroup; children = ( @@ -242,13 +268,13 @@ knownRegions = ( en, ); - mainGroup = 29B97314FDCFA39411CA2CEA; + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; productRefGroup = 19C28FACFE9D520D11CA2CBB /* Products */; projectDirPath = ""; projectReferences = ( { ProductGroup = 301BF52E109A57CC0062928A /* Products */; - ProjectRef = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; + ProjectRef = 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */; }, ); projectRoot = ""; @@ -280,9 +306,15 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 77AD1B4C20DD41710013A92C /* en.lproj in Resources */, + 77AD1B4B20DD41710013A92C /* de.lproj in Resources */, 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */, + 77AD1B4A20DD41710013A92C /* es.lproj in Resources */, 0207DA581B56EA530066E2B4 /* Images.xcassets in Resources */, 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */, + 77AD1B4920DD41710013A92C /* fr.lproj in Resources */, + 77AD1B4D20DD41710013A92C /* nl.lproj in Resources */, + 77AD1B4820DD41710013A92C /* zh-Hans.lproj in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/demo/platforms/ios/DemoApp/Plugins/cordova-plugin-jumio-mobilesdk/JumioMobileSDK.m b/demo/platforms/ios/DemoApp/Plugins/cordova-plugin-jumio-mobilesdk/JumioMobileSDK.m index 684d476..16841b9 100644 --- a/demo/platforms/ios/DemoApp/Plugins/cordova-plugin-jumio-mobilesdk/JumioMobileSDK.m +++ b/demo/platforms/ios/DemoApp/Plugins/cordova-plugin-jumio-mobilesdk/JumioMobileSDK.m @@ -197,8 +197,6 @@ - (void)initNetverify:(CDVInvokedUrlCommand*)command self.netverifyConfiguration.merchantReportingCriteria = [options objectForKey: key]; } else if ([key isEqualToString: @"customerId"]) { self.netverifyConfiguration.customerId = [options objectForKey: key]; - } else if ([key isEqualToString: @"additionalInformation"]) { - self.netverifyConfiguration.additionalInformation = [options objectForKey: key]; } else if ([key isEqualToString: @"sendDebugInfoToJumio"]) { self.netverifyConfiguration.sendDebugInfoToJumio = [options objectForKey: key]; } else if ([key isEqualToString: @"dataExtractionOnMobileOnly"]) { @@ -356,12 +354,12 @@ - (void)initDocumentVerification:(CDVInvokedUrlCommand*)command self.documentVerifcationConfiguration.merchantReportingCriteria = [options objectForKey: key]; } else if ([key isEqualToString: @"callbackUrl"]) { self.documentVerifcationConfiguration.callbackUrl = [options objectForKey: key]; - } else if ([key isEqualToString: @"additionalInformation"]) { - self.documentVerifcationConfiguration.additionalInformation = [options objectForKey: key]; } else if ([key isEqualToString: @"merchantScanReference"]) { self.documentVerifcationConfiguration.merchantScanReference = [options objectForKey: key]; } else if ([key isEqualToString: @"customerId"]) { self.documentVerifcationConfiguration.customerId = [options objectForKey: key]; + } else if ([key isEqualToString: @"enableExtraction"]) { + self.documentVerifcationConfiguration.enableExtraction = [options objectForKey: key]; } else if ([key isEqualToString: @"documentName"]) { self.documentVerifcationConfiguration.documentName = [options objectForKey: key]; } else if ([key isEqualToString: @"cameraPosition"]) { diff --git a/demo/platforms/ios/DemoApp/config.xml b/demo/platforms/ios/DemoApp/config.xml index 47ab342..cb39c1d 100755 --- a/demo/platforms/ios/DemoApp/config.xml +++ b/demo/platforms/ios/DemoApp/config.xml @@ -1,5 +1,5 @@ - + diff --git a/demo/platforms/ios/Podfile b/demo/platforms/ios/Podfile index 870ad91..8e163db 100644 --- a/demo/platforms/ios/Podfile +++ b/demo/platforms/ios/Podfile @@ -2,5 +2,5 @@ platform :ios, '9.0' use_frameworks! source 'https://github.com/CocoaPods/Specs.git' target 'DemoApp' do - pod 'JumioMobileSDK', '2.11.0' + pod 'JumioMobileSDK', '2.12.0' end \ No newline at end of file diff --git a/demo/plugins/cordova-plugin-jumio-mobilesdk/README.md b/demo/plugins/cordova-plugin-jumio-mobilesdk/README.md index 4bf84cc..823cd13 100644 --- a/demo/plugins/cordova-plugin-jumio-mobilesdk/README.md +++ b/demo/plugins/cordova-plugin-jumio-mobilesdk/README.md @@ -88,7 +88,6 @@ Configure the SDK with the *configuration*-Object. | merchantScanReference | String | Allows you to identify the scan (max. 100 characters) | | merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) | | customerId | String | Set a customer identifier (max. 100 characters) | -| additionalInformation | String | Add additional paramter (max. 255 characters) | | sendDebugInfoToJumio | Boolean | Send debug information to Jumio. | | dataExtractionOnMobileOnly | Boolean | Limit data extraction to be done on device only | | cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. | @@ -170,10 +169,10 @@ Configure the SDK with the *configuration*-Object. **(configuration marked with | **merchantScanReference*** | String | Allows you to identify the scan (max. 100 characters) | | merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) | | callbackUrl | String | Specify an URL for individual transactions | -| additionalInformation | String | Add additional paramter (max. 255 characters) | | documentName | String | Override the document label on the help screen | | customDocumentCode | String | Set your custom document code (set in the merchant backend under "Settings" - "Multi Documents" - "Custom" | | cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. | +| enableExtraction | bool | Enable/disable data extraction for documents. | Possible types: diff --git a/demo/plugins/cordova-plugin-jumio-mobilesdk/package.json b/demo/plugins/cordova-plugin-jumio-mobilesdk/package.json index ab23890..b5abd97 100644 --- a/demo/plugins/cordova-plugin-jumio-mobilesdk/package.json +++ b/demo/plugins/cordova-plugin-jumio-mobilesdk/package.json @@ -80,7 +80,7 @@ "license": "ISC", "name": "cordova-plugin-jumio-mobilesdk", "optionalDependencies": {}, - "readme": "# Plugin for Apache Cordova\r\n\r\nOfficial Jumio Mobile SDK plugin for Apache Cordova\r\n\r\n## Compatibility\r\nWith this release, we only ensure compatibility with the latest Cordova versions and plugins.\r\nAt the time of this release, the following minimum versions are supported:\r\n* Cordova: 7.1.0\r\n* Cordova Android: 6.3.0\r\n* Cordova iOS: 4.5.3\r\n\r\n## Setup\r\n\r\nCreate Cordova project and add our plugin\r\n```\r\ncordova create MyProject com.my.project \"MyProject\"\r\ncd MyProject\r\ncordova platform add ios\r\ncordova platform add android\r\ncordova plugin add https://github.com/Jumio/mobile-cordova.git#v2.11.0\r\n```\r\n\r\n## Integration\r\n\r\n### iOS\r\n\r\nManual integration or dependency management via cocoapods possible, please see [the official documentation of the Jumio Mobile SDK for iOS](https://github.com/Jumio/mobile-sdk-ios/tree/v2.11.0#basic-setup)\r\n\r\n### Android\r\n\r\nAdd the Jumio repository:\r\n\r\n```\r\nrepositories {\r\n maven { url 'http://mobile-sdk.jumio.com' }\r\n maven { url 'https://maven.google.com/' }\r\n}\r\n```\r\n\r\nAdd a parameter for your SDK_VERSION into the ext-section:\r\n\r\n```\r\next {\r\n SDK_VERSION = \"2.11.0\"\r\n}\r\n```\r\n\r\nAdd required permissions for the products as described in chapter [Permissions](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/README.md#permissions)\r\n\r\nOpen the android project of your cordova project located in */platforms/android* and insert the dependencies from the products you require to your **build.gradle** file. (Module: android)\r\n\r\n* [Netverify & Fastfill](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_netverify-fastfill.md#dependencies)\r\n* [Document Verification](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_document-verification.md#dependencies)\r\n* [BAM Checkout](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_bam-checkout.md#dependencies)\r\n\r\n__Note:__ If you are using Netverify, make sure to add the Google vision meta-data to you **AndroidManifest.xml** accordingly:\r\n\r\n```\r\n\r\n```\r\n\r\n## Usage\r\n\r\n\r\n### Netverify / Fastfill\r\n\r\nTo initialize the SDK, perform the following call.\r\n\r\n```javascript\r\nJumio.initNetverify(, , , {configuration});\r\n```\r\n\r\nDatacenter can either be **US** or **EU**.\r\n\r\n\r\n\r\nConfigure the SDK with the *configuration*-Object.\r\n\r\n| Configuration | Datatype | Description |\r\n| ------ | -------- | ----------- |\r\n| requireVerification | Boolean | Enable ID verification |\r\n| callbackUrl | String | Specify an URL for individual transactions |\r\n| requireFaceMatch | Boolean | Enable face match during the ID verification for a specific transaction |\r\n| preselectedCountry | Boolean | Specify the issuing country (ISO 3166-1 alpha-3 country code) |\r\n| merchantScanReference | String | Allows you to identify the scan (max. 100 characters) |\r\n| merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) |\r\n| customerId | String | Set a customer identifier (max. 100 characters) |\r\n| additionalInformation | String | Add additional paramter (max. 255 characters) |\r\n| sendDebugInfoToJumio | Boolean | Send debug information to Jumio. |\r\n| dataExtractionOnMobileOnly | Boolean | Limit data extraction to be done on device only |\r\n| cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. |\r\n| preselectedDocumentVariant | String | Which types of document variants are available. Can be **PAPER** or **PLASTIC** |\r\n| documentTypes | String-Array | An array of accepted document types: Available document types: **PASSPORT**, **DRIVER_LICENSE**, **IDENTITY_CARD**, **VISA** |\r\n\r\n\r\nInitialization example with configuration.\r\n\r\n```javascript\r\nJumio.initNetverify(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n requireVerification: false,\r\n customerId: \"CUSTOMERID\",\r\n preselectedCountry: \"USA\",\r\n cameraPosition: \"BACK\",\r\n documentTypes: [\"DRIVER_LICENSE\", \"PASSPORT\", \"IDENTITY_CARD\", \"VISA\"]\r\n});\r\n```\r\n\r\n***Android eMRTD scanning***\r\n\r\nIf you are using eMRTD scanning, following lines are needed in your Manifest file:\r\n\r\n```javascript\r\n-keep class net.sf.scuba.smartcards.IsoDepCardService {*;}\r\n-keep class org.jmrtd.** { *; }\r\n-keep class net.sf.scuba.** {*;}\r\n-keep class org.spongycastle.** {*;}\r\n-keep class org.ejbca.** {*;}\r\n\r\n-dontwarn java.nio.**\r\n-dontwarn org.codehaus.**\r\n-dontwarn org.ejbca.**\r\n-dontwarn org.spongycastle.**\r\n```\r\n\r\nAdd the needed dependencies following [this chapter](https://github.com/Jumio/mobile-sdk-android/blob/master/docs/integration_netverify-fastfill.md#dependencies) of the android integration guide.\r\n\r\nEnable eMRTD by using the following method in your native android code:\r\n\r\n```javascript\r\nnetverifySDK.setEnableEMRTD(true);\r\n```\r\n\r\n\r\nAs soon as the sdk is initialized, the sdk is started by the following call.\r\n\r\n```javascript\r\nJumio.startNetverify(successCallback, errorCallback);\r\n```\r\n\r\nExample\r\n\r\n```javascript\r\nJumio.startNetverify(function(documentData) {\r\n // YOUR CODE\r\n}, function(error) {\r\n // YOUR CODE\r\n});\r\n```\r\n\r\n### Document Verification\r\n\r\nTo initialize the SDK, perform the following call.\r\n\r\n```javascript\r\nJumio.initDocumentVerification(, , , {configuration});\r\n```\r\n\r\nDatacenter can either be **US** or **EU**.\r\n\r\nConfigure the SDK with the *configuration*-Object. **(configuration marked with * are mandatory)**\r\n\r\n| Configuration | Datatype | Description |\r\n| ------ | -------- | ----------- |\r\n| **type*** | String | See the list below |\r\n| **customerId*** | String | Set a customer identifier (max. 100 characters) |\r\n| **country*** | String | Set the country (ISO-3166-1 alpha-3 code) |\r\n| **merchantScanReference*** | String | Allows you to identify the scan (max. 100 characters) |\r\n| merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) |\r\n| callbackUrl | String | Specify an URL for individual transactions |\r\n| additionalInformation | String | Add additional paramter (max. 255 characters) |\r\n| documentName | String | Override the document label on the help screen |\r\n| customDocumentCode | String | Set your custom document code (set in the merchant backend under \"Settings\" - \"Multi Documents\" - \"Custom\" |\r\n| cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. |\r\n\r\nPossible types:\r\n\r\n* BS (Bank statement)\r\n* IC (Insurance card)\r\n* UB (Utility bill, front side)\r\n* CAAP (Cash advance application)\r\n* CRC (Corporate resolution certificate)\r\n* CCS (Credit card statement)\r\n* LAG (Lease agreement)\r\n* LOAP (Loan application)\r\n* MOAP (Mortgage application)\r\n* TR (Tax return)\r\n* VT (Vehicle title)\r\n* VC (Voided check)\r\n* STUC (Student card)\r\n* HCC (Health care card)\r\n* CB (Council bill)\r\n* SENC (Seniors card)\r\n* MEDC (Medicare card)\r\n* BC (Birth certificate)\r\n* WWCC (Working with children check)\r\n* SS (Superannuation statement)\r\n* TAC (Trade association card)\r\n* SEL (School enrolment letter)\r\n* PB (Phone bill)\r\n* USSS (US social security card)\r\n* SSC (Social security card)\r\n* CUSTOM (Custom document type)\r\n\r\nInitialization example with configuration.\r\n\r\n```javascript\r\nJumio.initDocumentVerification(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n type: \"BC\",\r\n customerId: \"CUSTOMER ID\",\r\n country: \"USA\",\r\n merchantScanReference: \"YOURSCANREFERENCE\",\r\n cameraPosition: \"BACK\"\r\n});\r\n```\r\n\r\nAs soon as the SDK is initialized, the SDK is started by the following call.\r\n\r\n```javascript\r\nJumio.startDocumentVerification(successCallback, errorCallback);\r\n```\r\n\r\nExample\r\n\r\n```javascript\r\nJumio.startDocumentVerification(function(documentData) {\r\n // YOUR CODE\r\n}, function(error) {\r\n // YOUR CODE\r\n});\r\n```\r\n\r\n### BAM Checkout\r\n\r\nTo Initialize the SDK, perform the following call.\r\n\r\n```javascript\r\nJumio.initBAM(, , , {configuration});\r\n```\r\n\r\nDatacenter can either be **US** or **EU**.\r\n\r\n\r\n\r\nConfigure the SDK with the *configuration*-Object.\r\n\r\n| Configuration | Datatype | Description |\r\n| ------ | -------- | ----------- |\r\n| cardHolderNameRequired | Boolean |\r\n| sortCodeAndAccountNumberRequired | Boolean |\r\n| expiryRequired | Boolean |\r\n| cvvRequired | Boolean |\r\n| expiryEditable | Boolean |\r\n| cardHolderNameEditable | Boolean |\r\n| merchantReportingCriteria | String | Overwrite your specified reporting criteria to identify each scan attempt in your reports (max. 100 characters)\r\n| vibrationEffectEnabled | Boolean |\r\n| enableFlashOnScanStart | Boolean |\r\n| cardNumberMaskingEnabled | Boolean |\r\n| offlineToken | String | In your Jumio merchant backend on the \"Settings\" page under \"API credentials\" you can find your Offline token. In case you use your offline token, you must not set the API token and secret|\r\n| cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. |\r\n| cardTypes | String-Array | An array of accepted card types. Available card types: **VISA**, **MASTER_CARD**, **AMERICAN_EXPRESS**, **CHINA_UNIONPAY**, **DINERS_CLUB**, **DISCOVER**, **JCB**, **STARBUCKS** |\r\n\r\nInitialization example with configuration.\r\n\r\n```javascript\r\nJumio.initBAM(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n cardHolderNameRequired: false,\r\n cvvRequired: true,\r\n cameraPosition: \"BACK\",\r\n cardTypes: [\"VISA\", \"MASTER_CARD\"]\r\n});\r\n```\r\n\r\n\r\nAs soon as the sdk is initialized, the sdk is started by the following call.\r\n\r\n```javascript\r\nJumio.startBAM(successCallback, errorCallback);\r\n```\r\n\r\nExample\r\n\r\n```javascript\r\nJumio.startBAM(function(cardInformation) {\r\n // YOUR CODE\r\n}, function(error) {\r\n // YOUR CODE\r\n});\r\n```\r\n\r\n## Customization\r\n\r\n### Android\r\nThe Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_netverify-fastfill.md#customization).\r\n\r\n### iOS\r\nThe SDK can be customized to the respective needs. You can pass the following customization options to the initializer:\r\n\r\n| Customization key | Type | Description |\r\n|:------------------|:-----|:------------|\r\n| disableBlur | BOOL | Deactivate the blur effect |\r\n| backgroundColor | STRING | Change base view's background color |\r\n| foregroundColor | STRING | Change base view's foreground color |\r\n| tintColor | STRING | Change the tint color of the navigation bar |\r\n| barTintColor | STRING | Change the bar tint color of the navigation bar |\r\n| textTitleColor | STRING | Change the text title color of the navigation bar |\r\n| documentSelectionHeaderBackgroundColor | STRING | Change the background color of the document selection header |\r\n| documentSelectionHeaderTitleColor | STRING | Change the title color of the document selection header |\r\n| documentSelectionHeaderIconColor | STRING | Change the icon color of the document selection header |\r\n| documentSelectionButtonBackgroundColor | STRING | Change the background color of the document selection button |\r\n| documentSelectionButtonTitleColor | STRING | Change the title color of the document selection button |\r\n| documentSelectionButtonIconColor | STRING | Change the icon color of the document selection button |\r\n| fallbackButtonBackgroundColor | STRING | Change the background color of the fallback button |\r\n| fallbackButtonBorderColor | STRING | Change the border color of the fallback button |\r\n| fallbackButtonTitleColor | STRING | Change the title color of the fallback button |\r\n| positiveButtonBackgroundColor | STRING | Change the background color of the positive button |\r\n| positiveButtonBorderColor | STRING | Change the border color of the positive button |\r\n| positiveButtonTitleColor | STRING | Change the title color of the positive button |\r\n| negativeButtonBackgroundColor | STRING | Change the background color of the negative button |\r\n| negativeButtonBorderColor | STRING | Change the border color of the negative button |\r\n| negativeButtonTitleColor | STRING | Change the title color of the negative button |\r\n| scanOverlayStandardColor (NV only) | STRING | Change the standard color of the scan overlay |\r\n| scanOverlayValidColor (NV only) | STRING | Change the valid color of the scan overlay |\r\n| scanOverlayInvalidColor (NV only) | STRING | Change the invalid color of the scan overlay |\r\n| scanOverlayTextColor (BAM only) | STRING | Change the text color of the scan overlay |\r\n| scanOverlayBorderColor (BAM only) | STRING | Change the border color of the scan overlay |\r\n\r\nAll colors are provided with a HEX string with the following format: #ff00ff.\r\n\r\n**Customization example**\r\n```javascript\r\nJumio.initNetverify(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n requireVerification: false,\r\n ...\r\n}, {\r\n disableBlur: true,\r\n backgroundColor: \"#ff00ff\",\r\n barTintColor: \"#ff1298\"\r\n);\r\n```\r\n\r\n## Callback\r\n\r\nTo get information about callbacks, Netverify Retrieval API, Netverify Delete API and Global Netverify settings and more, please read our [page with server related information](https://github.com/Jumio/implementation-guides/blob/master/netverify/callback.md).\r\n\r\nThe JSONObject with all the extracted data that is returned for the specific products is described in the following subchapters:\r\n\r\n### Netverify & Fastfill\r\n\r\n*NetverifyDocumentData:*\r\n\r\n| Parameter | Type | Max. length | Description |\r\n|:-------------------|:----------- \t|:-------------|:-----------------|\r\n| selectedCountry | String| 3| [ISO 3166-1 alpha-3](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code as provided or selected |\r\n| selectedDocumentType | String | 16| PASSPORT, DRIVER_LICENSE, IDENTITY_CARD or VISA |\r\n| idNumber | String | 100 | Identification number of the document |\r\n| personalNumber | String | 14| Personal number of the document|\r\n| issuingDate | Date | | Date of issue |\r\n| expiryDate | Date | | Date of expiry |\r\n| issuingCountry | String | 3 | Country of issue as ([ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)) country code |\r\n| lastName | String | 100 | Last name of the customer|\r\n| firstName | String | 100 | First name of the customer|\r\n| middleName | String | 100 | Middle name of the customer |\r\n| dob | Date | | Date of birth |\r\n| gender | String | 1| m or f |\r\n| originatingCountry | String | 3|Country of origin as ([ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)) country code |\r\n| addressLine | String | 64 | Street name\t|\r\n| city | String | 64 | City |\r\n| subdivision | String | 3 | Last three characters of [ISO 3166-2:US](http://en.wikipedia.org/wiki/ISO_3166-2:US) state code\t|\r\n| postCode | String | 15 | Postal code |\r\n| mrzData | MRZ-DATA | | MRZ data, see table below |\r\n| optionalData1 | String | 50 | Optional field of MRZ line 1 |\r\n| optionalData2 | String | 50 | Optional field of MRZ line 2 |\r\n| placeOfBirth | String | 255 | Place of Birth |\r\n| extractionMethod | String | 12| MRZ, OCR, BARCODE, BARCODE_OCR or NONE |\r\n\r\n*MRZ-Data*\r\n\r\n| Parameter |Type | Max. length | Description |\r\n|:---------------|:------------- |:-------------|:-----------------|\r\n| format | String | 8| MRP, TD1, TD2, CNIS, MRVA, MRVB or UNKNOWN |\r\n| line1 | String | 50 | MRZ line 1 |\r\n| line2 | String | 50 | MRZ line 2 |\r\n| line3 | String | 50| MRZ line 3 |\r\n| idNumberValid | BOOL| | True if ID number check digit is valid, otherwise false |\r\n| dobValid | BOOL | | True if date of birth check digit is valid, otherwise false |\r\n| expiryDateValid |\tBOOL| |\tTrue if date of expiry check digit is valid or not available, otherwise false|\r\n| personalNumberValid | BOOL | | True if personal number check digit is valid or not available, otherwise false |\r\n| compositeValid | BOOL | | True if composite check digit is valid, otherwise false |\r\n\r\n### BAM Checkout\r\n\r\n*BAMCardInformation*\r\n\r\n|Parameter | Type | Max. length | Description |\r\n|:---------------------------- \t|:-------------|:-----------------|:-------------|\r\n| cardType | String | 16| VISA, MASTER_CARD, AMERICAN_EXPRESS, CHINA_UNIONPAY, DINERS_CLUB, DISCOVER, JCB or STARBUCKS |\r\n| cardNumber | String | 16 | Full credit card number |\r\n| cardNumberGrouped | String | 19 | Grouped credit card number |\r\n| cardNumberMasked | String | 19 | First 6 and last 4 digits of the grouped credit card number, other digits are masked with \"X\" |\r\n| cardExpiryMonth | String | 2 | Month card expires if enabled and readable |\r\n| CardExpiryYear | String | 2 | Year card expires if enabled and readable |\r\n| cardExpiryDate | String | 5 | Date card expires in the format MM/yy if enabled and readable |\r\n| cardCVV | String | 4 | Entered CVV if enabled |\r\n| cardHolderName | String | 100 | Name of the card holder in capital letters if enabled and readable, or as entered if editable |\r\n| cardSortCode | String | 8 | Sort code in the format xx-xx-xx or xxxxxx if enabled, available and readable |\r\n| cardAccountNumber | String | 8 | Account number if enabled, available and readable |\r\n| cardSortCodeValid | BOOL | | True if sort code valid, otherwise false |\r\n| cardAccountNumberValid | BOOL | | True if account number code valid, otherwise false |\r\n\r\n### Document Verification\r\n\r\nNo data returned.\r\n\r\n# Support\r\n\r\n## Contact\r\n\r\nIf you have any questions regarding our implementation guide please contact Jumio Customer Service at support@jumio.com or https://support.jumio.com. The Jumio online helpdesk contains a wealth of information regarding our service including demo videos, product descriptions, FAQs and other things that may help to get you started with Jumio. Check it out at: https://support.jumio.com.\r\n\r\n## Copyright\r\n\r\n© Jumio Corp. 268 Lambert Avenue, Palo Alto, CA 94306\r\n", + "readme": "# Plugin for Apache Cordova\r\n\r\nOfficial Jumio Mobile SDK plugin for Apache Cordova\r\n\r\n## Compatibility\r\nWith this release, we only ensure compatibility with the latest Cordova versions and plugins.\r\nAt the time of this release, the following minimum versions are supported:\r\n* Cordova: 7.1.0\r\n* Cordova Android: 6.3.0\r\n* Cordova iOS: 4.5.3\r\n\r\n## Setup\r\n\r\nCreate Cordova project and add our plugin\r\n```\r\ncordova create MyProject com.my.project \"MyProject\"\r\ncd MyProject\r\ncordova platform add ios\r\ncordova platform add android\r\ncordova plugin add https://github.com/Jumio/mobile-cordova.git#v2.11.0\r\n```\r\n\r\n## Integration\r\n\r\n### iOS\r\n\r\nManual integration or dependency management via cocoapods possible, please see [the official documentation of the Jumio Mobile SDK for iOS](https://github.com/Jumio/mobile-sdk-ios/tree/v2.11.0#basic-setup)\r\n\r\n### Android\r\n\r\nAdd the Jumio repository:\r\n\r\n```\r\nrepositories {\r\n maven { url 'http://mobile-sdk.jumio.com' }\r\n maven { url 'https://maven.google.com/' }\r\n}\r\n```\r\n\r\nAdd a parameter for your SDK_VERSION into the ext-section:\r\n\r\n```\r\next {\r\n SDK_VERSION = \"2.11.0\"\r\n}\r\n```\r\n\r\nAdd required permissions for the products as described in chapter [Permissions](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/README.md#permissions)\r\n\r\nOpen the android project of your cordova project located in */platforms/android* and insert the dependencies from the products you require to your **build.gradle** file. (Module: android)\r\n\r\n* [Netverify & Fastfill](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_netverify-fastfill.md#dependencies)\r\n* [Document Verification](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_document-verification.md#dependencies)\r\n* [BAM Checkout](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_bam-checkout.md#dependencies)\r\n\r\n__Note:__ If you are using Netverify, make sure to add the Google vision meta-data to you **AndroidManifest.xml** accordingly:\r\n\r\n```\r\n\r\n```\r\n\r\n## Usage\r\n\r\n\r\n### Netverify / Fastfill\r\n\r\nTo initialize the SDK, perform the following call.\r\n\r\n```javascript\r\nJumio.initNetverify(, , , {configuration});\r\n```\r\n\r\nDatacenter can either be **US** or **EU**.\r\n\r\n\r\n\r\nConfigure the SDK with the *configuration*-Object.\r\n\r\n| Configuration | Datatype | Description |\r\n| ------ | -------- | ----------- |\r\n| requireVerification | Boolean | Enable ID verification |\r\n| callbackUrl | String | Specify an URL for individual transactions |\r\n| requireFaceMatch | Boolean | Enable face match during the ID verification for a specific transaction |\r\n| preselectedCountry | Boolean | Specify the issuing country (ISO 3166-1 alpha-3 country code) |\r\n| merchantScanReference | String | Allows you to identify the scan (max. 100 characters) |\r\n| merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) |\r\n| customerId | String | Set a customer identifier (max. 100 characters) |\r\n| sendDebugInfoToJumio | Boolean | Send debug information to Jumio. |\r\n| dataExtractionOnMobileOnly | Boolean | Limit data extraction to be done on device only |\r\n| cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. |\r\n| preselectedDocumentVariant | String | Which types of document variants are available. Can be **PAPER** or **PLASTIC** |\r\n| documentTypes | String-Array | An array of accepted document types: Available document types: **PASSPORT**, **DRIVER_LICENSE**, **IDENTITY_CARD**, **VISA** |\r\n\r\n\r\nInitialization example with configuration.\r\n\r\n```javascript\r\nJumio.initNetverify(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n requireVerification: false,\r\n customerId: \"CUSTOMERID\",\r\n preselectedCountry: \"USA\",\r\n cameraPosition: \"BACK\",\r\n documentTypes: [\"DRIVER_LICENSE\", \"PASSPORT\", \"IDENTITY_CARD\", \"VISA\"]\r\n});\r\n```\r\n\r\n***Android eMRTD scanning***\r\n\r\nIf you are using eMRTD scanning, following lines are needed in your Manifest file:\r\n\r\n```javascript\r\n-keep class net.sf.scuba.smartcards.IsoDepCardService {*;}\r\n-keep class org.jmrtd.** { *; }\r\n-keep class net.sf.scuba.** {*;}\r\n-keep class org.spongycastle.** {*;}\r\n-keep class org.ejbca.** {*;}\r\n\r\n-dontwarn java.nio.**\r\n-dontwarn org.codehaus.**\r\n-dontwarn org.ejbca.**\r\n-dontwarn org.spongycastle.**\r\n```\r\n\r\nAdd the needed dependencies following [this chapter](https://github.com/Jumio/mobile-sdk-android/blob/master/docs/integration_netverify-fastfill.md#dependencies) of the android integration guide.\r\n\r\nEnable eMRTD by using the following method in your native android code:\r\n\r\n```javascript\r\nnetverifySDK.setEnableEMRTD(true);\r\n```\r\n\r\n\r\nAs soon as the sdk is initialized, the sdk is started by the following call.\r\n\r\n```javascript\r\nJumio.startNetverify(successCallback, errorCallback);\r\n```\r\n\r\nExample\r\n\r\n```javascript\r\nJumio.startNetverify(function(documentData) {\r\n // YOUR CODE\r\n}, function(error) {\r\n // YOUR CODE\r\n});\r\n```\r\n\r\n### Document Verification\r\n\r\nTo initialize the SDK, perform the following call.\r\n\r\n```javascript\r\nJumio.initDocumentVerification(, , , {configuration});\r\n```\r\n\r\nDatacenter can either be **US** or **EU**.\r\n\r\nConfigure the SDK with the *configuration*-Object. **(configuration marked with * are mandatory)**\r\n\r\n| Configuration | Datatype | Description |\r\n| ------ | -------- | ----------- |\r\n| **type*** | String | See the list below |\r\n| **customerId*** | String | Set a customer identifier (max. 100 characters) |\r\n| **country*** | String | Set the country (ISO-3166-1 alpha-3 code) |\r\n| **merchantScanReference*** | String | Allows you to identify the scan (max. 100 characters) |\r\n| merchantReportingCriteria | String | Use this option to identify the scan in your reports (max. 100 characters) |\r\n| callbackUrl | String | Specify an URL for individual transactions |\r\n| documentName | String | Override the document label on the help screen |\r\n| customDocumentCode | String | Set your custom document code (set in the merchant backend under \"Settings\" - \"Multi Documents\" - \"Custom\" |\r\n| cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. |\r\n\r\nPossible types:\r\n\r\n* BS (Bank statement)\r\n* IC (Insurance card)\r\n* UB (Utility bill, front side)\r\n* CAAP (Cash advance application)\r\n* CRC (Corporate resolution certificate)\r\n* CCS (Credit card statement)\r\n* LAG (Lease agreement)\r\n* LOAP (Loan application)\r\n* MOAP (Mortgage application)\r\n* TR (Tax return)\r\n* VT (Vehicle title)\r\n* VC (Voided check)\r\n* STUC (Student card)\r\n* HCC (Health care card)\r\n* CB (Council bill)\r\n* SENC (Seniors card)\r\n* MEDC (Medicare card)\r\n* BC (Birth certificate)\r\n* WWCC (Working with children check)\r\n* SS (Superannuation statement)\r\n* TAC (Trade association card)\r\n* SEL (School enrolment letter)\r\n* PB (Phone bill)\r\n* USSS (US social security card)\r\n* SSC (Social security card)\r\n* CUSTOM (Custom document type)\r\n\r\nInitialization example with configuration.\r\n\r\n```javascript\r\nJumio.initDocumentVerification(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n type: \"BC\",\r\n customerId: \"CUSTOMER ID\",\r\n country: \"USA\",\r\n merchantScanReference: \"YOURSCANREFERENCE\",\r\n cameraPosition: \"BACK\"\r\n});\r\n```\r\n\r\nAs soon as the SDK is initialized, the SDK is started by the following call.\r\n\r\n```javascript\r\nJumio.startDocumentVerification(successCallback, errorCallback);\r\n```\r\n\r\nExample\r\n\r\n```javascript\r\nJumio.startDocumentVerification(function(documentData) {\r\n // YOUR CODE\r\n}, function(error) {\r\n // YOUR CODE\r\n});\r\n```\r\n\r\n### BAM Checkout\r\n\r\nTo Initialize the SDK, perform the following call.\r\n\r\n```javascript\r\nJumio.initBAM(, , , {configuration});\r\n```\r\n\r\nDatacenter can either be **US** or **EU**.\r\n\r\n\r\n\r\nConfigure the SDK with the *configuration*-Object.\r\n\r\n| Configuration | Datatype | Description |\r\n| ------ | -------- | ----------- |\r\n| cardHolderNameRequired | Boolean |\r\n| sortCodeAndAccountNumberRequired | Boolean |\r\n| expiryRequired | Boolean |\r\n| cvvRequired | Boolean |\r\n| expiryEditable | Boolean |\r\n| cardHolderNameEditable | Boolean |\r\n| merchantReportingCriteria | String | Overwrite your specified reporting criteria to identify each scan attempt in your reports (max. 100 characters)\r\n| vibrationEffectEnabled | Boolean |\r\n| enableFlashOnScanStart | Boolean |\r\n| cardNumberMaskingEnabled | Boolean |\r\n| offlineToken | String | In your Jumio merchant backend on the \"Settings\" page under \"API credentials\" you can find your Offline token. In case you use your offline token, you must not set the API token and secret|\r\n| cameraPosition | String | Which camera is used by default. Can be **FRONT** or **BACK**. |\r\n| cardTypes | String-Array | An array of accepted card types. Available card types: **VISA**, **MASTER_CARD**, **AMERICAN_EXPRESS**, **CHINA_UNIONPAY**, **DINERS_CLUB**, **DISCOVER**, **JCB**, **STARBUCKS** |\r\n\r\nInitialization example with configuration.\r\n\r\n```javascript\r\nJumio.initBAM(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n cardHolderNameRequired: false,\r\n cvvRequired: true,\r\n cameraPosition: \"BACK\",\r\n cardTypes: [\"VISA\", \"MASTER_CARD\"]\r\n});\r\n```\r\n\r\n\r\nAs soon as the sdk is initialized, the sdk is started by the following call.\r\n\r\n```javascript\r\nJumio.startBAM(successCallback, errorCallback);\r\n```\r\n\r\nExample\r\n\r\n```javascript\r\nJumio.startBAM(function(cardInformation) {\r\n // YOUR CODE\r\n}, function(error) {\r\n // YOUR CODE\r\n});\r\n```\r\n\r\n## Customization\r\n\r\n### Android\r\nThe Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v2.11.0/docs/integration_netverify-fastfill.md#customization).\r\n\r\n### iOS\r\nThe SDK can be customized to the respective needs. You can pass the following customization options to the initializer:\r\n\r\n| Customization key | Type | Description |\r\n|:------------------|:-----|:------------|\r\n| disableBlur | BOOL | Deactivate the blur effect |\r\n| backgroundColor | STRING | Change base view's background color |\r\n| foregroundColor | STRING | Change base view's foreground color |\r\n| tintColor | STRING | Change the tint color of the navigation bar |\r\n| barTintColor | STRING | Change the bar tint color of the navigation bar |\r\n| textTitleColor | STRING | Change the text title color of the navigation bar |\r\n| documentSelectionHeaderBackgroundColor | STRING | Change the background color of the document selection header |\r\n| documentSelectionHeaderTitleColor | STRING | Change the title color of the document selection header |\r\n| documentSelectionHeaderIconColor | STRING | Change the icon color of the document selection header |\r\n| documentSelectionButtonBackgroundColor | STRING | Change the background color of the document selection button |\r\n| documentSelectionButtonTitleColor | STRING | Change the title color of the document selection button |\r\n| documentSelectionButtonIconColor | STRING | Change the icon color of the document selection button |\r\n| fallbackButtonBackgroundColor | STRING | Change the background color of the fallback button |\r\n| fallbackButtonBorderColor | STRING | Change the border color of the fallback button |\r\n| fallbackButtonTitleColor | STRING | Change the title color of the fallback button |\r\n| positiveButtonBackgroundColor | STRING | Change the background color of the positive button |\r\n| positiveButtonBorderColor | STRING | Change the border color of the positive button |\r\n| positiveButtonTitleColor | STRING | Change the title color of the positive button |\r\n| negativeButtonBackgroundColor | STRING | Change the background color of the negative button |\r\n| negativeButtonBorderColor | STRING | Change the border color of the negative button |\r\n| negativeButtonTitleColor | STRING | Change the title color of the negative button |\r\n| scanOverlayStandardColor (NV only) | STRING | Change the standard color of the scan overlay |\r\n| scanOverlayValidColor (NV only) | STRING | Change the valid color of the scan overlay |\r\n| scanOverlayInvalidColor (NV only) | STRING | Change the invalid color of the scan overlay |\r\n| scanOverlayTextColor (BAM only) | STRING | Change the text color of the scan overlay |\r\n| scanOverlayBorderColor (BAM only) | STRING | Change the border color of the scan overlay |\r\n\r\nAll colors are provided with a HEX string with the following format: #ff00ff.\r\n\r\n**Customization example**\r\n```javascript\r\nJumio.initNetverify(\"API_TOKEN\", \"API_SECRET\", \"US\", {\r\n requireVerification: false,\r\n ...\r\n}, {\r\n disableBlur: true,\r\n backgroundColor: \"#ff00ff\",\r\n barTintColor: \"#ff1298\"\r\n);\r\n```\r\n\r\n## Callback\r\n\r\nTo get information about callbacks, Netverify Retrieval API, Netverify Delete API and Global Netverify settings and more, please read our [page with server related information](https://github.com/Jumio/implementation-guides/blob/master/netverify/callback.md).\r\n\r\nThe JSONObject with all the extracted data that is returned for the specific products is described in the following subchapters:\r\n\r\n### Netverify & Fastfill\r\n\r\n*NetverifyDocumentData:*\r\n\r\n| Parameter | Type | Max. length | Description |\r\n|:-------------------|:----------- \t|:-------------|:-----------------|\r\n| selectedCountry | String| 3| [ISO 3166-1 alpha-3](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code as provided or selected |\r\n| selectedDocumentType | String | 16| PASSPORT, DRIVER_LICENSE, IDENTITY_CARD or VISA |\r\n| idNumber | String | 100 | Identification number of the document |\r\n| personalNumber | String | 14| Personal number of the document|\r\n| issuingDate | Date | | Date of issue |\r\n| expiryDate | Date | | Date of expiry |\r\n| issuingCountry | String | 3 | Country of issue as ([ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)) country code |\r\n| lastName | String | 100 | Last name of the customer|\r\n| firstName | String | 100 | First name of the customer|\r\n| middleName | String | 100 | Middle name of the customer |\r\n| dob | Date | | Date of birth |\r\n| gender | String | 1| m or f |\r\n| originatingCountry | String | 3|Country of origin as ([ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)) country code |\r\n| addressLine | String | 64 | Street name\t|\r\n| city | String | 64 | City |\r\n| subdivision | String | 3 | Last three characters of [ISO 3166-2:US](http://en.wikipedia.org/wiki/ISO_3166-2:US) state code\t|\r\n| postCode | String | 15 | Postal code |\r\n| mrzData | MRZ-DATA | | MRZ data, see table below |\r\n| optionalData1 | String | 50 | Optional field of MRZ line 1 |\r\n| optionalData2 | String | 50 | Optional field of MRZ line 2 |\r\n| placeOfBirth | String | 255 | Place of Birth |\r\n| extractionMethod | String | 12| MRZ, OCR, BARCODE, BARCODE_OCR or NONE |\r\n\r\n*MRZ-Data*\r\n\r\n| Parameter |Type | Max. length | Description |\r\n|:---------------|:------------- |:-------------|:-----------------|\r\n| format | String | 8| MRP, TD1, TD2, CNIS, MRVA, MRVB or UNKNOWN |\r\n| line1 | String | 50 | MRZ line 1 |\r\n| line2 | String | 50 | MRZ line 2 |\r\n| line3 | String | 50| MRZ line 3 |\r\n| idNumberValid | BOOL| | True if ID number check digit is valid, otherwise false |\r\n| dobValid | BOOL | | True if date of birth check digit is valid, otherwise false |\r\n| expiryDateValid |\tBOOL| |\tTrue if date of expiry check digit is valid or not available, otherwise false|\r\n| personalNumberValid | BOOL | | True if personal number check digit is valid or not available, otherwise false |\r\n| compositeValid | BOOL | | True if composite check digit is valid, otherwise false |\r\n\r\n### BAM Checkout\r\n\r\n*BAMCardInformation*\r\n\r\n|Parameter | Type | Max. length | Description |\r\n|:---------------------------- \t|:-------------|:-----------------|:-------------|\r\n| cardType | String | 16| VISA, MASTER_CARD, AMERICAN_EXPRESS, CHINA_UNIONPAY, DINERS_CLUB, DISCOVER, JCB or STARBUCKS |\r\n| cardNumber | String | 16 | Full credit card number |\r\n| cardNumberGrouped | String | 19 | Grouped credit card number |\r\n| cardNumberMasked | String | 19 | First 6 and last 4 digits of the grouped credit card number, other digits are masked with \"X\" |\r\n| cardExpiryMonth | String | 2 | Month card expires if enabled and readable |\r\n| CardExpiryYear | String | 2 | Year card expires if enabled and readable |\r\n| cardExpiryDate | String | 5 | Date card expires in the format MM/yy if enabled and readable |\r\n| cardCVV | String | 4 | Entered CVV if enabled |\r\n| cardHolderName | String | 100 | Name of the card holder in capital letters if enabled and readable, or as entered if editable |\r\n| cardSortCode | String | 8 | Sort code in the format xx-xx-xx or xxxxxx if enabled, available and readable |\r\n| cardAccountNumber | String | 8 | Account number if enabled, available and readable |\r\n| cardSortCodeValid | BOOL | | True if sort code valid, otherwise false |\r\n| cardAccountNumberValid | BOOL | | True if account number code valid, otherwise false |\r\n\r\n### Document Verification\r\n\r\nNo data returned.\r\n\r\n# Support\r\n\r\n## Contact\r\n\r\nIf you have any questions regarding our implementation guide please contact Jumio Customer Service at support@jumio.com or https://support.jumio.com. The Jumio online helpdesk contains a wealth of information regarding our service including demo videos, product descriptions, FAQs and other things that may help to get you started with Jumio. Check it out at: https://support.jumio.com.\r\n\r\n## Copyright\r\n\r\n© Jumio Corp. 268 Lambert Avenue, Palo Alto, CA 94306\r\n", "readmeFilename": "README.md", "repository": { "type": "git", diff --git a/demo/plugins/cordova-plugin-jumio-mobilesdk/plugin.xml b/demo/plugins/cordova-plugin-jumio-mobilesdk/plugin.xml index b648e0a..49133d2 100644 --- a/demo/plugins/cordova-plugin-jumio-mobilesdk/plugin.xml +++ b/demo/plugins/cordova-plugin-jumio-mobilesdk/plugin.xml @@ -1,5 +1,5 @@ - + JumioMobileSDK @@ -24,7 +24,7 @@ - + diff --git a/demo/plugins/cordova-plugin-jumio-mobilesdk/src/android/JumioMobileSDK.java b/demo/plugins/cordova-plugin-jumio-mobilesdk/src/android/JumioMobileSDK.java index d19be68..954b888 100644 --- a/demo/plugins/cordova-plugin-jumio-mobilesdk/src/android/JumioMobileSDK.java +++ b/demo/plugins/cordova-plugin-jumio-mobilesdk/src/android/JumioMobileSDK.java @@ -265,8 +265,6 @@ private void initNetverify(JSONArray data) { netverifySDK.setMerchantReportingCriteria(options.getString(key)); } else if (key.equals("customerID")) { netverifySDK.setCustomerId(options.getString(key)); - } else if (key.equals("additionalInformation")) { - netverifySDK.setAdditionalInformation(options.getString(key)); } else if (key.equals("enableEpassport")) { netverifySDK.setEnableEMRTD(options.getBoolean(key)); } else if (key.equals("sendDebugInfoToJumio")) { @@ -371,8 +369,6 @@ private void initDocumentVerification(JSONArray data) { documentVerificationSDK.setMerchantReportingCriteria(options.getString(key)); } else if (key.equals("callbackUrl")) { documentVerificationSDK.setCallbackUrl(options.getString(key)); - } else if (key.equals("additionalInformation")) { - documentVerificationSDK.setAdditionalInformation(options.getString(key)); } else if (key.equals("merchantScanReference")) { documentVerificationSDK.setMerchantScanReference(options.getString(key)); } else if (key.equals("customerId")) { @@ -382,6 +378,8 @@ private void initDocumentVerification(JSONArray data) { } else if (key.equals("cameraPosition")) { JumioCameraPosition cameraPosition = (options.getString(key).toLowerCase().equals("front")) ? JumioCameraPosition.FRONT : JumioCameraPosition.BACK; documentVerificationSDK.setCameraPosition(cameraPosition); + } else if (key.equalsIgnoreCase("enableExtraction")) { + documentVerificationSDK.setEnableExtraction(options.getString(key)); } } } diff --git a/demo/plugins/cordova-plugin-jumio-mobilesdk/src/ios/JumioMobileSDK.m b/demo/plugins/cordova-plugin-jumio-mobilesdk/src/ios/JumioMobileSDK.m index 684d476..fb78c1d 100644 --- a/demo/plugins/cordova-plugin-jumio-mobilesdk/src/ios/JumioMobileSDK.m +++ b/demo/plugins/cordova-plugin-jumio-mobilesdk/src/ios/JumioMobileSDK.m @@ -362,6 +362,8 @@ - (void)initDocumentVerification:(CDVInvokedUrlCommand*)command self.documentVerifcationConfiguration.merchantScanReference = [options objectForKey: key]; } else if ([key isEqualToString: @"customerId"]) { self.documentVerifcationConfiguration.customerId = [options objectForKey: key]; + } else if ([key isEqualToString: @"enableExtraction"]) { + self.documentVerifcationConfiguration.enableExtraction = [options objectForKey: key]; } else if ([key isEqualToString: @"documentName"]) { self.documentVerifcationConfiguration.documentName = [options objectForKey: key]; } else if ([key isEqualToString: @"cameraPosition"]) { diff --git a/demo/www/js/index.js b/demo/www/js/index.js index a92df1b..b48fe70 100644 --- a/demo/www/js/index.js +++ b/demo/www/js/index.js @@ -43,7 +43,6 @@ var app = { //merchantScanReference: "ScanRef", //merchantReportingCriteria: "Criteria", //customerId: "ID", - //additionalInformation: "Information", //sendDebugInfoToJumio: true, //dataExtractionOnMobileOnly: false, //cameraPosition: "back", @@ -91,8 +90,8 @@ var app = { merchantScanReference: "123456789", //merchantScanReportingCriteria: "Criteria", //callbackUrl: "URL", - //additionalInformation: "Information", //documentName: "Name", + //enableExtraction: true, //customDocumentCode: "Custom", //cameraPosition: "back" }, { diff --git a/package.json b/package.json index d63c4a6..ad23cb5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-jumio-mobilesdk", - "version": "2.11.0", + "version": "2.12.0", "description": "Jumio Mobile SDK Plugin for Cordova", "cordova": { "id": "cordova-plugin-jumio-mobilesdk", diff --git a/plugin.xml b/plugin.xml index b648e0a..49133d2 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,5 +1,5 @@ - + JumioMobileSDK @@ -24,7 +24,7 @@ - + diff --git a/src/android/JumioMobileSDK.java b/src/android/JumioMobileSDK.java index a31a013..ee9dac2 100644 --- a/src/android/JumioMobileSDK.java +++ b/src/android/JumioMobileSDK.java @@ -253,8 +253,6 @@ private void initNetverify(JSONArray data) { netverifySDK.setMerchantReportingCriteria(options.getString(key)); } else if (key.equalsIgnoreCase("customerID")) { netverifySDK.setCustomerId(options.getString(key)); - } else if (key.equalsIgnoreCase("additionalInformation")) { - netverifySDK.setAdditionalInformation(options.getString(key)); } else if (key.equalsIgnoreCase("enableEpassport")) { netverifySDK.setEnableEMRTD(options.getBoolean(key)); } else if (key.equalsIgnoreCase("sendDebugInfoToJumio")) { @@ -359,8 +357,6 @@ private void initDocumentVerification(JSONArray data) { documentVerificationSDK.setMerchantReportingCriteria(options.getString(key)); } else if (key.equalsIgnoreCase("callbackUrl")) { documentVerificationSDK.setCallbackUrl(options.getString(key)); - } else if (key.equalsIgnoreCase("additionalInformation")) { - documentVerificationSDK.setAdditionalInformation(options.getString(key)); } else if (key.equalsIgnoreCase("merchantScanReference")) { documentVerificationSDK.setMerchantScanReference(options.getString(key)); } else if (key.equalsIgnoreCase("customerId")) { @@ -370,6 +366,8 @@ private void initDocumentVerification(JSONArray data) { } else if (key.equalsIgnoreCase("cameraPosition")) { JumioCameraPosition cameraPosition = (options.getString(key).toLowerCase().equals("front")) ? JumioCameraPosition.FRONT : JumioCameraPosition.BACK; documentVerificationSDK.setCameraPosition(cameraPosition); + } else if (key.equalsIgnoreCase("enableExtraction")) { + documentVerificationSDK.setEnableExtraction(options.getBoolean(key)); } } } diff --git a/src/ios/JumioMobileSDK.m b/src/ios/JumioMobileSDK.m index 684d476..e9c7be6 100644 --- a/src/ios/JumioMobileSDK.m +++ b/src/ios/JumioMobileSDK.m @@ -197,8 +197,6 @@ - (void)initNetverify:(CDVInvokedUrlCommand*)command self.netverifyConfiguration.merchantReportingCriteria = [options objectForKey: key]; } else if ([key isEqualToString: @"customerId"]) { self.netverifyConfiguration.customerId = [options objectForKey: key]; - } else if ([key isEqualToString: @"additionalInformation"]) { - self.netverifyConfiguration.additionalInformation = [options objectForKey: key]; } else if ([key isEqualToString: @"sendDebugInfoToJumio"]) { self.netverifyConfiguration.sendDebugInfoToJumio = [options objectForKey: key]; } else if ([key isEqualToString: @"dataExtractionOnMobileOnly"]) { @@ -356,14 +354,14 @@ - (void)initDocumentVerification:(CDVInvokedUrlCommand*)command self.documentVerifcationConfiguration.merchantReportingCriteria = [options objectForKey: key]; } else if ([key isEqualToString: @"callbackUrl"]) { self.documentVerifcationConfiguration.callbackUrl = [options objectForKey: key]; - } else if ([key isEqualToString: @"additionalInformation"]) { - self.documentVerifcationConfiguration.additionalInformation = [options objectForKey: key]; } else if ([key isEqualToString: @"merchantScanReference"]) { self.documentVerifcationConfiguration.merchantScanReference = [options objectForKey: key]; } else if ([key isEqualToString: @"customerId"]) { self.documentVerifcationConfiguration.customerId = [options objectForKey: key]; } else if ([key isEqualToString: @"documentName"]) { self.documentVerifcationConfiguration.documentName = [options objectForKey: key]; + } else if ([key isEqualToString: @"enableExtraction"]) { + self.documentVerifcationConfiguration.enableExtraction = [options objectForKey: key]; } else if ([key isEqualToString: @"cameraPosition"]) { NSString *cameraString = [[options objectForKey: key] lowercaseString]; JumioCameraPosition cameraPosition = ([cameraString isEqualToString: @"front"]) ? JumioCameraPositionFront : JumioCameraPositionBack;