Code Monkey home page Code Monkey logo

pli-pay's Introduction

PLI Crypto Payment Gateway

A package to accept XDC or XRC20 token as Payment method in your website or web application in few lines of code.

Currently supports XDC and PLI token.

Installation

Install my-project with npm

  npm install --save pli-pay

Usage/Examples

import Paypli from 'pli-pay'
import 'pli-pay/dist/index.css'

function App() {
  return <Paypli
    chainId={50}
    paymethod={"XDC"}
    fiatcurrency={"usd"}
    style={`apple_pay_button apple_pay_button_black`}
    receiverAddress={"0x117c691d76c1d9c68e3709a87f7d496097f2b56f"}
    amount={"1"}
    onSuccess={(data) => console.log("onSuccess", data)}
    onFailure={(data) => console.log("onFailure", data)}
    onError={(data) => console.log("onError", data)}
  />
}

API Reference

Checkout below Api for supported fiat currency

  curl -X 'GET' \ 'https://api.coingecko.com/api/v3/simple/supported_vs_currencies' \ -H 'accept: application/json'

Required Parameter

Parameter Type Description Values
chainId string Specify network. 50(Mainnet) (or) 51(Apothem)
paymethod string Specify payment method. XDC (or) PLI
fiatcurrency string Specify fiat currency specify in lowercase. "usd","aed","inr","ars","aud","eur" ..etc
style string Add your own style class
receiverAddress string Valid Wallet Address. XDC Wallet Address
amount string Amount to received. eg:10
onSuccess function Capture Success Response
onFailure function Capture Failure Response
onError function Capture Error Response

Run Locally

Clone the project

  git clone https://github.com/GoPlugin/pli-pay

Go to the project directory

  cd example

Install dependencies

  npm install

Start the server

  npm run start

Developed By

License

MIT © GoPlugin

Acknowledgements

pli-pay's People

Contributors

jurjees23 avatar

Stargazers

11ppm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.