Merge pull request #45 from boltcard/update-payinvoice-loginid
Update the payinvoice api call to LND hub
This commit is contained in:
commit
806acb6096
1 changed files with 2 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ type LndhubAuthResponse struct {
|
||||||
type LndhubPayInvoiceRequest struct {
|
type LndhubPayInvoiceRequest struct {
|
||||||
Invoice string `json:"invoice"`
|
Invoice string `json:"invoice"`
|
||||||
FreeAmount string `json:"freeamount"`
|
FreeAmount string `json:"freeamount"`
|
||||||
|
LoginId string `json:"loginid"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func lndhub_payment(w http.ResponseWriter, p *db.Payment, bolt11 decodepay.Bolt11, param_pr string) {
|
func lndhub_payment(w http.ResponseWriter, p *db.Payment, bolt11 decodepay.Bolt11, param_pr string) {
|
||||||
|
|
@ -106,6 +107,7 @@ func lndhub_payment(w http.ResponseWriter, p *db.Payment, bolt11 decodepay.Bolt1
|
||||||
var payInvoiceRequest LndhubPayInvoiceRequest
|
var payInvoiceRequest LndhubPayInvoiceRequest
|
||||||
payInvoiceRequest.Invoice = param_pr
|
payInvoiceRequest.Invoice = param_pr
|
||||||
payInvoiceRequest.FreeAmount = strconv.Itoa(int(bolt11.MSatoshi / 1000))
|
payInvoiceRequest.FreeAmount = strconv.Itoa(int(bolt11.MSatoshi / 1000))
|
||||||
|
payInvoiceRequest.LoginId = card_name_parts[0]
|
||||||
|
|
||||||
req_payinvoice, err := json.Marshal(payInvoiceRequest)
|
req_payinvoice, err := json.Marshal(payInvoiceRequest)
|
||||||
log.Info(string(req_payinvoice))
|
log.Info(string(req_payinvoice))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue