- mtwmapi.CallbackMsg.Data to FormData
This commit is contained in:
@@ -13,13 +13,13 @@ import (
|
||||
|
||||
func TestOnFinancialMsg(t *testing.T) {
|
||||
msg := &mtwmapi.CallbackMsg{
|
||||
Cmd: "orderRefund",
|
||||
Data: url.Values{},
|
||||
Cmd: "orderRefund",
|
||||
FormData: url.Values{},
|
||||
}
|
||||
msg.Data.Set("timestamp", utils.Int64ToStr(time.Now().Unix()))
|
||||
msg.Data.Set("order_id", "33762863167364867")
|
||||
msg.Data.Set("notify_type", "agree")
|
||||
msg.Data.Set("money", "23.56")
|
||||
msg.FormData.Set("timestamp", utils.Int64ToStr(time.Now().Unix()))
|
||||
msg.FormData.Set("order_id", "33762863167364867")
|
||||
msg.FormData.Set("notify_type", "agree")
|
||||
msg.FormData.Set("money", "23.56")
|
||||
food := []map[string]interface{}{
|
||||
map[string]interface{}{
|
||||
"app_food_code": "123",
|
||||
@@ -40,7 +40,7 @@ func TestOnFinancialMsg(t *testing.T) {
|
||||
"box_price": 1,
|
||||
},
|
||||
}
|
||||
msg.Data.Set("food", string(utils.MustMarshal(food)))
|
||||
msg.FormData.Set("food", string(utils.MustMarshal(food)))
|
||||
res := curPurchaseHandler.onAfsOrderMsg(msg)
|
||||
fmt.Println(res)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user