Skip to content

dApp to integrate ergo payments in website and application without blockchain knowledge

License

Notifications You must be signed in to change notification settings

ThierryM1212/ergo-pay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ergo Payment Portal

This project intends to ease Ergo and SigUSD payments integration.
It provides a webpage allowing to generate URL to request Ergo payments to be proceed with Yoroi dApp connector.
Those URLs can be generated by any website to request a payment in Ergo or SigUSD, it can includes a reference so when the payment is received the website is notified of which payment has been received.

The main project is ergo-payment-portal, allowing to process the payment, generate payment URLs and monitor the vouchers.
The monitor-vouchers project is a small nodejs interface allowing to get the vouchers in json from an http request in order to automate the payment processing.
The main app (dApp) ergo-payment-portal is distributed as a static webpage and does not allow such automation.

Why should I use it ?

You can integrate a FREE payment interface in your website or application, processing payment with 0 fee and no refund can be executed by a third party.

How to integrate it ?

Option 1: Use the deployed Ergo Pay at: https://thierrym1212.github.io/paymentportal/

In this option you do not deploy a personal Ergo payment portal, and will support the fee of the deployed dApp (0.1% min or 0.001 ERG or 0.01 SigUSD).
You can monitor the payment through the https://thierrym1212.github.io/paymentportal/voucher.html page or automate it using the monitor-vouchers nodejs script.

You need to:

    URL parameters are:
        address=9ew97YCt7zQDwmLsytMAWGj2kockM11PFCnRvT2cz9LQaaB7uPG
        currency=ERG
        amount=5
        ref=Account_17889569

address needs to be a valid ERG address
currency needs to be ERG or SIGUSD
amount needs to be > 0.1 for ERG and > 0.01 for SigUSG
ref is optional, it can be any string up to 40 ascii char

- monitor the payments at https://thierrym1212.github.io/paymentportal/voucher.html?address=9ew97YCt7zQDwmLsytMAWGj2kockM11PFCnRvT2cz9LQaaB7uPG
You will see the payment received until you move the fund in any transaction.

Option 2: Deploy your own Ergo payment portal

  • Checkout the ergo-payment-portal project and follow the readme to build a static page
  • Integrate the static page generated in the dist folder in your application / website, setting the dApp fees to 0
  • Integrate ergo payments like for option 1
  • Additionnally, to automate the payment processing in your website/application, you can run the monitor-vouchers project included in this repository in order to get the json list of payments received with their reference.

This alows you to handle your own payment portal direct from customers.

About

dApp to integrate ergo payments in website and application without blockchain knowledge

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages