test-reactjs-caleb
v1.0.8
Published
paylode ReactJS Wrapper for quick integration
Downloads
5
Maintainers
Readme
Paylode Checkout Wrapper for ReactJS
Requirements
This module was built and tested using React 15.0.0 - 18.0.0
Get Started
Steps to add Paylode checkout to your React application
Install
npm install --save paylode-reactjs
Usage
import React, { Component } from "react";
import PaylodeButton from "paylode-reactjs";
const App = () => {
const close = (close) => {
console.log(close);
};
const callback = (response) => {
console.log(response);
};
const checkProgress = (progress) => {
console.log(progress);
};
const options = {
publicKey: "PLPK_**************",
phoneNumber: "0900000000",
email: "[email protected]",
amount: total,
currency: "NGN",
onClose: function(data) {
// alert("iFRAME CLOSED Now");
// console.log("Returned data:", data);
},
onSuccess: function(data) {
console.log("Returned data:", data);
},
};
return (
<PaylodeButton
type="div"
currency={options.currency}
country={"NG"}
publicKey={options.publicKey}
onClose={options.onClose}
scriptStatus={checkProgress}
amount={options.amount}
tag={"button"}
firstname={options.firstname}
lastname={options.lastname}
email={options.lastname}
phoneNumber={options.phoneNumber}
title={"Pay with paylode"}
/>
);
};
export default App;
Please checkout Paylode Developer Documentation for other available options you can add to the tag
License
MIT © paylode