예제 #1
0
파일: WeiXinShop.cs 프로젝트: Cold1986/MZZ
 /// <summary>
 /// 添加邮费模板
 /// </summary>
 /// <param name="delivery_template"></param>
 /// <param name="appId"></param>
 /// <param name="appSecret"></param>
 /// <returns></returns>
 public static AddDeliveryTemplateResult AddDeliveryTemplate(DeliveryTemplate delivery_template, string appId, string appSecret)
 {
     var url = "https://api.weixin.qq.com/merchant/express/add?access_token=";
     var access_token = WeiXin.GetAccessToken(appId, appSecret);
     url = url + access_token;
     var json = Util.HttpPost2(url, Util.ToJson(new { delivery_template = delivery_template }));
     return Util.JsonTo<AddDeliveryTemplateResult>(json);
 }
예제 #2
0
파일: WeiXinShop.cs 프로젝트: Cold1986/MZZ
 /// <summary>
 /// 删除邮费模板
 /// </summary>
 /// <param name="delivery_template"></param>
 /// <returns></returns>
 public static ReturnCode UpdateDeliveryTemplate(DeliveryTemplate delivery_template)
 {
     WeiXin.CheckGlobalCredential();
     return UpdateDeliveryTemplate(delivery_template, WeiXin.AppID, WeiXin.AppSecret);
 }
예제 #3
0
파일: WeiXinShop.cs 프로젝트: Cold1986/MZZ
 /// <summary>
 /// 删除邮费模板
 /// </summary>
 /// <param name="delivery_template"></param>
 /// <param name="appId"></param>
 /// <param name="appSecret"></param>
 /// <returns></returns>
 public static ReturnCode UpdateDeliveryTemplate(DeliveryTemplate delivery_template, string appId, string appSecret)
 {
     var template_id = delivery_template.Id;
     var url = "https://api.weixin.qq.com/merchant/express/update?access_token=";
     var access_token = WeiXin.GetAccessToken(appId, appSecret);
     url = url + access_token;
     var json = Util.HttpPost2(url, Util.ToJson(new { template_id = template_id, delivery_template = delivery_template }));
     return Util.JsonTo<ReturnCode>(json);
 }
예제 #4
0
파일: WeiXinShop.cs 프로젝트: Cold1986/MZZ
 /// <summary>
 /// 添加邮费模板
 /// </summary>
 /// <param name="delivery_template"></param>
 /// <returns></returns>
 public static AddDeliveryTemplateResult AddDeliveryTemplate(DeliveryTemplate delivery_template)
 {
     WeiXin.CheckGlobalCredential();
     return AddDeliveryTemplate(delivery_template, WeiXin.AppID, WeiXin.AppSecret);
 }