Sfoglia il codice sorgente

更改app支付 package签名

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

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

@@ -35,11 +35,13 @@ func Sign(parameters map[string]string, apiKey string, fn func() hash.Hash) stri
 	h := fn()
 
 	buf := make([]byte, 256)
+	fmt.Printf("begin------")
 	for _, k := range ks {
 		v := parameters[k]
 		if v == "" {
 			continue
 		}
+
 		fmt.Printf("map---%s=>%s\n", k, v)
 
 		buf = buf[:0]
@@ -49,7 +51,7 @@ func Sign(parameters map[string]string, apiKey string, fn func() hash.Hash) stri
 		buf = append(buf, '&')
 		h.Write(buf)
 	}
-
+	fmt.Printf("end------")
 	buf = buf[:0]
 
 	buf = append(buf, "key="...)