Socket
Book a DemoInstallSign in
Socket

react-native-simpl-zero-click-sdk

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-simpl-zero-click-sdk

A React Native wrapper for Simpl Zero Click SDK

1.0.8
latest
npmnpm
Version published
Weekly downloads
10
Maintainers
3
Weekly downloads
 
Created
Source

React Native Library for Simpl Zero Click Sdk

This project serves as a wrapper for Simpl Zero Click native sdk.

Installation

Using npm:

npm install --save react-native-simpl-zero-click-sdk

or using yarn:

yarn add react-native-simpl-zero-click-sdk

Linking

Run the following command to link the SDK to Android and iOS

react-native link react-native-simpl-zero-click-sdk

Add native SDK

Android

Add the following to android/app/build.gradle:

...

repositories {
    maven { url "http://maven.getsimpl.com"}
}

dependencies {
    ...
    compile project(':react-native-simpl-zero-click-sdk')
    compile "com.simpl.android:zeroClicksdk:+"
}

iOS

If you are using Cocoapods, Add native ZeroClick SDK to your Podfile

pod 'react-native-simpl-zero-click-sdk', :podspec => '../node_modules/react-native-simpl-zero-click-sdk/react-native-simpl-zero-click-sdk.podspec'

Then run,

pod install

If you are not using Cocoapods, Link the Framework from here manually.

Usage

import SimplSdk from 'react-native-simpl-zero-click-sdk'

// To check either user is approved or not
 SimplSdk.isUserApproved({merchantId: '<merchant id>', isSandbox: true, phone_number: '<phone_number>', email: '<email>', params: { amount_in_paise: 1000 }},
                        (approved, isFirstTransaction, buttonText) => console.log(approved)),
                        (errorMessage) => console.log(errorMessage));

//To generate zero-click token
SimplSdk.generateZeroClickToken((token) => console.log(token), (errorMessage) => console.log(errorMessage))

//To open redirection URL
SimplSdk.openRedirectionURL(urlString, (successMessage) => console.log(successMessage), (errorMessage) => console.log(errorMessage));

//To generate Fingerprint
SimplSdk.generateFingerprint('<merchant_id>', '2212345678', 'email@example.com',
    { sample_merchant_param1: 'value1', sample_merchant_param2: 'value2', sample_merchant_param3: 'value3' },
    (fingerprint) => {
        console.log(fingerprint)
    })

Sample project can be found here

Keywords

simpl

FAQs

Package last updated on 05 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.