This commit is contained in:
邹宗楠
2022-05-26 09:50:23 +08:00
parent 48e8919377
commit d9d30a18f1
2 changed files with 6 additions and 1 deletions

View File

@@ -55,6 +55,9 @@ func New(notUsed interface{}, token string, w http.ResponseWriter, r *http.Reque
globals.SugarLogger.Debugf("jxcontext New, token:%s", token)
if auth2.IsV2Token(token) {
authInfo, err2 := auth2.GetTokenInfo(token)
globals.SugarLogger.Debug("authInfo==============",authInfo.Name)
globals.SugarLogger.Debug("authInfo==============",authInfo.UserID)
globals.SugarLogger.Debug("authInfo==============",err2)
if err = err2; err == nil {
ctx.userInfo = authInfo
globals.SugarLogger.Debugf("jxcontext New, V2 authInfo:%s", utils.Format4Output(authInfo, true))

View File

@@ -3,6 +3,7 @@ package localjx
import (
"encoding/json"
"fmt"
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/douyin"
"strings"
"time"
@@ -40,7 +41,8 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int,
}
if vendorPayType == tonglianpayapi.PayTypeWxXcx {
param.SubAppID = subAppID
if authInfo, err := ctx.GetV2AuthInfo(); err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini && authInfo.GetAuthTypeID() == subAppID {
authInfo, err := ctx.GetV2AuthInfo()
if err == nil && (authInfo.GetAuthType() == weixin.AuthTypeMini || authInfo.GetAuthID() == douyin.AuthTypeTiktokMini)&& authInfo.GetAuthTypeID() == subAppID {
param.Acct = authInfo.GetAuthID()
}
}