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