lncm / invoicer

Invoice generating service that lives on top of lnd.
https://hub.docker.com/r/lncm/invoicer
MIT License
8 stars 3 forks source link

Create self-contained index.htm for public donations #5

Closed meeDamian closed 6 years ago

meeDamian commented 6 years ago

Change this file to:

  1. call GET /invoice upon website load
    1. extract & remember .hash from JSON returned above
    2. extract .invoice from the JSON above, then prepend it with lightning:, and finally render and display QR code for it
  2. call GET /status/<hash> and wait for invoice status change (<hash> == .hash)
  3. upon successful payment or payment expiry, hide the QR and display info message
  4. add a button to generate a new invoice

LMK if you have any further questions.

meeDamian commented 6 years ago

Example response:

macos 2018-11-06 at 12 20 11
GET /invoice
{
  "hash": "ca757a45577f8b8ff144615d00a34e54652b6e3aabe295c3185b8cab36573265",
  "invoice": "lnbc1pd7zfp5pp5ef6h532h079clu2yv9wspg6w23jjkm36403ftscctwx2kdjhxfjsdqqcqzysxqz958jn5my53xv2hw5r6y8yh9y5g9h46dvazm967m5wjc3y3k7vrp5tj5zx7fptg7nrzygddpd2065asm7g8cvtxe78qsczqyjutky0upacqngk5wy"
}

GET /status/ca757a45577f8b8ff144615d00a34e54652b6e3aabe295c3185b8cab36573265
# will wait until status changes to either:
paid

# or
expired
IstoraMandiri commented 6 years ago

https://github.com/lncm/invoicer-ui

Just needs to be hooked up to real endpoints, but good to go otherwise...

meeDamian commented 6 years ago

Temporarily exposed and available @ :

meeDamian commented 6 years ago

Done & temporarily deployed to http://meedamian.ddns.net:2048 . Final deployment will be posted to lncm.io