diff --git a/platformapi/tiktok_shop/tiktok_api/order.go b/platformapi/tiktok_shop/tiktok_api/order.go index b6097dd0..78dc1d9a 100644 --- a/platformapi/tiktok_shop/tiktok_api/order.go +++ b/platformapi/tiktok_shop/tiktok_api/order.go @@ -344,9 +344,12 @@ func (a *API) OrderDelivering(param *order_logisticsAdd_request.OrderLogisticsAd // CreateOrderCallback 订单创建,抖店创建订单后,回调消息通知本服务器 func (a *API) CreateOrderCallback(orderStatus []byte) (map[string][]interface{}, *CallbackResponse) { var resp []*OrderCallback + globals.SugarLogger.Debugf("=========orderStatus==errr", string(orderStatus)) if err := json.Unmarshal(orderStatus, &resp); err != nil { + globals.SugarLogger.Debugf("===========errr", err.Error()) return nil, &CallbackResponse{Code: CallbackFailCode, Msg: CallbackFail} } + globals.SugarLogger.Debugf("=========resp==errr", utils.Format4Output(resp, false)) callbackResult := make(map[string][]interface{}, 0) for _, data := range resp { @@ -472,6 +475,15 @@ func (a *API) CreateOrderCallback(orderStatus []byte) (map[string][]interface{}, return nil, CallbackResponseErr(false) } callbackResult[CallbackReturnRefundAgreedMsgTagId] = append(callbackResult[CallbackReturnRefundAgreedMsgTagId], create) + case CallbackRefundClosedMsgTagId: + create := UserCancelRefundOrderData{} + if err := json.Unmarshal([]byte(data.Data), &create); err != nil { + globals.SugarLogger.Debugf("errr ===============%s", err.Error()) + return nil, CallbackResponseErr(false) + } + globals.SugarLogger.Debugf("create ===========%s", utils.Format4Output(create, false)) + callbackResult[CallbackRefundClosedMsgTagId] = append(callbackResult[CallbackRefundClosedMsgTagId], create) + globals.SugarLogger.Debugf("CallbackRefundClosedMsgTagId ===========%s", utils.Format4Output(callbackResult, false)) default: return nil, CallbackResponseErr(false) }