Browse Source

Merge branch 'master' into master

村口大白鹅 6 years ago
parent
commit
3618fb21b7
5 changed files with 10 additions and 15 deletions
  1. 1 1
      README.md
  2. 1 1
      alipay_params.go
  3. 1 1
      constant.go
  4. 7 0
      release_note.txt
  5. 0 12
      wechat_client_test.go

+ 1 - 1
README.md

@@ -85,7 +85,7 @@
 
 ### 支付宝公共API
 
-* gopay.GetCertSN() => 获取证书SN号(app_cert_sn、alipay_cert_sn、alipay_root_cert_sn<支付宝root根证书的sn获取通过 gopay.GetCertSN() 获取>
+* gopay.GetCertSN() => 获取证书SN号(app_cert_sn、alipay_cert_sn、alipay_root_cert_sn>
 * gopay.AliPaySystemOauthToken() => 换取授权访问令牌(得到access_token,user_id等信息)
 * gopay.FormatPrivateKey() => 格式化应用私钥
 * gopay.FormatAliPayPublicKey() => 格式化支付宝公钥

+ 1 - 1
alipay_params.go

@@ -36,7 +36,7 @@ type OpenApiRoyaltyDetailInfoPojo struct {
 	Desc         string `json:"desc,omitempty"`
 }
 
-//设置 应用公钥证书SN
+// 设置 应用公钥证书SN
 //    appCertSN:应用公钥证书SN,通过 gopay.GetCertSN() 获取
 func (a *AliPayClient) SetAppCertSN(appCertSN string) (client *AliPayClient) {
 	a.AppCertSN = appCertSN

+ 1 - 1
constant.go

@@ -4,7 +4,7 @@ const (
 	null       string = ""
 	TimeLayout string = "2006-01-02 15:04:05"
 	DateLayout string = "2006-01-02"
-	Version    string = "1.4.0"
+	Version    string = "1.4.1"
 	//微信
 	//===========================================================================================
 

+ 7 - 0
release_note.txt

@@ -1,3 +1,10 @@
+版本号:Release 1.4.1
+发布时间:2019/11/04 14:28
+修改记录:
+   (1) 支付宝:新增公共API方法:GetRootCertSN(),修复获取支付宝根证书获取 sn 的问题(wziww)
+   (2) 支付宝:新增Client方法:client.SetAppCertSN(),可自行获取公钥 sn 并赋值
+   (2) 支付宝:新增Client方法:client.SetAliPayRootCertSN(),可自行获取根证书 sn 并赋值
+
 版本号:Release 1.4.0
 发布时间:2019/10/10 13:51
 修改记录:

+ 0 - 12
wechat_client_test.go

@@ -1,23 +1,11 @@
 package gopay
 
 import (
-	"crypto/md5"
-	"encoding/hex"
 	"encoding/json"
 	"fmt"
-	"strings"
 	"testing"
 )
 
-func TestMd5(t *testing.T) {
-	st := "appid=wxdaa2ab9ef87b5497&nonceStr=9k20rM66parD2U49&package=prepay_id=wx29164301554772fbc70d1d793335446010&signType=MD5&timeStamp=1548751382&key=GFDS8j98rewnmgl45wHTt980jg543wmg"
-	hash := md5.New()
-	hash.Write([]byte(st))
-	sum := hash.Sum(nil)
-	upper := strings.ToUpper(hex.EncodeToString(sum))
-	fmt.Println(" ssad  ", upper)
-}
-
 type Student struct {
 	Name  string `json:"name,omitempty"`
 	Age   int    `json:"age,omitempty"`