react-native-redpay
v1.0.4
Published
RedPay's React Native SDK for payments
Downloads
6
Readme
react-native-redpay
RedPay's SDK for react native
Installation
Depends on : react-native-webview
npm install react-native-webview / yarn add react-native-webview
To Install:
npm install react-native-redpay
or
yarn add react-native-redpay
Usage
import RedPay from "react-native-redpay";
// ...
<View style={{flex:1}}>
<RedPay amountInMinor={'10000'} apiKey={'apiKey'} env={'test'}
customerEmail={'customerEmail'} description={'test'} metadata={{key:"value"}}
onComplete={(reference) => {
//Handle successful transaction
}} onInitFailed={(reason) => {
//SDK failed to initialize
}} />
</View>
N.B:
- Amount in minor means 100 should be passed as "10000"
- Currency default : NGN
- Env default : production
- Metadata prop takes any object but is optional
- Component should be wrapped in a view component occupying its intended space
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Copyright RedPay Limited 2023
Made with create-react-native-library