feat: Added readme
All checks were successful
Build Docker / Build Image (push) Successful in 20s

This commit is contained in:
Nathan Woodburn 2024-02-14 23:30:22 +11:00
parent ca5e54449c
commit b5a31cbd3a
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 17 additions and 5 deletions

View File

@ -1 +1,16 @@
# hns-pay # HNS Pay
HNS Pay is a simple payment gateway for Handshake domains. It allows you to accept payments in HNS for your products and services.
## Deploying HNS Pay
The easiest way to deploy HNS Pay is to use docker.
```bash
docker volume create hns-pay
docker run -d -p 5000:5000 -v hns-pay:/app/data --name hns-pay \
-e HSD_IP=localhost -e HSD_API_KEY=yourhsdapikey -e WALLET=primary -e GLOBAL_WEBHOOK=webhook_for_all_users \
git.woodburn.au/nathanwoodburn/hns-pay:latest
```
If you have a encrypted wallet you can also pass the `WALLET_PASS` environment variable.

View File

@ -79,9 +79,7 @@ def check_payments():
if tx['address'] == address['address']: if tx['address'] == address['address']:
if 'hashes' in address: if 'hashes' in address:
if tx['txid'] in address['hashes']: if tx['txid'] in address['hashes']:
print("Already confirmed")
continue continue
address['hashes'].append(tx['txid']) address['hashes'].append(tx['txid'])
address['hashes'] = [tx['txid']] address['hashes'] = [tx['txid']]
@ -137,7 +135,6 @@ def finalise_payment(payment,tx):
if resp.status_code != 200: if resp.status_code != 200:
print(resp.text) print(resp.text)
# Send payout # Send payout
url = f"http://x:{HSD_API_KEY}@{HSD_IP}:12039" url = f"http://x:{HSD_API_KEY}@{HSD_IP}:12039"
data = { data = {