1.0.0 • Published 5 months ago

cordova_accurascan_micr v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

Cordova Accura Scan KYC

Accura Scan OCR is used for Optical character recognition.

Accura Scan Face Match is used for Matching 2 Faces, Source face and Target face. It matches the User Image from a Selfie vs User Image in document.

Accura Scan Authentication is used for your customer verification and authentication. Unlock the True Identity of Your Users with 3D Selfie Technology

Below steps to setup Accura Scan's SDK to your project.

Note:-

Add the plugin:- cordova plugin add cordova_accurascan_micr

Usage var accura = cordova.plugins.cordova_accurascan_micr;

1.Setup Android

Add it in your root build.gradle at the end of repositories.

allprojects {
   repositories {
       google()
       jcenter()
       maven {
           url 'https://jitpack.io'
           credentials { username 'jp_ssguccab6c5ge2l4jitaj92ek2' }
       }    
    }
}

Add it in your app/build.gradle file.

android{
 ...
 packagingOptions {
   pickFirst 'lib/arm64-v8a/libcrypto.so'
   pickFirst 'lib/arm64-v8a/libssl.so'
   
   pickFirst 'lib/armeabi-v7a/libcrypto.so'
   pickFirst 'lib/armeabi-v7a/libssl.so'
   
   pickFirst 'lib/x86/libcrypto.so'
   pickFirst 'lib/x86/libssl.so'
   
   pickFirst 'lib/x86_64/libcrypto.so'
   pickFirst 'lib/x86_64/libssl.so'
   
 }
}

2.Setup iOS

1.Install Git LFS using command install git-lfs

2.Run pod install

Add this permissions into iOS Info.plist file.

<key>NSCameraUsageDescription</key>
<string>App usage camera for scan documents.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>App usage photos for get document picture.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>App usage photos for save document picture.</string>

3.Setup Accura Scan licenses into your projects

Accura Scan has two license require for use full functionality of this library. Generate your own Accura license from here key.license

This license is compulsory for this library to work. it will get all setup of accura SDK.

For Android

Create "assets" folder under app/src/main and Add license file in to assets folder.
- key.license // for Accura Scan OCR

For iOS

Place both the license in your project's Runner directory, and add the licenses to the target.

4.Get license configuration from SDK. It returns all active functionalities of your license.

Setting up License

  accura.getMetadata(function (result) {
    if(result.isValid){
      console.log(result)
    }
  }, function (error) {
    alert(error);
  })

Error: String

Success: JSON String Response = { isMICR: boolean }

Setting up Configuration's,Error mssages and Scaning title messages

  setUpConfig: () => {
      //setConfig
      var config = {
          setLowLightTolerance: 10,
          setMinGlarePercentage: 6,
          setMaxGlarePercentage: 99,
          setBlurPercentage: 60,
        };

      var accuraConfigs = {
        setCameraFacing: 0,
        isShowLogo: 1,
        CameraScreen_CornerBorder_Enable: true,
        CameraScreen_Border_Width: 15,
        Disable_Card_Name: false,
        CameraScreen_Frame_Color: '#D5323F',
        CameraScreen_Text_Color: '#FFFFFF',
        CameraScreen_Text_Border_Color: '#000000',
        CameraScreen_Color: '#80000000',
        CameraScreen_Back_Button: 1,
        CameraScreen_Change_Button: 1,
        ACCURA_ERROR_CODE_MOTION: 'Keep Document Steady',
        ACCURA_ERROR_CODE_DOCUMENT_IN_FRAME: 'Keep document in frame',
        ACCURA_ERROR_CODE_BRING_DOCUMENT_IN_FRAME: 'Bring card near to frame',
        ACCURA_ERROR_CODE_PROCESSING: 'Processing...',
        ACCURA_ERROR_CODE_BLUR_DOCUMENT: 'Blur detect in document',
        ACCURA_ERROR_CODE_GLARE_DOCUMENT: 'Glare detect in document',
        ACCURA_ERROR_CODE_MOVE_CLOSER: "Move closer to document",
        ACCURA_ERROR_CODE_MOVE_AWAY:"Move away from document",
        ACCURA_ERROR_CODE_KEEP_MICR_IN_FRAME: "Keep MICR in frame",
      };
    
      var accuraTitleMsg = {
        SCAN_TITLE_MICR: 'Scan Cheque',

      };

      accura.setupAccuraConfig(config,accuraConfigs,accuraTitleMsg,
      function success(result){
          console.log(result);
      })
  }

5.Method for scan MICR documents.

  startMICR:()=>{
    //MICR
    accura.startMICR(micrType,function success(result){
      navigateToPage(result);
    },function(error){
    alert(error);
    });
  }

MICRType: String

value: e13b or cmc7

Success: JSON Response {

front_data: JSONObjects?,

front_img: URI?

}

Error: String

Contributing See the contributing guide to learn how to contribute to the repository and the development workflow.

License: MIT