npm.io
0.1.0 • Published 1 year ago

react-native-cybersource-fingerprint-sdk

Licence
MIT
Version
0.1.0
Deps
1
Size
13.4 MB
Vulns
0
Weekly
0

react-native-cybersource-fingerprint-sdk

Basic implementation of Cybersource fingerprint SDK for android and iOS

SDK configuration requires a valid ORG_ID and SERVER_URL that are provided by cybersource. Also MERCHANT_ID is required to match sessionID with decision manager.

Installation

NOTE: Tested with RN 0.63+

yarn add react-native-cybersource-fingerprint-sdk

Usage

import CybersourceFingerprintSdk from "react-native-cybersource-fingerprint-sdk";

// Once in app lifetime
CybersourceFingerprintSdk.initialize('ORG_ID', 'SERVER_URL'); // return true if successful

// ...

// Generate and send sessionID each time a transaction should be processed
const sessionId = generateUniqueValue();
const result = await CybersourceFingerprintSdk.setSessionID(`MERCHANT_ID${sessionId}`); // return Promise<object> as { status: int, sessionId: string }

Development

Native module code is within the folders:

  • /android
  • /ios

To test the libs functionality and usage on react-native, open the projects inside example

xed example/ios

Remember to install node modules and pods.

License

MIT

Keywords