monitor lnurlp invoice state
This commit is contained in:
parent
f12c7c2888
commit
e3c75d885f
2 changed files with 69 additions and 5 deletions
|
|
@ -33,7 +33,7 @@ func lnurlp_callback(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
//TODO add err
|
||||
metadata := "[[\"text/identifier\",\"" + name + "@" + domain + "\"],[\"text/plain\",\"" + name + "@" + domain + "\"]]"
|
||||
pr, _ := add_invoice(amount_sat, metadata)
|
||||
pr, r_hash, _ := add_invoice(amount_sat, metadata)
|
||||
|
||||
jsonData := []byte(`{` +
|
||||
`"status":"OK","successAction":{"tag":"message","message":"Payment success!"}` +
|
||||
|
|
@ -43,4 +43,6 @@ func lnurlp_callback(w http.ResponseWriter, r *http.Request) {
|
|||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Write(jsonData)
|
||||
|
||||
go monitor_invoice_state(r_hash)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue