소스 검색

update release-2.0 (#454)

* merge branch release-2.0 to v2 (#450)

* feat: add/delete subscribe template (#449)

* feat: 添加 SDKApiNotOpen 错误信息 (#448)

* 添加微信客服SDK

* polish:优化签名函数

* polish:优化注释内容

* polish:复用已有的Token以及CommonError,移除无用的输出

* polish:复用已有的消息加解密

* fix:修复错误信息被覆盖的问题

* polish:go fmt 文件

* polish:客服链接支持自定义参数并更新注释文档内容

* feat:支持微信客服回调请求的校验和消息的解析,复用原有的Signature和DecryptMsg方法

* feat:对外暴露SDKApiForbidden等错误

可以通过调用升级服务相关接口然后根据该错误判断微信客服配置来源

* feat:添加无效的open_kfid错误信息

* fix: 添加SDKApiNotOpen 错误信息

目前主要用于判断客户是否关闭了API授权,如果客户关闭了API功能导致服务异常,则可以引导用户执行相应的操作重新开启改功能

Co-authored-by: Afeyer <afeyer@h5base.cn>

Co-authored-by: ZmJ <wzmmmmj@gmail.com>
Co-authored-by: Afeyer <1500527791@qq.com>
Co-authored-by: Afeyer <afeyer@h5base.cn>

* Update go.yml (#452)

* 修正字段问题 (#451)

fix #443

* fix linux build failed when cgo disable (#453)

Co-authored-by: ZmJ <wzmmmmj@gmail.com>
Co-authored-by: Afeyer <1500527791@qq.com>
Co-authored-by: Afeyer <afeyer@h5base.cn>
silenceper 4 년 전
부모
커밋
3afe499e70
3개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 2
      .github/workflows/go.yml
  2. 1 1
      pay/notify/refund.go
  3. 2 2
      work/msgaudit/client_unsupport.go

+ 2 - 2
.github/workflows/go.yml

@@ -2,9 +2,9 @@ name: Go
 
 on:
   push:
-    branches: [ master,release-* ]
+    branches: [ master,release-*,v2 ]
   pull_request:
-    branches: [ master,release-* ]
+    branches: [ master,release-*,v2 ]
 
 jobs:
   golangci:

+ 1 - 1
pay/notify/refund.go

@@ -35,7 +35,7 @@ type RefundedReqInfo struct {
 	SettlementRefundFee *int    `xml:"settlement_refund_fee"`
 	RefundStatus        *string `xml:"refund_status"`
 	SuccessTime         *string `xml:"success_time"`
-	RefundRecvAccount   *string `xml:"refund_recv_account"`
+	RefundRecvAccount   *string `xml:"refund_recv_accout"`
 	RefundAccount       *string `xml:"refund_account"`
 	RefundRequestSource *string `xml:"refund_request_source"`
 }

+ 2 - 2
work/msgaudit/client_unsupport.go

@@ -1,4 +1,4 @@
-// +build !linux
+// +build !linux linux,!cgo
 
 //Package msgaudit for unsupport platform
 package msgaudit
@@ -15,5 +15,5 @@ type Client struct {
 
 // NewClient new
 func NewClient(cfg *config.Config) (*Client, error) {
-	return nil, fmt.Errorf("会话存档功能目前只支持Linux平台运行")
+	return nil, fmt.Errorf("会话存档功能目前只支持Linux平台运行,并且打开设置CGO_ENABLED=1")
 }