1
This commit is contained in:
@@ -41,9 +41,19 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int,
|
||||
if vendorPayType == tonglianpayapi.PayTypeWxXcx {
|
||||
param.SubAppID = subAppID
|
||||
authInfo, err := ctx.GetV2AuthInfo()
|
||||
// 微信小程序支付
|
||||
if err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini && authInfo.GetAuthTypeID() == subAppID {
|
||||
param.Acct = authInfo.GetAuthID()
|
||||
}
|
||||
// 抖音小程序,调起微信支付界面
|
||||
//if err == nil && authInfo.GetAuthType() == douyin.AuthTypeTiktokMini {
|
||||
// appID, jsCode := weixin.SplitJsCode(subAppID)
|
||||
// appID = auth2.WeCartAppID
|
||||
// sessionInfo, err := weixin.GetWxApp(appID).SNSCode2Session(jsCode)
|
||||
// if err == nil {
|
||||
// param.Acct = sessionInfo.OpenID
|
||||
// }
|
||||
//}
|
||||
}
|
||||
if vendorPayType == tonglianpayapi.PayTypeZfbJS || vendorPayType == tonglianpayapi.PayTypeZfbApp {
|
||||
if authInfo, err := ctx.GetV2AuthInfo(); err == nil {
|
||||
|
||||
@@ -40,11 +40,8 @@ func pay4OrderByWX(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayTyp
|
||||
if authInfo, err := ctx.GetV2AuthInfo(); err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini {
|
||||
param.OpenID = authInfo.GetAuthID()
|
||||
}
|
||||
globals.SugarLogger.Debug("err1=====================", err)
|
||||
|
||||
result, err := api.WxpayAPI.CreateUnifiedOrder(param)
|
||||
globals.SugarLogger.Debug("err2=====================", err)
|
||||
globals.SugarLogger.Debug("err3=====================", fmt.Sprintf("%+v", result))
|
||||
if err == nil {
|
||||
orderPay = &model.OrderPay{
|
||||
PayOrderID: param.OutTradeNo,
|
||||
|
||||
Reference in New Issue
Block a user