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

0.1.3 • Public • Published

monnify-react-native-v2

monnify react native sdk

Installation

npm i monnify-react-native-v2

Usage

import { RNMonnifySDK } from 'monnify-react-native-v2';

// ...
RNMonnifySDK.initialize({
  apiKey: 'XXXXXXXX',
  contractCode: 'XXXXXXXXX',
  applicationMode: 'LIVE' || 'TEST',
});

RNMonnifySDK.initializePayment({
  amount: 1200.5,
  customerName: 'XXXXXXXXXX',
  customerEmail: 'XXXXXXXXXX',
  paymentReference: 'XXXXXXXX',
  paymentDescription: 'XXXXXXXX',
  currencyCode: 'XXXXXXX',
  incomeSplitConfig: [],
})
  .then((response: any) => {
    console.log(response); // card charged successfully, get reference here
  })
  .catch((error: any) => {
    console.log(error); // error is a javascript Error object
    console.log(error.message);
    console.log(error.code);
  });

Contributing

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

License

MIT


Made with create-react-native-library

Dependencies (0)

    Dev Dependencies (20)

    Package Sidebar

    Install

    npm i monnify-react-native-v2

    Weekly Downloads

    1

    Version

    0.1.3

    License

    MIT

    Unpacked Size

    7.19 MB

    Total Files

    707

    Last publish

    Collaborators

    • charlesinto