package ebai import ( "encoding/json" "fmt" "testing" "time" "git.rosy.net.cn/baseapi/platformapi/ebaiapi" "git.rosy.net.cn/baseapi/utils" ) func TestOnFinancialMsg(t *testing.T) { msg := &ebaiapi.CallbackMsg{ // Cmd: "order.partrefund.push", Cmd: "order.user.cancel", Body: make(map[string]interface{}), } msg.Body["refund_id"] = "15531567190216" msg.Body["timestamp"] = utils.Int64ToStr(time.Now().Unix()) // msg.Body["status"] = json.Number("20") msg.Body["type"] = json.Number("40") msg.Body["cancel_type"] = json.Number("2") res := OnFinancialMsg(msg) fmt.Println(res) }