申请开通功能数据
Ejemplo n.º 1
0
        /// <summary>
        /// 申请开通功能
        /// </summary>
        /// <param name="accessTokenOrAppId"></param>
        /// <param name="data"></param>
        /// <param name="timeOut"></param>
        /// <returns></returns>
        public static WxJsonResult Register(string accessTokenOrAppId, RegisterData data, int timeOut = Config.TIME_OUT)
        {
            return ApiHandlerWapper.TryCommonApi(accessToken =>
            {
                string url = string.Format("https://api.weixin.qq.com/shakearound/account/register?access_token={0}", accessToken);

                return CommonJsonSend.Send<WxJsonResult>(null, url, data, CommonJsonSendType.POST, timeOut);

            }, accessTokenOrAppId);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 申请开通功能
        /// </summary>
        /// <param name="accessTokenOrAppId"></param>
        /// <param name="data"></param>
        /// <param name="industry_Id"></param>
        /// <param name="timeOut"></param>
        /// <returns></returns>
        public static RegisterResultJson Register(string accessTokenOrAppId, RegisterData data, IndustryId industry_Id, int timeOut = Config.TIME_OUT)
        {
            return ApiHandlerWapper.TryCommonApi(accessToken =>
            {
                string url = string.Format("https://api.weixin.qq.com/shakearound/account/register?access_token={0}", accessToken.AsUrlData());

                data.industry_id = RegisterData.ConvertIndustryId(industry_Id);
                return CommonJsonSend.Send<RegisterResultJson>(null, url, data, CommonJsonSendType.POST, timeOut);

            }, accessTokenOrAppId);
        }
Ejemplo n.º 3
0
 public void Register()
 {
     var accessToken = AccessTokenContainer.GetAccessToken(_appId);
     var testData = new RegisterData()
        {
            name = "苏震巍",
            phone_number = "13913718816",
            email = "*****@*****.**",
            //industry_id = RegisterData.ConvertIndustryId(IndustryId.其它_其它),
            qualification_cert_urls =
                new List<string>() {
           "http://shp.qpic.cn/wx_shake_bus/0/1428565236d03d864b7f43db9ce34df5f720509d0e/0",
          "http://shp.qpic.cn/wx_shake_bus/0/1428565236d03d864b7f43db9ce34df5f720509d0e/0"
     },
            apply_reason = "test"
        };
     var result = ShakeAroundApi.Register(accessToken, testData, IndustryId.代运营商_代运营商);
     Assert.AreEqual(result.errcode, ReturnCode.请求成功);
 }