Keith Irwin ce41228c58 | ||
---|---|---|
src | ||
.gitignore | ||
.gitmodules | ||
Dockerfile | ||
LICENSE | ||
README.md | ||
docker-compose.override.sample.yml | ||
docker-compose.yml | ||
package-lock.json | ||
package.json | ||
sample.env | ||
tsconfig.json |
README.md
pago
A lightweight monero payment gateway that can be embedded into any website. "pago" is esperanto for "payment", just as "monero" is esperanto for "money".
Overview
There are three components to pago, shown in the big square at the bottom in this diagram:
monero network
▲
│
┌─────▼───────┐
│ monerod │
│(remote node)│
└───────▲─────┘
daemonRPC│
┌─────────▼──────┐
│view-only wallet│
└──────▲────▲────┘
walletRPC│ │walletRPC
+--------│----│--------+
|┌───────▼─┐ ┌▼───────┐|
|│Processor│ │Merchant│|
|│ API │ │frontend│|
|└──▲──────┘ └────────┘|
| │HTTPS/WSS |
| ┌─▼──────────────┐ |
| │Payment frontend│ |
| └────────────────┘ |
+-----------------pago-+
- The Processor API which creates payments using authenticated RPC calls to a viewonly monero wallet
- The Payment frontend, an embeddable html/js/css interface for making payments, which communicates with the processor API with HTTPS and WSS (websockets)
- The Merchant frontend, an embeddable html/js/css interface for checking payment status, which makes authenticated RPC calls to the wallet directly
The processor api is an express/node.js server and the two frontends have a single lightweight dependency: the knockoutJS microframework.
There is no database. Data are stored in the wallet file, which should be backed up like any data.
Installation
Copy sample files to environment files:
cp docker-compose.override.sample.yml docker-compose.override.yml
cp sample.env .env
Configure .env
and docker-compose.override.yml
according to your setup (they are commmented).
Docker is not required; you can also run npm run start
to run a server on port 80. You will need to run a wallet-rpc service too.