react-native-phonepesdk
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

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

  1. Import PhonepeCheckoutTouch module to your component:

    import { PhonepeCheckoutTouch } from 'react-native-phonepesdk';
  2. 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


Package Sidebar

Install

npm i react-native-phonepesdk

Weekly Downloads

19

Version

2.0.4

License

MIT

Unpacked Size

140 kB

Total Files

60

Last publish

Collaborators

  • vmehar13