1.0.8 • Published 8 months ago

test-reactjs-caleb v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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

NPM JavaScript Style Guide

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: "test@gmail.com",
    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

1.0.8

8 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago