Sfoglia il codice sorgente

更改app支付 package签名

abiao 4 anni fa
parent
commit
0e9aaadd4e
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      go/gopath/src/github.com/chanxuehong/wechat/mch/sign.go

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

@@ -48,15 +48,15 @@ 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...)
 	h.Write(buf)
 
+	fmt.Printf("----bufs2 %v", &buf)
+	fmt.Printf("----hhhhh %v", h)
 	signature := make([]byte, h.Size()*2)
 	hex.Encode(signature, h.Sum(nil))
 	return string(bytes.ToUpper(signature))