react-native-krypton-pay
v0.2.39
Published
Add React-Native-Krypton-Pay to your project by running; >npm install react-native-krypton-pay
Readme
Accept Crypton currency payment easily in your React Native apps. This is the official React Native component for the implementation of Krypton Pay on RN mobile apps.
Installation
Add React-Native-Krypton-Pay to your project by running;
npm install react-native-krypton-pay
or
yarn add react-native-krypton-pay
import React from 'react';
import KryptonPay from 'react-native-krypton-pay';
import { View } from 'react-native';
function Pay() {
const data = {
amount: '5000', //Amount in Fiat
name: 'James Haruna', //Customer's name
email: '[email protected]', //Customer's email
phone: '080123456789', //Customer's phone
key: 'pk_live_6a2ea143c3288e7d48081107dab774bcc3a6ed24', //Business Live Key
};
return (
<View style={{ flex: 1 }}>
<KryptonPay
data={data}
onSuccess={e => {
// Handle success transaction event
}}
onFailed={e => {
// Handle transaction failed event
}}
onError={e => {
// Handle error event
}}
onCancel={e => {
// Handle cancel event
}}
/>
</View>
);
}