https://github.com/seyicoded/react-native-universal-payment-gateway
A utility software every RN project should have as it assist in it's payment methods
https://github.com/seyicoded/react-native-universal-payment-gateway
expo ios payment-gateway payments react-native
Last synced: about 1 year ago
JSON representation
A utility software every RN project should have as it assist in it's payment methods
- Host: GitHub
- URL: https://github.com/seyicoded/react-native-universal-payment-gateway
- Owner: seyicoded
- License: mit
- Created: 2022-08-17T15:50:07.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-29T00:49:42.000Z (about 2 years ago)
- Last Synced: 2024-05-29T15:00:43.247Z (about 2 years ago)
- Topics: expo, ios, payment-gateway, payments, react-native
- Language: TypeScript
- Homepage:
- Size: 9.96 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: Readme.md
- License: license.md
Awesome Lists containing this project
README
### Announcements
* 📣 We are proud to announce the release of our universal gateway package for both android and ios on RN
* 💡 We've just added a logically payment webview what does exactly what it's supposed too, feel free to try it out [New].
* 💡 Package initially was JS but utilizes TS for all its implementation to give it users free access to type per implementation.
* 🙏 If you have a question, feel free to open a new issue as the package will be regularly maintained...
---
## REACT NATIVE UNIVERSAL PAYMENT GATEWAY
* Library available for both **android** and **ios**
* compatible with plain react-native and expo



---
**setup**
to utilize simple install
```diff
npm install react-native-universal-payment-gateway react-native-webview
```
```diff
yarn add react-native-universal-payment-gateway react-native-webview
```
```diff
expo install react-native-universal-payment-gateway react-native-webview
```
**Not Using Expo, no problem**
**ANDROID**
if using RN > 0.6, then just re-build,
else, just upgrade ab🌝g
**IOS**
simple run
```diff
cd ios && pod install
```
then re-build
---
**USAGE:**
import package
```typescript
import Gateway from 'react-native-universal-payment-gateway'
```
**SAMPLE UTILIZATION**
```typescript
const App = () => {
const [showPaystack, setShowPaystack] = useState(false)
const [showFlutterwave, setShowFlutterwave] = useState(false)
const [showUniversal, setShowUniversal] = useState(false)
const [showWebView, setShowWebView] = useState(false)
return (
{/*
* key note
* always place the components from this library on your outtermost instance component
*/}
{
console.log("data returns is ",e)
// to validate, returns {status: srring, data: {data} }
// status is success for success on paystack
await Gateway.validatePaystackPayment({
apiKey: 'sk_test_ac8971390ed43c9b29074c23f4bdaddccc24b865',
tnxRef: e.tnxref
})
}}
onShow={setShowPaystack} />
{
console.log("data returns is ",e)
if(e.tnxref == "/pay_canceled=true"){
return
}
}}
onShow={setShowFlutterwave}
/>
{
console.log("data returns is ",e)
if(e.tnxref == "/pay_canceled=true"){
return
}
}}
onShow={setShowWebView} />
{
console.log("data returns is ",e)
}}
onShow={setShowUniversal} />
UNIVERSAL PAYMENT GATEWAY LIBRARY
setShowPaystack(true)} style={[styles.btnContainer]}>
click for paystack
setShowFlutterwave(true)} style={[styles.btnContainer]}>
click for flutterwave
setShowWebView(true)} style={[styles.btnContainer]}>
click to load logically payment webview
setShowUniversal(true)} style={[styles.btnContainer]}>
click to utilize universal
© seyicoded
);
};
```
**Feel free to reach out for any urgent feature or requirement as we currently plan on regularly maintaining this library.**