예제 #1
0
 /// <summary>
 /// 修改商品信息
 /// 从未商家的商品所有信息均可修改,否则商品的名称、商品分类、商品属性这三个字段不可修改
 /// </summary>
 /// <param name="product"></param>
 /// <param name="appId"></param>
 /// <param name="appSecret"></param>
 /// <returns></returns>
 public static ReturnCode UpdateProduct(Product product, string appId, string appSecret)
 {
     var url = "https://api.weixin.qq.com/merchant/update?access_token=";
     var access_token = WeiXin.GetAccessToken(appId, appSecret);
     url = url + access_token;
     var json = Util.HttpPost2(url, Util.ToJson(product));
     return Util.JsonTo<ReturnCode>(json);
 }
예제 #2
0
 /// <summary>
 /// 修改商品信息
 /// 从未商家的商品所有信息均可修改,否则商品的名称、商品分类、商品属性这三个字段不可修改
 /// </summary>
 /// <param name="product"></param>
 /// <returns></returns>
 public static ReturnCode UpdateProduct(Product product)
 {
     WeiXin.CheckGlobalCredential();
     return UpdateProduct(product, WeiXin.AppID, WeiXin.AppSecret);
 }
예제 #3
0
 /// <summary>
 /// 添加商品
 /// </summary>
 /// <param name="product"></param>
 /// <returns></returns>
 public static AddProductResult AddProduct(Product product)
 {
     WeiXin.CheckGlobalCredential();
     return AddProduct(product, WeiXin.AppID, WeiXin.AppSecret);
 }