1
This commit is contained in:
@@ -3,7 +3,6 @@ package localjx
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/douyin"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -42,13 +41,7 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int,
|
|||||||
if vendorPayType == tonglianpayapi.PayTypeWxXcx {
|
if vendorPayType == tonglianpayapi.PayTypeWxXcx {
|
||||||
param.SubAppID = subAppID
|
param.SubAppID = subAppID
|
||||||
authInfo, err := ctx.GetV2AuthInfo()
|
authInfo, err := ctx.GetV2AuthInfo()
|
||||||
globals.SugarLogger.Debug("11111111111111111111", authInfo.GetAuthType(), err == nil && (authInfo.GetAuthType() == weixin.AuthTypeMini || authInfo.GetAuthType() == douyin.AuthTypeTiktokMini) && (authInfo.GetAuthTypeID() == subAppID || authInfo.GetAuthTypeID() == "tta6a1d01c399f264201"))
|
if err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini && authInfo.GetAuthTypeID() == subAppID {
|
||||||
globals.SugarLogger.Debug("11111111111111111111", err)
|
|
||||||
globals.SugarLogger.Debug("11111111111111111111", authInfo.GetAuthTypeID())
|
|
||||||
globals.SugarLogger.Debug("11111111111111111111", subAppID)
|
|
||||||
globals.SugarLogger.Debug("11111111111111111111", authInfo.GetAuthID())
|
|
||||||
|
|
||||||
if err == nil && (authInfo.GetAuthType() == weixin.AuthTypeMini || authInfo.GetAuthType() == douyin.AuthTypeTiktokMini) && (authInfo.GetAuthTypeID() == subAppID || authInfo.GetAuthTypeID() == "tta6a1d01c399f264201") {
|
|
||||||
param.Acct = authInfo.GetAuthID()
|
param.Acct = authInfo.GetAuthID()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,17 +61,13 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int,
|
|||||||
Charset: "UTF-8",
|
Charset: "UTF-8",
|
||||||
}
|
}
|
||||||
err = api.TLpayAPI.CreateH5UnitorderOrder(param2)
|
err = api.TLpayAPI.CreateH5UnitorderOrder(param2)
|
||||||
|
globals.SugarLogger.Debug("h5=========", err)
|
||||||
} else {
|
} else {
|
||||||
result, err := api.TLpayAPI.CreateUnitorderOrder(param)
|
result, err := api.TLpayAPI.CreateUnitorderOrder(param)
|
||||||
globals.SugarLogger.Debug("222222222222222", err)
|
|
||||||
globals.SugarLogger.Debug("222222222222222", fmt.Sprintf("%+v", result))
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
var result2 tonglianpayapi.PayInfo
|
var result2 tonglianpayapi.PayInfo
|
||||||
json.Unmarshal([]byte(result.PayInfo), &result2)
|
json.Unmarshal([]byte(result.PayInfo), &result2)
|
||||||
globals.SugarLogger.Debug("222222222222222result2", fmt.Sprintf("%+v", result2))
|
|
||||||
prePayID := result2.Package[strings.LastIndex(result2.Package, "=")+1 : len(result2.Package)]
|
prePayID := result2.Package[strings.LastIndex(result2.Package, "=")+1 : len(result2.Package)]
|
||||||
globals.SugarLogger.Debug("222222222222222prePayID", prePayID)
|
|
||||||
|
|
||||||
orderPay = &model.OrderPay{
|
orderPay = &model.OrderPay{
|
||||||
PayOrderID: param.Reqsn,
|
PayOrderID: param.Reqsn,
|
||||||
PayType: payType,
|
PayType: payType,
|
||||||
|
|||||||
Reference in New Issue
Block a user