@@ -9,8 +9,3 @@ const (
OK = "OK"
Version = "2.0.5"
)
-
-type ReturnMessage struct {
- ReturnCode string `json:"return_code"`
- ReturnMsg string `json:"return_msg"`
-}
@@ -2,6 +2,7 @@
发布时间:2020/01/01 22:55
修改记录:
(1) 添加一些函数参数判空操作,避免Panic
+ (2) 去掉不用的结构体 ReturnMessage
版本号:Release 2.0.4
发布时间:2019/12/24 14:29
@@ -120,6 +120,9 @@ func ParseRefundNotifyResult(req *http.Request) (notifyReq *RefundNotifyRequest,
// 返回参数err:错误信息
// 文档:https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_16&index=10
func DecryptRefundNotifyReqInfo(reqInfo, apiKey string) (refundNotify *RefundNotify, err error) {
+ if reqInfo == gopay.NULL || apiKey == gopay.NULL {
+ return nil, errors.New("reqInfo or apiKey is null")
+ }
var (
encryptionB, bs []byte
block cipher.Block