0.1.3 • Published 1 year ago

monnify-react-native-v2 v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago