修改from表单读取数据,改为body读取数据
This commit is contained in:
@@ -136,8 +136,17 @@ func (a *API) GetChainstoreStatusNotify(request *http.Request) (shopStatusMsg *C
|
||||
|
||||
// 获取订单状态回调消息
|
||||
func (a *API) GetChainOrderStatusNotify(request *http.Request) (shopStatusMsg *OrderStatusNottify, callbackResponse *CallbackResponse) {
|
||||
storeNotify := ShortStatus{}
|
||||
err := utils.Map2StructByJson(utils.URLValues2Map(request.PostForm), &storeNotify, true)
|
||||
var data []byte
|
||||
_, err := request.Body.Read(data)
|
||||
if err != nil || len(data) <= 0 {
|
||||
baseapi.SugarLogger.Debugf("FN GetChainOrderStatusNotify failed with No result msg err:%v", err)
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
return nil, callbackResponse
|
||||
}
|
||||
|
||||
fmt.Println("string==================", string(data))
|
||||
storeNotify := &ShortStatus{}
|
||||
err = utils.Map2StructByJson(data, storeNotify, true)
|
||||
if err != nil {
|
||||
baseapi.SugarLogger.Debugf("FN GetShopStatusCallbackMsg failed with err:%v", err)
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
|
||||
Reference in New Issue
Block a user