feat: 微信回调fix

This commit is contained in:
wolter 2024-12-06 21:57:17 +08:00
parent c2fd9e68f9
commit 24c0c6d36a
3 changed files with 2 additions and 3 deletions

View File

@ -42,7 +42,7 @@ func WxCallback(c *gin.Context) {
c.String(http.StatusBadRequest, "%s", "fail")
return
}
if payChannelModel.ChannelType != common.PAY_CHANNEL_WECHAT_H5 {
if !(payChannelModel.ChannelType == common.PAY_CHANNEL_WECHAT_H5 || payChannelModel.ChannelType == common.PAY_CHANNEL_WECHAT_JSAPI) {
logger.Error(c, "WxCallback-回调数据解析支付配置错误,查询的数据不是当前渠道")
c.String(http.StatusBadRequest, "%s", "fail")
return

View File

@ -300,7 +300,6 @@ func WxJsApiPay(param front.WxJsApiPayRequest) (response front.WxJsApiPayRespons
}
// 4 签名
// 4.1 签名数据
signValue, err := task.Sign(response.AppId, response.TimeStamp, response.NonceStr, response.Package)
if err != nil {
utils.Log(nil, "签名失败", err)

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>微信授权登录</title>
<title>微信支付</title>
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
</head>
<body>