- C#创建直播间 parameter startTime or endTime is invalid?
// 参数 DateTime dtNow = DateTime.Now; int startTime = WXHelper.ConvertToTimeStamp(dtNow.AddHours(1)); int endTime = WXHelper.ConvertToTimeStamp(dtNow.AddHours(2)); var o = new { name = "测试直播房间1", coverImg = "mIZ6J141w3OWw5sOBwG3NRM06YzG_hD7O4vsKVi85Y3vSvcKEy7C_i6Rd_Q8y4YD", startTime = WXHelper.ConvertToTimeStamp(dtNow.AddMinutes(15)), endTime = WXHelper.ConvertToTimeStamp(dtNow.AddHours(1)), anchorName = "测试直播Name", anchorWechat = "JnnJinn", subAnchorWechat = "", shareImg = "", feedsImg = "", isFeedsPublic = "1", type = "1", screenType = "1", closeLike = "1", closeGoods = "1", closeComment = "1", closeReplay = "1", closeShare = "1", closeKf = "1", }; var token = Wechat.GetAccessToken(WechatAppType.MP, false); var url = string.Format("https://api.weixin.qq.com/wxaapi/broadcast/room/create?access_token={0}", token); public static string PostTest(string url, object data) { Encoding encoding = Encoding.UTF8; var reqJson = JsonConvert.SerializeObject(data, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, DateFormatString = "yyyy-MM-dd HH:mm:ss" }); byte[] buffer = encoding.GetBytes(reqJson); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Method = "Post"; request.ContentType = "application/json; charset=UTF-8"; request.ContentLength = buffer.Length; request.Timeout = 60000; HttpWebResponse response = null; request.GetRequestStream().Write(buffer, 0, buffer.Length); response = (HttpWebResponse) request.GetResponse(); using (StreamReader reader=new StreamReader(response.GetResponseStream(), encoding)) { var reaponseString = reader.ReadToEnd(); response.Close(); return reaponseString; } } { "Result": true, "Info": "{\"errmsg\":\"parameter startTime or endTime is invalid rid: 5f7e9943-69731824-18832adc\",\"errcode\":200002}", "CreateDt": "2020-10-08 12:44:53", "Data": { "name": "测试直播房间1", "coverImg": "mIZ6J141w3OWw5sOBwG3NRM06YzG_hD7O4vsKVi85Y3vSvcKEy7C_i6Rd_Q8y4YD", "startTime": 1602104393, "endTime": 1602107093, "anchorName": "测试直播Name", "anchorWechat": "JnnJinn", "subAnchorWechat": "", "shareImg": "", "feedsImg": "", "isFeedsPublic": "1", "type": "1", "screenType": "1", "closeLike": "1", "closeGoods": "1", "closeComment": "1", "closeReplay": "1", "closeShare": "1", "closeKf": "1" } }
2020-10-08 - 在小程序内完成支付,还是无法开通直播功能?
想要开通小程序直播功能,提示小程序近90天没有存在支付行为,不能申请开通直播能力。 上星期五已关联商户号,在测试环境完成过一次小程序内jsapi调起的支付,在商户号后台也查得到这笔订单,现在还是无法开通,小程序管理后台的统计中也查不到这笔交易,是有什么需要的附带条件吗?比如必须在正式版中支付之类的》
2020-09-27