Create self-contained index.htm for public donations
meeDamian opened this issue · 4 comments
meeDamian commented
Change this file to:
- call
GET /invoice
upon website load- extract & remember
.hash
from JSON returned above - extract
.invoice
from the JSON above, then prepend it withlightning:
, and finally render and display QR code for it
- extract & remember
- call
GET /status/<hash>
and wait for invoice status change (<hash> == .hash
) - upon successful payment or payment expiry, hide the QR and display info message
- add a button to generate a new invoice
LMK if you have any further questions.
meeDamian commented
Example response:
GET /invoice
{
"hash": "ca757a45577f8b8ff144615d00a34e54652b6e3aabe295c3185b8cab36573265",
"invoice": "lnbc1pd7zfp5pp5ef6h532h079clu2yv9wspg6w23jjkm36403ftscctwx2kdjhxfjsdqqcqzysxqz958jn5my53xv2hw5r6y8yh9y5g9h46dvazm967m5wjc3y3k7vrp5tj5zx7fptg7nrzygddpd2065asm7g8cvtxe78qsczqyjutky0upacqngk5wy"
}
GET /status/ca757a45577f8b8ff144615d00a34e54652b6e3aabe295c3185b8cab36573265
# will wait until status changes to either:
paid
# or
expired
IstoraMandiri commented
https://github.com/lncm/invoicer-ui
Just needs to be hooked up to real endpoints, but good to go otherwise...
meeDamian commented
Temporarily exposed and available @ :
http://meedamian.ddns.net:2048/
http://meedamian.ddns.net:2048/invoice
http://meedamian.ddns.net:2048/status/<hash>
meeDamian commented
Done & temporarily deployed to http://meedamian.ddns.net:2048 . Final deployment will be posted to lncm.io