Skip to content

Commit

Permalink
v1.5.100
Browse files Browse the repository at this point in the history
  • Loading branch information
iGoogle-ink committed Jan 30, 2024
1 parent f312c67 commit c5e835b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 22 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/go-pay/xhttp v0.0.2
github.com/go-pay/xlog v0.0.2
github.com/go-pay/xtime v0.0.2
golang.org/x/crypto v0.17.0
golang.org/x/crypto v0.18.0
)

require github.com/go-pay/bm v0.0.1 // indirect
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ github.com/go-pay/xlog v0.0.2 h1:kUg5X8/5VZAPDg1J5eGjA3MG0/H5kK6Ew0dW/Bycsws=
github.com/go-pay/xlog v0.0.2/go.mod h1:DbjMADPK4+Sjxj28ekK9goqn4zmyY4hql/zRiab+S9E=
github.com/go-pay/xtime v0.0.2 h1:7YR4/iuELsEHpJ6LUO0SVK80hQxDO9MLCfuVYIiTCRM=
github.com/go-pay/xtime v0.0.2/go.mod h1:W1yRbJaSt4CSBcdAtLBQ8xajiN/Pl5hquGczUcUE9xE=
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
7 changes: 5 additions & 2 deletions release_note.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
版本号:Release 1.5.100
修改记录:
(1) 支付宝:整理异步通知 NotifyRequest 结构体。
(2) gopay:依赖库整理拆分整理,go mod 版本升级到 go1.20。
(3) gopay:升级 1.5.100 版本需要伴随部分代码替换修改,谨慎升级。
(2) 微信V2:新增 client.ProfitSharingOrderAmountQuery(),查询订单待分账金额。
(3) 微信V2:新增 client.ProfitSharingMerchantRatioQuery(),查询最大分账比例。
(4) gopay:依赖库整理拆分整理,go mod 版本升级到 go1.20。
(5) gopay:升级 1.5.100 版本需要伴随部分代码替换修改,谨慎升级。
(6) gopay:优化一些已知问题。

版本号:Release 1.5.99
修改记录:
Expand Down
4 changes: 2 additions & 2 deletions wechat/merchant.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ func (w *Client) ProfitSharingOrderAmountQuery(ctx context.Context, bm gopay.Bod
// 服务商可以查询子商户设置的允许服务商分账的最大比例
// 接口频率:30QPS
// 微信文档:https://pay.weixin.qq.com/wiki/doc/api/allocation_sl.php?chapter=25_10&index=7
func (w *Client) ProfitSharingMerchantRatioQuery(ctx context.Context, bm gopay.BodyMap) (wxRsp *ProfitSharingMerchanTratioQuery, err error) {
func (w *Client) ProfitSharingMerchantRatioQuery(ctx context.Context, bm gopay.BodyMap) (wxRsp *ProfitSharingMerchantRatioQuery, err error) {
err = bm.CheckEmptyError("mch_id", "nonce_str")
if err != nil {
return nil, err
Expand All @@ -380,7 +380,7 @@ func (w *Client) ProfitSharingMerchantRatioQuery(ctx context.Context, bm gopay.B
if err != nil {
return nil, err
}
wxRsp = new(ProfitSharingMerchanTratioQuery)
wxRsp = new(ProfitSharingMerchantRatioQuery)
if err = xml.Unmarshal(bs, wxRsp); err != nil {
return nil, fmt.Errorf("[%w]: %v, bytes: %s", gopay.UnmarshalErr, err, string(bs))
}
Expand Down
19 changes: 4 additions & 15 deletions wechat/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,17 +632,6 @@ type ProfitSharingQueryResponse struct {
Receivers string `xml:"receivers,omitempty" json:"receivers,omitempty"`
}

//
//type profitSharingReceiver struct {
// Amount int `xml:"amount,omitempty" json:"amount,omitempty"` // 分账金额 分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额
// Description string `xml:"description,omitempty" json:"description,omitempty"` // 分账描述
// ReceiverType string `xml:"type,omitempty" json:"type,omitempty"` // 分账接收方类型 MERCHANT_ID:商户ID ;PERSONAL_OPENID:个人openid
// Account string `xml:"account,omitempty" json:"account,omitempty"` // 分账接收方账号
// Result string `xml:"result,omitempty" json:"result,omitempty"` // 分账结果 PENDING:待分账 SUCCESS:分账成功 ADJUST:分账失败待调账 RETURNED:已转回分账方 CLOSED: 已关闭
// FinishTime string `xml:"finish_time,omitempty" json:"finish_time,omitempty"` // 分账完成时间
// FailReason string `xml:"fail_reason,omitempty" json:"fail_reason,omitempty"` // 分账失败原因 ACCOUNT_ABNORMAL:分账接收账户异常 NO_RELATION:分账关系已解除 RECEIVER_HIGH_RISK:高风险接收方
//}

// ProfitSharingAddReceiverResponse 添加分账接收者结果
type ProfitSharingAddReceiverResponse struct {
ReturnCode string `xml:"return_code,omitempty" json:"return_code,omitempty"` // 返回状态码 SUCCESS/FAIL 此字段是通信标识,非交易标识
Expand Down Expand Up @@ -693,21 +682,21 @@ type ProfitSharingOrderAmountQueryResponse struct {
ErrCodeDes string `xml:"err_code_des,omitempty" json:"err_code_des,omitempty"` // 错误代码描述
MchId string `xml:"mch_id,omitempty" json:"mch_id,omitempty"` //调用接口时提供的服务商户号
TransactionId string `xml:"transaction_id,omitempty" json:"transaction_id,omitempty"` //微信支付订单号
UnsplitAmount int `xml:"unsplit_amount,omitempty" json:"unsplit_amount,omitempty"` //订单剩余待分金额,整数,单位为分
UnsplitAmount string `xml:"unsplit_amount,omitempty" json:"unsplit_amount,omitempty"` //订单剩余待分金额,整数,单位为分
NonceStr string `xml:"nonce_str,omitempty" json:"nonce_str,omitempty"` //微信返回的随机字符串
Sign string `xml:"sign,omitempty" json:"sign,omitempty"` //微信返回的签名
}

// ProfitSharingReturnResponse 分账退回响应结果
type ProfitSharingMerchanTratioQuery struct {
// ProfitSharingMerchantRatioQuery 分账退回响应结果
type ProfitSharingMerchantRatioQuery struct {
ReturnCode string `xml:"return_code,omitempty" json:"return_code,omitempty"` // 返回状态码 SUCCESS/FAIL 此字段是通信标识,非交易标识
ErrCode string `xml:"err_code,omitempty" json:"err_code,omitempty"` // 错误代码
ErrorMsg string `xml:"error_msg,omitempty" json:"error_msg,omitempty"` // 返回信息 如果返回状态码为FAIL,则本字段存在,且为失败的错误信息
ErrCodeDes string `xml:"err_code_des,omitempty" json:"err_code_des,omitempty"` // 错误代码描述
MchId string `xml:"mch_id,omitempty" json:"mch_id,omitempty"` //调用接口时提供的服务商户号
SubMchId string `xml:"sub_mch_id,omitempty" json:"sub_mch_id,omitempty"` //微信支付分配的子商户号,即分账的出资商户号。查询子商户号的设置的最大分账比例(普通分账)时返回此字段
BrandMchId string `xml:"brand_mch_id,omitempty" json:"brand_mch_id,omitempty"` //调用接口时提供的品牌主商户号。查询品牌主商户设置的全局分账比例(品牌分账)时返回此字段。
MaxRatio int `xml:"max_ratio,omitempty" json:"max_ratio,omitempty"` //子商户允许服务商分账的最大比例,单位万分比,比如2000表示20%
MaxRatio string `xml:"max_ratio,omitempty" json:"max_ratio,omitempty"` //子商户允许服务商分账的最大比例,单位万分比,比如2000表示20%
NonceStr string `xml:"nonce_str,omitempty" json:"nonce_str,omitempty"` //微信返回的随机字符串
Sign string `xml:"sign,omitempty" json:"sign,omitempty"` //微信返回的签名
}
Expand Down

0 comments on commit c5e835b

Please sign in to comment.