+CallbackMsgVenderAuditApplyCancelOrder

This commit is contained in:
gazebo
2019-12-17 15:50:04 +08:00
parent 4085be8370
commit 8e928cda16
2 changed files with 16 additions and 111 deletions

View File

@@ -33,12 +33,12 @@ func TestGetCallbackMsg(t *testing.T) {
},
} {
callbackStr := strings.TrimSpace(strPair[1])
callbackMsg, mapData, resp := GetCallbackMsg2(utils.BuildRequest(http.MethodPost, "/djsw/"+strPair[0], callbackStr, ""))
callbackMsg, mapData, resp := GetCallbackMsg(utils.BuildRequest(http.MethodPost, "/djsw/"+strPair[0], callbackStr, ""))
if resp != nil {
t.Fatal(resp)
}
sugarLogger.Debug(callbackMsg.MsgURL)
resp = api.CheckCallbackValidation2(mapData, callbackMsg.Sign)
resp = api.CheckCallbackValidation(mapData, callbackMsg.Sign)
if resp != nil {
t.Fatal(resp)
}
@@ -46,26 +46,6 @@ func TestGetCallbackMsg(t *testing.T) {
}
}
func TestGetOrderCallbackMsg(t *testing.T) {
callbackStr := strings.TrimSpace(
`
timestamp=2019-12-03+06%3A28%3A40&sign=84AF173723A89E95AD7D0CFECA293683&v=1.0&jd_param_json=%7B%22billId%22%3A%22929053552000142%22%2C%22statusId%22%3A%2232000%22%2C%22timestamp%22%3A%222019-12-03+06%3A28%3A37%22%7D&token=77e703b7-7997-441b-a12a-2e522efb117a&app_key=1dba76d40cac446ca500c0391a0b6c9d&format=json
`)
values, token, msgURL, resp := GetCallbackMsg(utils.BuildRequest(http.MethodPost, "/djsw/"+CallbackMsgOrderAccounting, callbackStr, ""), false)
if resp != nil {
t.Fatal(resp)
}
sugarLogger.Debug(token)
sugarLogger.Debug(msgURL)
orderMsg, resp := api.GetOrderCallbackMsg(values, msgURL)
if resp != nil {
t.Fatal(resp)
}
sugarLogger.Debug(utils.Format4Output(orderMsg, false))
sugarLogger.Debug(orderMsg.MsgURL)
}
func TestSimulateSendNewOrderMsg(t *testing.T) {
orderInfo := &CallbackOrderMsg{
BillID: "813344594000041",