Skip to content

This React Native module provides a wrapper to add Remita Payments to your (Android) React Native application using the Remita Android Mobile SDK library.

License

Notifications You must be signed in to change notification settings

devbabs/react-native-remita

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cfb33dd Β· Feb 8, 2023

History

5 Commits
Feb 1, 2023
Feb 1, 2023
Feb 8, 2023
Feb 8, 2023
Feb 8, 2023
Feb 1, 2023
Feb 8, 2023
Feb 1, 2023
Feb 1, 2023
Feb 1, 2023
Feb 1, 2023
Feb 1, 2023
Feb 1, 2023
Feb 1, 2023
Feb 1, 2023
Feb 1, 2023
Feb 8, 2023
Feb 1, 2023
Feb 1, 2023
Feb 1, 2023
Feb 8, 2023
Feb 1, 2023
Feb 8, 2023
Feb 1, 2023
Feb 1, 2023

Repository files navigation

react-native-remita

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.

TODO (Coming Soon)

  • Add Support for iOS

Android Screenshot for react-native-remita Payment Screen

Installation

This module currently works well on Android πŸ‘πŸ½

npm install react-native-remita

Setup

Make sure you call this Remita.init() with correct arguments before calling Remita.pay()

import Remita from 'react-native-remita';

// ...

Remita.init({
      apiKey: YOUR_REMITA_PUBLIC_KEY, //Replace this with your own Remita Public Key
      environment: 'demo' // demo or production
    })

Important ⚠️:

Demo Setup:
{
  'apiKey': TEST_PUBLIC_KEY`,
  'environment': 'demo'
}
Production Setup:
{
  'apiKey': LIVE_PUBLIC_KEY`,
  'environment': 'production'
}

Usage

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
  }
})

Successful payment response

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"
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Made with ❀️ by Babs πŸ‘¨πŸ½β€πŸ’»πŸ˜Ž

Cheers πŸ₯‚


Made with create-react-native-library

About

This React Native module provides a wrapper to add Remita Payments to your (Android) React Native application using the Remita Android Mobile SDK library.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published