https://github.com/ThierryM1212/ergo-pay
dApp to integrate ergo payments in website and application without blockchain knowledge
https://github.com/ThierryM1212/ergo-pay
Last synced: 5 days ago
JSON representation
dApp to integrate ergo payments in website and application without blockchain knowledge
- Host: GitHub
- URL: https://github.com/ThierryM1212/ergo-pay
- Owner: ThierryM1212
- License: gpl-3.0
- Created: 2021-11-23T11:14:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-26T08:02:39.000Z (over 2 years ago)
- Last Synced: 2023-03-05T13:23:47.552Z (about 2 years ago)
- Language: JavaScript
- Size: 208 KB
- Stars: 9
- Watchers: 1
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ergo - ErgoPay Utilities (ThierryM1212) - Utilities or libraries related to implementing ErgoPay. [`JS`/`TS`?] *(Community)* (🛠️ Development Tooling <a id="development-tooling"></a> / 💳 Payments <a id="payments"></a>)
README
# 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:
- create an Ergo wallet to get an ERG address
- create links in your website or application to the payment portal:
https://thierrym1212.github.io/paymentportal/pay.html?address=9ew97YCt7zQDwmLsytMAWGj2kockM11PFCnRvT2cz9LQaaB7uPG¤cy=ERG&amount=5&ref=Account_17889569
```
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.