Quellcode durchsuchen

更改app支付 package签名

abiao vor 4 Jahren
Ursprung
Commit
b71ffe874b

+ 1 - 1
go/gopath/src/fohow.com/libs/wx_mp/pay.go

@@ -195,7 +195,7 @@ func getAppPayPrepayId(outTradeNo string, totalPrice int64, body, notifyUrl, rem
 		"trade_type": "APP",
 	}
 
-	beego.BeeLogger.Warn("mechantInfo err[%s]", mechantInfo.MchId)
+	//beego.BeeLogger.Warn("mechantInfo err[%s]", mechantInfo.MchId)
 
 	if limit {
 		req["limit_pay"] = "no_credit"

+ 4 - 1
go/gopath/src/github.com/chanxuehong/wechat/mch/sign.go

@@ -48,10 +48,13 @@ func Sign(parameters map[string]string, apiKey string, fn func() hash.Hash) stri
 		buf = append(buf, '&')
 		h.Write(buf)
 	}
+	fmt.Printf("----bufs1 %s", buf)
+
 	buf = buf[:0]
+	fmt.Printf("----bufs2 %s", buf)
+
 	buf = append(buf, "key="...)
 	buf = append(buf, apiKey...)
-	fmt.Printf("----bufs %s", buf)
 	h.Write(buf)
 
 	signature := make([]byte, h.Size()*2)