diff --git a/business/partner/delivery/mtps/waybill.go b/business/partner/delivery/mtps/waybill.go index 7554a24de..09fc6e264 100644 --- a/business/partner/delivery/mtps/waybill.go +++ b/business/partner/delivery/mtps/waybill.go @@ -118,7 +118,6 @@ func (c *DeliveryHandler) pushToGy(waybill *model.Waybill, msg *mtpsapi.Callback params["mt_peisong_id"] = msg.MtPeisongID params["courier_name"] = msg.CourierName params["delivery_id"] = msg.DeliveryID - // params["sign"] = "ec61c8d88a1f864cc2cb1b875177fe1fb1402f05" params["appkey"] = msg.AppKey params["order_id"] = msg.OrderID params["courier_phone"] = msg.CourierPhone @@ -133,6 +132,17 @@ func (c *DeliveryHandler) pushToGy(waybill *model.Waybill, msg *mtpsapi.Callback if err != nil { return } + request.PostForm.Set("mt_peisong_id", msg.MtPeisongID) + request.PostForm.Set("courier_name", msg.CourierName) + request.PostForm.Set("delivery_id", utils.Int64ToStr(msg.DeliveryID)) + request.PostForm.Set("appkey", msg.AppKey) + request.PostForm.Set("order_id", msg.OrderID) + request.PostForm.Set("courier_phone", msg.CourierPhone) + request.PostForm.Set("status", utils.Int2Str(msg.Status)) + request.PostForm.Set("timestamp", utils.Int64ToStr(msg.Timestamp)) + request.PostForm.Set("cancel_reason_id", utils.Int2Str(msg.CancelReasonId)) + request.PostForm.Set("cancel_reason", msg.CancelReason) + request.PostForm.Set("sign", sign) fmt.Println("testgy request : %v", request.FormValue("sign")) request.Header.Set("content_type", "application/x-www-form-urlencoded; charset=UTF-8") cl.Do(request)