Send OK response on successful BoltHub payment
This commit is contained in:
parent
806acb6096
commit
4e87012ea1
1 changed files with 10 additions and 11 deletions
|
|
@ -3,15 +3,16 @@ package lnurlw
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/boltcard/boltcard/db"
|
"github.com/boltcard/boltcard/db"
|
||||||
"github.com/boltcard/boltcard/lnd"
|
"github.com/boltcard/boltcard/lnd"
|
||||||
"github.com/boltcard/boltcard/resp_err"
|
"github.com/boltcard/boltcard/resp_err"
|
||||||
decodepay "github.com/fiatjaf/ln-decodepay"
|
decodepay "github.com/fiatjaf/ln-decodepay"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"io"
|
|
||||||
"net/http"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type LndhubAuthRequest struct {
|
type LndhubAuthRequest struct {
|
||||||
|
|
@ -146,14 +147,12 @@ func lndhub_payment(w http.ResponseWriter, p *db.Payment, bolt11 decodepay.Bolt1
|
||||||
|
|
||||||
log.Info(string(b2))
|
log.Info(string(b2))
|
||||||
|
|
||||||
// var auth_keys LndhubAuthResponse
|
log.Debug("sending 'status OK' response")
|
||||||
|
|
||||||
// err = json.Unmarshal([]byte(b), &auth_keys)
|
w.Header().Set("Content-Type", "application/json")
|
||||||
// if err != nil {
|
w.WriteHeader(http.StatusOK)
|
||||||
// log.WithFields(log.Fields{"card_payment_id": p.Card_payment_id}).Warn(err)
|
jsonData := []byte(`{"status":"OK"}`)
|
||||||
// resp_err.Write(w)
|
w.Write(jsonData)
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue