Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop

This commit is contained in:
richboo111
2022-07-15 15:28:33 +08:00
2 changed files with 15 additions and 24 deletions

View File

@@ -61,7 +61,6 @@ func OnTTPayCallback(msg *tiktok.DetailCallBackMessage, refund *tiktok.DetailCal
}
func onTTPayFinished(msg *tiktok.DetailCallBackMessage) (err error) {
globals.SugarLogger.Debugf("退款回调==================1")
orderPay := &model.OrderPay{
PayOrderID: msg.OrderId,
PayType: model.PayTypeTicTok,
@@ -79,9 +78,7 @@ func onTTPayFinished(msg *tiktok.DetailCallBackMessage) (err error) {
} else {
orderPay.Status = model.PayStatusFailed
}
num, err := dao.UpdateEntity(db, orderPay)
globals.SugarLogger.Debug("退款回调==================err", err)
globals.SugarLogger.Debug("退款回调==================err", num)
dao.UpdateEntity(db, orderPay)
if msg.Status == tiktok.ResponseCodeSuccess {
err = OnPayFinished(orderPay)
@@ -93,7 +90,6 @@ func onTTPayFinished(msg *tiktok.DetailCallBackMessage) (err error) {
}
func onTTPayRefund(msg *tiktok.DetailCallBackMessage2Refund) (err error) {
globals.SugarLogger.Debugf("退款回调==================2")
orderPayRefund := &model.OrderPayRefund{
RefundID: msg.CpRefundno,
}
@@ -135,8 +131,6 @@ func RefundOrderByTT(ctx *jxcontext.Context, orderPay *model.OrderPay, refundID
CpExtra: "msg",
NotifyURL: globals.TictokpayNotifyURL,
})
globals.SugarLogger.Debug("申请退款============", err)
globals.SugarLogger.Debug("申请退款============", result)
if err == nil {
orderPayRefund = &model.OrderPayRefund{
RefundID: refundID,