react-native-saitaid-kyc-sdk
v0.0.8
Published
this is saitaid-kyc sdk to kyc
Downloads
24
Readme
react-native-saitaid-kyc-sdk
Installation
npm install --save react-native-saitaid-kyc-sdk
edit AndroidManifest.xml file
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- other code -->
<!-- { -->
<queries>
<package android:name="com.saitaid.zki"/>
</queries>
<!-- } -->
<application
>
<!-- other code -->
</manifest>
Usage
import { StyleSheet, View, Button } from 'react-native';
import useSaitaidKycSdk from 'react-native-saitaid-kyc-sdk';
export default function App() {
const sdkOptions = {
clientId: '[111]', // customer ID
apiKey: '[apikey]', //enter api key provided by saitaid
onSuccess: (res: any) => {
// handle when the user completes the KYC process
console.log(res);
},
onFailed: (error: any) => {
// handle when the user fails the KYC process or some error occured
console.error('error sdk:', error);
},
};
const { openApp } = useSaitaidKycSdk(sdkOptions); // use the hook to open the app and complete kyc process
return (
<View style={styles.container}>
<Button title="Open app" onPress={openApp} />
{/** calling to open app */}
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
box: {
width: 60,
height: 60,
marginVertical: 20,
},
});
// ...
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library