aa
This commit is contained in:
@@ -2,6 +2,7 @@ package localjx
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/alipay"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -31,17 +32,23 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int,
|
||||
NotifyUrl: globals.TLPayNotifyURL,
|
||||
Reqsn: order.VendorOrderID,
|
||||
PayType: vendorPayType,
|
||||
SubAppID: subAppID,
|
||||
//SubAppID: subAppID,
|
||||
}
|
||||
//暂时做兼容处理
|
||||
if vendorPayType == "JSAPI" {
|
||||
param.PayType = tonglianpayapi.PayTypeWxXcx
|
||||
}
|
||||
if vendorPayType == tonglianpayapi.PayTypeWxXcx {
|
||||
param.SubAppID = subAppID
|
||||
if authInfo, err := ctx.GetV2AuthInfo(); err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini && authInfo.GetAuthTypeID() == subAppID {
|
||||
param.Acct = authInfo.GetAuthID()
|
||||
}
|
||||
}
|
||||
if vendorPayType == tonglianpayapi.PayTypeZfbApp {
|
||||
if authInfo, err := ctx.GetV2AuthInfo(); err == nil && authInfo.GetAuthType() == alipay.AuthType {
|
||||
param.Acct = authInfo.GetAuthID()
|
||||
}
|
||||
}
|
||||
if vendorPayType == tonglianpayapi.PayTypeH5 {
|
||||
param2 := &tonglianpayapi.CreateH5UnitorderOrderParam{
|
||||
Trxamt: int(order.ActualPayPrice),
|
||||
@@ -81,6 +88,12 @@ func OnTLPayCallback(call *tonglianpayapi.CallBackResult) (err error) {
|
||||
err = onTLpayFinished(call)
|
||||
case tonglianpayapi.MsgTypeRefund:
|
||||
err = onTLpayRefund(call)
|
||||
case tonglianpayapi.MsgTypePayZFB:
|
||||
err = onTLpayFinished(call)
|
||||
case tonglianpayapi.MsgTypeRefundZFB:
|
||||
err = onTLpayRefund(call)
|
||||
default:
|
||||
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user