react-native-phonepesdk
v2.0.4
Published
Package for phonepe
Downloads
98
Maintainers
Readme
react-native-phonepesdk
Installation
Using npm:
npm install react-native-phonepesdk
or using yarn:
yarn add react-native-phonepesdk
For Expo Users:
npx expo install react-native-phonepesdk
If you are using Expo, you are done. Otherwise, continue to the next step.
Install and link react-native-webview
. To install and link them, run:
npm install react-native-webview
OR
yarn add react-native-webview
Usage
Steps
Import PhonepeCheckoutTouch module to your component:
import { PhonepeCheckoutTouch } from 'react-native-phonepesdk';
Wrap PhonepeCheckoutTouch, Like TouchableOpacity:
<PhonepeCheckoutTouch merchantId={"PGTESTPAYUAT"} //required saltKey={"099eb0cd-02cf-4e2a-8aca-3e6c6aff0399"} //required saltIndex={1} //default "1" amount={1000} //required callback={"https://nanostack.io/callback"} //required redirectUrl={"https://nanostack.io/redirect"} //required merchantUserId={"USER_ID"} //required successCallback={(data) => console.log(data)} errorCallback={(data) => console.log(data)} uat={true} //default false for production usage. Mark true for UAT testing > <Text>Button</Text> </PhonepeCheckoutTouch>
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT