commit
85bde475a3
1 changed files with 5 additions and 3 deletions
|
|
@ -56,13 +56,13 @@ func lndhub_payment(w http.ResponseWriter, p *db.Payment, bolt11 decodepay.Bolt1
|
|||
card_name_parts := strings.Split(c.Card_name, ":")
|
||||
|
||||
if len(card_name_parts) != 2 {
|
||||
log.WithFields(log.Fields{"card_payment_id": p.Card_payment_id}).Warn(err)
|
||||
log.WithFields(log.Fields{"card_payment_id": p.Card_payment_id}).Warn("login:password not found")
|
||||
resp_err.Write(w)
|
||||
return
|
||||
}
|
||||
|
||||
if len(card_name_parts[0]) != 20 || len(card_name_parts[1]) != 20 {
|
||||
log.WithFields(log.Fields{"card_payment_id": p.Card_payment_id}).Warn(err)
|
||||
log.WithFields(log.Fields{"card_payment_id": p.Card_payment_id}).Warn("login:password badly formed")
|
||||
resp_err.Write(w)
|
||||
return
|
||||
}
|
||||
|
|
@ -72,7 +72,6 @@ func lndhub_payment(w http.ResponseWriter, p *db.Payment, bolt11 decodepay.Bolt1
|
|||
lhAuthRequest.Password = card_name_parts[1]
|
||||
|
||||
authReq, err := json.Marshal(lhAuthRequest)
|
||||
log.Info(string(authReq))
|
||||
|
||||
req_auth, err := http.NewRequest("POST", lndhub_url+"/auth", bytes.NewBuffer(authReq))
|
||||
if err != nil {
|
||||
|
|
@ -101,6 +100,9 @@ func lndhub_payment(w http.ResponseWriter, p *db.Payment, bolt11 decodepay.Bolt1
|
|||
return
|
||||
}
|
||||
|
||||
log.WithFields(log.Fields{"card_payment_id": p.Card_payment_id,
|
||||
"resp_auth_bytes": resp_auth_bytes}).Info("issue 62")
|
||||
|
||||
var auth_keys LndhubAuthResponse
|
||||
|
||||
err = json.Unmarshal([]byte(resp_auth_bytes), &auth_keys)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue