Skip to content

Commit

Permalink
fix some error
Browse files Browse the repository at this point in the history
  • Loading branch information
moremorefun committed Jul 27, 2021
1 parent b078565 commit 74325f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 2 additions & 5 deletions help.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,7 @@ func WechatCheckSign(appSecret string, paramsMap gin.H) bool {
}
}
getSign := WechatGetSign(appSecret, noSignMap)
if getSign != paramsMap["sign"] {
return false
}
return true
return getSign == paramsMap["sign"]
}

func walk(nodes []XMLNode, f func(XMLNode) bool) {
Expand Down Expand Up @@ -516,7 +513,7 @@ func ModelRowToInterface(m map[string]string, intCols []string, floatCols []stri
}
o[k] = vInt
} else if IsStringInSlice(floatCols, k) {
vFloat, err := strconv.ParseFloat(v, 10)
vFloat, err := strconv.ParseFloat(v, 64)
if err != nil {
return nil, err
}
Expand Down
3 changes: 3 additions & 0 deletions wxpayv3.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ func WxPayV3GetPrepay(keySerial string, key *rsa.PrivateKey, appID, mchID, openI
PrepayID string `json:"prepay_id"`
}
err = jsoniter.Unmarshal(body, &prepayResp)
if err != nil {
return nil, "", err
}
if len(prepayResp.PrepayID) == 0 {
return nil, "", fmt.Errorf("get prepay id err: %s", body)
}
Expand Down

0 comments on commit 74325f8

Please sign in to comment.