This React Native module provides a wrapper to add Remita Payments to your React Native application using the Remita Android Mobile SDK and the Remita iOS Mobile SDK libraries.
- Add Support for iOS
This module currently works well on Android 👍🏽
npm install react-native-remitaMake sure you call this Remita.init() with correct arguments before calling Remita.pay()
importRemitafrom'react-native-remita';// ...Remita.init({apiKey: YOUR_REMITA_PUBLIC_KEY,//Replace this with your own Remita Public Keyenvironment: 'demo'// demo or production}){
'apiKey': TEST_PUBLIC_KEY`,
'environment': 'demo'
}
{
'apiKey': LIVE_PUBLIC_KEY`,
'environment': 'production'
}
You can trigger the Remita.pay() method when a button is pressed.
Make sure you pass all required parameters to this method call.
Remita.pay({amount: 1000,email: "example@email.com",phone: "+23412345678",firstName: "Babalola",lastName: "Macaulay",currencyCode: "NGN",narration: "Test payment for this example",paymentCompleted: (paymentResponse)=>{console.log("Payment completed",paymentResponse)// Do whatever you want with `paymentResponse` object}})You can trigger the Remita.pay() method when a button is pressed.
Make sure you pass all required parameters to this method call.
{"paymentResponseData": {"amount": "1000.0","message": "","paymentReference": "210010145765","processorId": "","transactionId": "710378586"},"responseCode": "00","responseMessage": "SUCCESS"}See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with ❤️ by Babs 👨🏽💻😎
Made with create-react-native-library
