修改申请退款
This commit is contained in:
@@ -21,6 +21,7 @@ const (
|
|||||||
VendorIDPurchaseEnd = 11
|
VendorIDPurchaseEnd = 11
|
||||||
VendorIDJX = 9 // 这是一个假的京西VendorID
|
VendorIDJX = 9 // 这是一个假的京西VendorID
|
||||||
VendorGoMei = 12 // 国美
|
VendorGoMei = 12 // 国美
|
||||||
|
VendorIDTT = 13 // 抖音平台小程序
|
||||||
|
|
||||||
VendorIDWXPay = 51 // 微信支付
|
VendorIDWXPay = 51 // 微信支付
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ func onTTPayFinished(msg *tiktok.DetailCallBackMessage) (err error) {
|
|||||||
} else {
|
} else {
|
||||||
orderPay.Status = model.PayStatusFailed
|
orderPay.Status = model.PayStatusFailed
|
||||||
}
|
}
|
||||||
dao.UpdateEntity(db, orderPay)
|
dao.UpdateEntity(db, &orderPay)
|
||||||
if msg.Status == tiktok.ResponseCodeSuccess {
|
if msg.Status == tiktok.ResponseCodeSuccess {
|
||||||
err = OnPayFinished(orderPay)
|
err = OnPayFinished(orderPay)
|
||||||
}
|
}
|
||||||
@@ -89,7 +89,6 @@ func onTTPayFinished(msg *tiktok.DetailCallBackMessage) (err error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func onTTPayRefund(msg *tiktok.DetailCallBackMessage2Refund) (err error) {
|
func onTTPayRefund(msg *tiktok.DetailCallBackMessage2Refund) (err error) {
|
||||||
globals.SugarLogger.Debugf("退款回调==================2")
|
globals.SugarLogger.Debugf("退款回调==================2")
|
||||||
orderPayRefund := &model.OrderPayRefund{
|
orderPayRefund := &model.OrderPayRefund{
|
||||||
@@ -133,6 +132,8 @@ func RefundOrderByTT(ctx *jxcontext.Context, orderPay *model.OrderPay, refundID
|
|||||||
CpExtra: "msg",
|
CpExtra: "msg",
|
||||||
NotifyURL: globals.TictokpayNotifyURL,
|
NotifyURL: globals.TictokpayNotifyURL,
|
||||||
})
|
})
|
||||||
|
globals.SugarLogger.Debug("申请退款============",err)
|
||||||
|
globals.SugarLogger.Debug("申请退款============",result)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
orderPayRefund = &model.OrderPayRefund{
|
orderPayRefund = &model.OrderPayRefund{
|
||||||
RefundID: refundID,
|
RefundID: refundID,
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ func (a *APIManager) GetAPI(vendorID int, appOrgCode string) (pfAPI interface{})
|
|||||||
pfAPI = api.JdShopAPI
|
pfAPI = api.JdShopAPI
|
||||||
case model.VendorGoMei:
|
case model.VendorGoMei:
|
||||||
pfAPI = api.GuoMeiApi
|
pfAPI = api.GuoMeiApi
|
||||||
|
case model.VendorIDTT:
|
||||||
|
pfAPI = api.TiktokApi
|
||||||
}
|
}
|
||||||
return pfAPI
|
return pfAPI
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user