Integration

The minimal supported version of Cordova is 6.0.0 or higher
The minimal supported iOS version is 11.0 or higher
The minimal supported Android API version is 21 or higher

1. Install dependencies

Add dependency to your project in the package.json file:

"dependencies": {
         "@credolab/ionic-proxy-encrypt": "4.0.0"
}

Add .npmrc file at the root level of the project with the path to the plugin repository

@credolab:registry=https://npm.cloudsmith.io/credolab/hybrid/

Open a terminal window on the root path of your project and execute:

npm install

Add repositories for Android

Open platforms/android/repositories.gradle file and add the repository according to your flow:

allprojects {
    repositories {
        // ...
        maven { url "https://dl.cloudsmith.io/$TOKEN/credolab/proxyen-sdk/maven/" }
    }
}

Add repositories for iOS

Add the Cocoapods repository to the beginning of the ios/Podfile file

source 'https://token:[email protected]/basic/credolab/proxyen-sdk/cocoapods/index.git'

Install Pods

Install pods by executing

pod install

2. Build and Use Credoappsdk

In your Cordova app code open the file where theCredoappsdk planned to be used.

  1. Add plugin import
declare var cordova: any;
var exec = cordova.require("cordova/exec"); // this line for Cordova only
// other imports
  1. Call CredoAppService.execute() method to start the data collection process
async execute() {
    exec(
        async function(dataset) {
            alert("Data has been successfully collected:  " + dataset)
            // upload dataset to the server
        },
        async function(error) {
                alert("Error: " + error)
            },
        "CredoAppSdk",
        "execute"
    );
}
async execute() {
    cordova.exec(
        async function(dataset) {
            alert("Data has been successfully collected:  " + dataset)
            // upload dataset to the server
        },
        async function(error) {
                alert("Error: " + error)
            },
        "CredoAppSdk",
        "execute"
    );
}
  1. Done!

📘

Note

Relevant for Android only
Add functionality for requesting permissions before starting the data collection process in case there are used modules that require granting dangerous permissions. The detailed info about modules can be found here.

Next Steps

After successfully integrating our SDK, it is recommended to proceed with the following steps to utilise our platform effectively:

  1. Setting up your Reverse Proxy
  2. Uploading your Dataset. Once the server is configured, you can upload your dataset using the server address.
  3. Collecting your Dataset Insight or TruValidate(formerly known as iovation) Fraud Check. With the dataset uploaded, you can now get insights or perform TruValidate Fraud Checks to assess risk based on the device and transaction details provided.

If you have any further questions, please do not hesitate to contact us.