1
This commit is contained in:
@@ -19,7 +19,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
)
|
||||
|
||||
func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int, vendorPayType, subAppID string) (orderPay *model.OrderPay, err error) {
|
||||
func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int, vendorPayType, subAppID, code string) (orderPay *model.OrderPay, err error) {
|
||||
// if order.FromStoreID != 0 {
|
||||
// result, _ := orderman.GetMatterStoreOrderCount(nil, order.FromStoreID)
|
||||
// if !result.Flag {
|
||||
@@ -45,6 +45,14 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int,
|
||||
if err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini && authInfo.GetAuthTypeID() == subAppID {
|
||||
param.Acct = authInfo.GetAuthID()
|
||||
}
|
||||
if code != "" {
|
||||
appAuth := strings.Split(code, "_")
|
||||
sessionInfo, err := weixin.GetAPI(appAuth[0]).SNSCode2Session(appAuth[1])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
param.Acct = sessionInfo.OpenID
|
||||
}
|
||||
}
|
||||
if vendorPayType == tonglianpayapi.PayTypeZfbJS || vendorPayType == tonglianpayapi.PayTypeZfbApp {
|
||||
if authInfo, err := ctx.GetV2AuthInfo(); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user