React Native
Easily implement Ivorypay for crypto payments in your React Native application. This library supports both Android and iOS.
More details can be found at https://www.npmjs.com/package/react-native-ivorypay
Installation
This library is available on npm, you can install it by running
npm install --save react-native-ivorypay
or
yarn add react-native-ivorypay
Dependencies
In order to render the Ivorypay checkout screen this library depends on react-native-webview ensure you properly install this library before continuing.
Public Key
In order to use this library you are required to use your ivorypay public key and not the secret key. See how to get your API Keys here
🔥 IMPORTANT INFORMATION 🔥
If the options
property on PayWithIvoryPay changes, when next the user taps on the button a new payment will be initialized whether the last one was successful or not.
The transaction reference is optional, but advisable you generate yours. If one is not supplied, one will be generated for you. The transaction reference must also be exactly 32 characters long.
You also cannot use the same transaction reference for two different payments, also remember to recreate the transaction reference before allowing the user to initiate a new payment.
Usage
Below are a few examples showcasing how you can use the library to implement payment in your React Native app.
PayWithIvoryPay
Import PayWithIvoryPay
from react-native-ivorypay
and use it like so.
PayWithIvoryPay (with custom button)
Import PayWithIvoryPay
from react-native-ivorypay
and use it like so.
IvoryPayButton
Import IvoryPayButton
from react-native-ivorypay
and use it like so.
initIvoryPayTransaction
More Details can be found at https://www.npmjs.com/package/react-native-ivorypay
Last updated