tl 支付兼容
This commit is contained in:
@@ -34,7 +34,7 @@ func pay4OrderByTT(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayTyp
|
||||
} else {
|
||||
param.AppID = api.TiktokApi.GetAppID()
|
||||
}
|
||||
ttOrderId, orderToken, err := api.TiktokApi.CreateOrderByTicktock(param)
|
||||
ttOrderId, orderToken, err := getTikTok(subAppID).CreateOrderByTicktock(param)
|
||||
if err == nil {
|
||||
orderPay = &model.OrderPay{
|
||||
PayOrderID: ttOrderId, // 抖音订单id
|
||||
@@ -52,7 +52,13 @@ func pay4OrderByTT(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayTyp
|
||||
}
|
||||
return orderPay, err
|
||||
}
|
||||
|
||||
func getTikTok(appID string) (TikTokMini *tiktok.API) {
|
||||
TikTokMini = api.TiktokApi
|
||||
if len(appID) > 0 && appID == api.TiktokJXDJApiID {
|
||||
TikTokMini = api.TiktokJXDJApi
|
||||
}
|
||||
return TikTokMini
|
||||
}
|
||||
func OnTTPayCallback(msg *tiktok.DetailCallBackMessage, refund *tiktok.DetailCallBackMessage2Refund, payType string) (err error) {
|
||||
globals.SugarLogger.Debugf("OnTTPayCallback msg:%s", utils.Format4Output(msg, true))
|
||||
switch payType {
|
||||
|
||||
Reference in New Issue
Block a user