美团,饿百回调添加系统级参数
This commit is contained in:
@@ -34,10 +34,16 @@ type CallbackResponse struct {
|
||||
}
|
||||
|
||||
type CallbackMsg struct {
|
||||
Cmd string `json:"cmd"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Body map[string]interface{} `json:"body"`
|
||||
Data interface{} `json:"data"`
|
||||
Cmd string `json:"cmd"`
|
||||
Version string `json:"version"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Ticket string `json:"ticket"`
|
||||
Source string `json:"source"`
|
||||
Sign string `json:"sign"`
|
||||
Encrypt string `json:"encrypt"`
|
||||
|
||||
Body map[string]interface{} `json:"body"`
|
||||
Data interface{} `json:"data"`
|
||||
}
|
||||
|
||||
type CBPartRefundInfo struct {
|
||||
@@ -139,7 +145,13 @@ func (a *API) GetCallbackMsg(request *http.Request) (msg *CallbackMsg, callbackR
|
||||
if callbackResponse = a.unmarshalData(msg.Cmd, []byte(params.Get("body")), &msg.Body); callbackResponse != nil {
|
||||
return nil, callbackResponse
|
||||
}
|
||||
msg.Timestamp = utils.Str2Int64(utils.Interface2String(params.Get("timestamp")))
|
||||
msg.Timestamp = utils.Str2Int64(params.Get("timestamp"))
|
||||
msg.Version = params.Get("version")
|
||||
msg.Ticket = params.Get("ticket")
|
||||
msg.Source = params.Get("source")
|
||||
msg.Sign = params.Get("sign")
|
||||
msg.Encrypt = params.Get("encrypt")
|
||||
|
||||
var tmpObj interface{}
|
||||
switch msg.Cmd {
|
||||
case CmdOrderPartRefund:
|
||||
|
||||
Reference in New Issue
Block a user