From 86f28b9b83611f206f83eabb12ff5fd5e9a5434b Mon Sep 17 00:00:00 2001 From: lijianbin <513837235@.qq.com> Date: Tue, 13 Sep 2022 15:16:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmb.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/cmb.go b/cmb.go index 27fcaa4..0e5705d 100644 --- a/cmb.go +++ b/cmb.go @@ -134,13 +134,11 @@ func CmbHttpBuildQuery(data map[string]interface{}, filter_sign bool) string { build_str := strings.Trim(query, "&") - log.Println("拼接后的数据: ", build_str) return build_str } // 生成签名sign--聚合支付 func SetSign(data map[string]interface{}, privateKey string) string { - log.Println("招行加签start") build_str := CmbHttpBuildQuery(data, true) priv := new(sm2.PrivateKey) @@ -157,8 +155,6 @@ func SetSign(data map[string]interface{}, privateKey string) string { sign := base64.StdEncoding.EncodeToString(signature) - log.Println("加密后sign值: ", sign) - log.Println("招行加签end") return sign } @@ -182,15 +178,11 @@ func HeaderInfo(appid, secret, sign string) map[string]string { delete(headerData, "sign") delete(headerData, "secret") - log.Println("header信息", headerData) - return headerData } // 接口验签--各客户端请求我们接口验签 func CheckSign(appid, app_secret, timeStamp, nonce, sign string, body map[string]interface{}) error { - log.Println("请求验签start") - /*time_now := time.Now().Unix() if time_now-ToInt64(timeStamp) > 10 { @@ -209,16 +201,12 @@ func CheckSign(appid, app_secret, timeStamp, nonce, sign string, body map[string } str := CmbHttpBuildQuery(sign_info, false) + "&" + app_secret - log.Println("加密前数据: ", str) sign_str := crypter.Md5Str(str) - log.Println("加密后数据: ", sign_str) if sign_str != sign { return errors.New("签名不正确") } - log.Println("请求验签end") - return nil } @@ -231,8 +219,6 @@ func PostJsonData(url string, param interface{}, headerinfo map[string]string) ( return []byte(""), err } - log.Println(bytes.NewBuffer(params)) - req, err := http.NewRequest("POST", url, bytes.NewBuffer(params)) if err != nil { return []byte(""), err @@ -340,7 +326,6 @@ func HttpBuildjson(data map[string]interface{}, filter_sign bool) string { } } ss, _ := json.Marshal(res) - log.Println("拼接后的数据: ", string(ss)) return string(ss) }