这是微信的官方文档:https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283,能看懂的朋友就请不要往下看了,我是看不懂的。我通过网上找到的资料来进行开发的;

第一步:先看官方文档的接口是怎么说的

这是重点,微信的都是以这种方式来请求的

HTTP请求方式: POSTURL:https://api.weixin.qq.com/card/create?access_token=ACCESS_TOKEN

其次就是拼接他的POST数据很长一篇

POST数据示例:{"card": {"card_type": "MEMBER_CARD","member_card": {"background_pic_url": "https://mmbiz.qlogo.cn/mmbiz/","base_info": {"logo_url": "http://mmbiz.qpic.cn/mmbiz/iaL1LJM1mF9aRKPZ/0","brand_name": "海底捞","code_type": "CODE_TYPE_TEXT","title": "海底捞会员卡","color": "Color010","notice": "使用时向服务员出示此券","service_phone": "020-88888888","description": "不可与其他优惠同享","date_info": {"type": "DATE_TYPE_PERMANENT"},"sku": {"quantity": 50000000},"get_limit": 3,"use_custom_code": false,"can_give_friend": true,"location_id_list": [123,12321],"custom_url_name": "立即使用","custom_url": "http://weixin.qq.com","custom_url_sub_title": "6个汉字tips","promotion_url_name": "营销入口1","promotion_url": "http://www.qq.com","need_push_on_view": true},"advanced_info": {"use_condition": {"accept_category": "鞋类","reject_category": "阿迪达斯","can_use_with_other_discount": true},"abstract": {"abstract": "微信餐厅推出多种新季菜品,期待您的光临","icon_url_list": ["http://mmbiz.qpic.cn/mmbiz/p98FjXy8LacgHxp3sJ3vn97bGLz0ib0Sfz1bjiaoOYA027iasqSG0sjpiby4vce3AtaPu6cIhBHkt6IjlkY9YnDsfw/0"
                   ]},"text_image_list": [{"image_url": "http://mmbiz.qpic.cn/mmbiz/p98FjXy8LacgHxp3sJ3vn97bGLz0ib0Sfz1bjiaoOYA027iasqSG0sjpiby4vce3AtaPu6cIhBHkt6IjlkY9YnDsfw/0","text": "此菜品精选食材,以独特的烹饪方法,最大程度地刺激食 客的味蕾"},{"image_url": "http://mmbiz.qpic.cn/mmbiz/p98FjXy8LacgHxp3sJ3vn97bGLz0ib0Sfz1bjiaoOYA027iasqSG0sj piby4vce3AtaPu6cIhBHkt6IjlkY9YnDsfw/0","text": "此菜品迎合大众口味,老少皆宜,营养均衡"}],"time_limit": [{"type": "MONDAY","begin_hour":0,"end_hour":10,"begin_minute":10,"end_minute":59},{"type": "HOLIDAY"}],"business_service": ["BIZ_SERVICE_FREE_WIFI","BIZ_SERVICE_WITH_PET","BIZ_SERVICE_FREE_PARK","BIZ_SERVICE_DELIVER"]},"supply_bonus": true,"supply_balance": false,"prerogative": "test_prerogative","auto_activate": true,"custom_field1": {"name_type": "FIELD_NAME_TYPE_LEVEL","url": "http://www.qq.com"},"activate_url": "http://www.qq.com","custom_cell1": {"name": "使用入口2","tips": "激活后显示","url": "http://www.qq.com"},"bonus_rule": {"cost_money_unit": 100,"increase_bonus": 1,"max_increase_bonus": 200,"init_increase_bonus": 10,"cost_bonus_unit": 5,"reduce_money": 100,"least_money_to_use_bonus": 1000,"max_reduce_bonus": 50},"discount": 10}}
}

看着头大了都,有没得Demo。所以网上找的资料直接使用。

我是使用的一般处理程序文件来创建的

具体代码会贴出来

先看如何上传临时素材

public void Wx_UploadImg(){string result = "0";//
try{string getAuthorize = GetAuthorize();string access_token = "";string urlPath = "";string imgName = "";if (getAuthorize != ""){getAuthorize = "[" + getAuthorize + "]";Newtonsoft.Json.Linq.JArray javascript = (Newtonsoft.Json.Linq.JArray)JsonConvert.DeserializeObject(getAuthorize);Newtonsoft.Json.Linq.JObject obj = (Newtonsoft.Json.Linq.JObject)javascript[0];if (obj["access_token"] != null && obj["access_token"].ToString() != ""){access_token = obj["access_token"].ToString();//获取微信token
                    }if (!string.IsNullOrEmpty(access_token)){string url = string.Format("https://api.weixin.qq.com/cgi-bin/material/add_material?access_token={0}&type={1}", access_token, "image");#region base64转成图片string logoImg = !string.IsNullOrEmpty(Request["imgInfo"]) ? Request["imgInfo"].ToString() : "";//图片base64码string imgType = !string.IsNullOrEmpty(Request["imgType"]) ? Request["imgType"].ToString() : "";//LogoUrl表示会员卡logo CardCoverUrl表示会员卡图片if (!string.IsNullOrEmpty(logoImg)){string[] ddLen = logoImg.Split(',');var bytes = Convert.FromBase64String(ddLen[1].ToString());if (imgType == "LogoUrl"){imgName = "/images/MerchantLogo.jpg";urlPath = HttpRuntime.AppDomainAppPath.ToString() + imgName;//会员卡的logo(图片存储到服务器的物理地址路径)
                            }if (imgType == "CardCoverUrl"){imgName = "/images/MemCover.jpg";urlPath = HttpRuntime.AppDomainAppPath.ToString() + imgName;//会员卡的卡面图片(图片存储到服务器的物理地址路径)
                            }using (var imageFile = new FileStream(urlPath, FileMode.Create)){imageFile.Write(bytes, 0, bytes.Length);imageFile.Flush();}#endregionstring resultUpload = HttpUploadFile(url, urlPath, bytes);//上传临时图片素材resultUpload = "[" + resultUpload + "]";Newtonsoft.Json.Linq.JArray javascript1 = (Newtonsoft.Json.Linq.JArray)JsonConvert.DeserializeObject(resultUpload);Newtonsoft.Json.Linq.JObject obj1 = (Newtonsoft.Json.Linq.JObject)javascript1[0];if (obj1["url"] != null && obj1["url"].ToString() != ""){string imgUrl = obj1["url"].ToString();string[] tmp = imgUrl.Split('?');result = imgName;}}}}}catch (Exception ex){LogError(ex);result = "0";}Context.Response.Write(result);}
#region 上传微信临时素材public static string HttpUploadFile(string url, string path, byte[] bf){return HttpUploadPhoto(url, path, bf);}public static string HttpUploadPhoto(string url, string path, byte[] bf){HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;CookieContainer cookieContainer = new CookieContainer();request.CookieContainer = cookieContainer;request.AllowAutoRedirect = true;request.Method = "POST";string boundary = DateTime.Now.Ticks.ToString("X"); // 随机分隔线request.ContentType = "multipart/form-data;charset=utf-8;boundary=" + boundary;byte[] itemBoundaryBytes = Encoding.UTF8.GetBytes("\r\n--" + boundary + "\r\n");byte[] endBoundaryBytes = Encoding.UTF8.GetBytes("\r\n--" + boundary + "--\r\n");int pos = path.LastIndexOf("\\");string fileName = path.Substring(pos + 1);//请求头部信息 StringBuilder sbHeader = new StringBuilder(string.Format("Content-Disposition:form-data;name=\"media\";filename=\"{0}\"\r\nContent-Type:application/octet-stream\r\n\r\n", fileName));byte[] postHeaderBytes = Encoding.UTF8.GetBytes(sbHeader.ToString());Stream postStream = request.GetRequestStream();postStream.Write(itemBoundaryBytes, 0, itemBoundaryBytes.Length);postStream.Write(postHeaderBytes, 0, postHeaderBytes.Length);postStream.Write(bf, 0, bf.Length);postStream.Write(endBoundaryBytes, 0, endBoundaryBytes.Length);postStream.Close();//发送请求并获取相应回应数据HttpWebResponse response = request.GetResponse() as HttpWebResponse;Stream instream = response.GetResponseStream();StreamReader sr = new StreamReader(instream, Encoding.UTF8);string content = sr.ReadToEnd();return content;}#endregion

 

 //网页授权access_tokenpublic string GetAuthorize(){string strWeiXinAppID = "xxxxxx";string strWeiXinAppSecret = "xxxxxxxx";if (strWeiXinAppID != null && strWeiXinAppSecret != null){string templateUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1}";templateUrl = string.Format(templateUrl, strWeiXinAppID, strWeiXinAppSecret);HttpRequestHelper hrh = new HttpRequestHelper();return hrh.Reqeust(templateUrl);}else{return "";}}

post请求使用封装文件

HttpRequestHelper.cs

using System;
using System.Collections.Generic;
using System.Net;
using System.Text;
using System.Web;
using System.Security.Cryptography.X509Certificates;namespace Chain.Wechat
{public class HttpRequestHelper{public string Reqeust(string url){System.Net.HttpWebRequest request;// 创建一个HTTP请求request = (System.Net.HttpWebRequest)WebRequest.Create(url);request.Method="GET";System.Net.HttpWebResponse response;response = (System.Net.HttpWebResponse)request.GetResponse();System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream(), Encoding.UTF8);string responseText = reader.ReadToEnd();reader.Close();return responseText;}public string Reqeust(string url, string postText, bool isUseCert, string SSLCERT_PATH, string SSLCERT_PASSWORD){System.Net.HttpWebRequest request;request = (System.Net.HttpWebRequest)WebRequest.Create(url);//是否使用证书if (isUseCert){string path = HttpContext.Current.Request.PhysicalApplicationPath + SSLCERT_PATH;X509Certificate2 cert = new X509Certificate2(path, SSLCERT_PASSWORD,X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.MachineKeySet);            request.ClientCertificates.Add(cert);}//Post请求方式request.Method = "POST";// 内容类型request.ContentType = "application/x-www-form-urlencoded";//// 参数经过URL编码//string paraUrlCoded = System.Web.HttpUtility.UrlEncode(postText);byte[] payload;//将URL编码后的字符串转化为字节payload = System.Text.Encoding.UTF8.GetBytes(postText);//设置请求的 ContentLength request.ContentLength = payload.Length;//获得请 求流System.IO.Stream writer = request.GetRequestStream();//将请求参数写入流writer.Write(payload, 0, payload.Length);// 关闭请求流
            writer.Close();System.Net.HttpWebResponse response;// 获得响应流response = (System.Net.HttpWebResponse)request.GetResponse();System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream(), Encoding.UTF8);string responseText = reader.ReadToEnd();reader.Close();return responseText;}public string Reqeust(string url, string postText){System.Net.HttpWebRequest request;request = (System.Net.HttpWebRequest)WebRequest.Create(url);//Post请求方式request.Method = "POST";// 内容类型request.ContentType = "application/x-www-form-urlencoded";//// 参数经过URL编码//string paraUrlCoded = System.Web.HttpUtility.UrlEncode(postText);byte[] payload;//将URL编码后的字符串转化为字节payload = System.Text.Encoding.UTF8.GetBytes(postText);//设置请求的 ContentLength request.ContentLength = payload.Length;//获得请 求流System.IO.Stream writer = request.GetRequestStream();//将请求参数写入流writer.Write(payload, 0, payload.Length);// 关闭请求流
            writer.Close();System.Net.HttpWebResponse response;// 获得响应流response = (System.Net.HttpWebResponse)request.GetResponse();System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream(), Encoding.UTF8);string responseText = reader.ReadToEnd();reader.Close();return responseText;}public string ReqeustPost(string url){System.Net.HttpWebRequest request;// 创建一个HTTP请求request = (System.Net.HttpWebRequest)WebRequest.Create(url);request.Method = "POST";System.Net.HttpWebResponse response;response = (System.Net.HttpWebResponse)request.GetResponse();System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream(), Encoding.UTF8);string responseText = reader.ReadToEnd();reader.Close();return responseText;}}
}

创建会员卡

#region 创建会员卡public void CreateWxMemCard(){string flag = "0";try{string brand_name = !string.IsNullOrEmpty(Request["Wxbrand_name"]) ? Request["Wxbrand_name"].ToString() : "";string title = !string.IsNullOrEmpty(Request["Wxtitle"]) ? Request["Wxtitle"].ToString() : "";string prerogative = !string.IsNullOrEmpty(Request["Wxprerogative"]) ? Request["Wxprerogative"].ToString() : "";string description = !string.IsNullOrEmpty(Request["Wxdescription"]) ? Request["Wxdescription"].ToString() : "";string cardLogo = !string.IsNullOrEmpty(Request["WxMemCardLog"]) ? Request["WxMemCardLog"].ToString() : "";string cardCover = !string.IsNullOrEmpty(Request["WxMemCardCover"]) ? Request["WxMemCardCover"].ToString() : "";string getAuthorize = GetAuthorize();string access_token = "";if (getAuthorize != ""){getAuthorize = "[" + getAuthorize + "]";Newtonsoft.Json.Linq.JArray javascript = (Newtonsoft.Json.Linq.JArray)JsonConvert.DeserializeObject(getAuthorize);Newtonsoft.Json.Linq.JObject obj = (Newtonsoft.Json.Linq.JObject)javascript[0];if (obj["access_token"] != null && obj["access_token"].ToString() != ""){access_token = obj["access_token"].ToString();
                        }}string url_Menu_Create = "https://api.weixin.qq.com/card/create?access_token=" + access_token;string postData = CreateMenuDate(brand_name, title, prerogative, description);string result = PostWebRequest(url_Menu_Create, postData);if (!string.IsNullOrEmpty(result)){result = "[" + result + "]";string cardId = "";Newtonsoft.Json.Linq.JArray cardResult = (Newtonsoft.Json.Linq.JArray)JsonConvert.DeserializeObject(result);Newtonsoft.Json.Linq.JObject cardObj = (Newtonsoft.Json.Linq.JObject)cardResult[0];if (cardObj["errmsg"] != null){if (!string.IsNullOrEmpty(cardObj["errmsg"].ToString())){if (cardObj["errmsg"].ToString() == "ok"){cardId = cardObj["card_id"].ToString();//微信卡券ID#region 获取二维码数据string strQRcode = WxCreateQRcode(access_token, cardId);string wxQRcode = "";if (strQRcode != "-1" && strQRcode != "0"){wxQRcode = strQRcode;}#endregion#region 保存到数据库Chain.Model.WxMemCard modelWxMC = new Chain.Model.WxMemCard();Chain.BLL.WxMemCard bllWxMC = new Chain.BLL.WxMemCard();modelWxMC.WxMemCardLogo = cardLogo;modelWxMC.WxMemCardName = brand_name;modelWxMC.WxMemCardTitle = title;modelWxMC.WxMemCardCover = cardCover;modelWxMC.WxMemCardPrivilege = prerogative;modelWxMC.WxMemCardUserNotice = description;modelWxMC.WxMemCardCreateTime = DateTime.Now;modelWxMC.WxMemCardUpDateTime = DateTime.Now;modelWxMC.WxMemCardQRURL = wxQRcode;modelWxMC.CardID = cardId;modelWxMC.AccessToken = access_token;flag = bllWxMC.Add(modelWxMC) > 0 ? "1" : "-1";#endregion                      #region 添加激活时的自定义字段                      //下章在讲                      #endregion
}else{flag = "-1";}}}}}catch (Exception ex){flag = "-1";LogError(ex);}Context.Response.Write(flag);}/// <summary>/// 构造Json参数和值/// </summary>/// <returns></returns>public string CreateMenuDate(string brand_name, string title, string prerogative, string description){string postData = "{";postData += "\"card\": {";postData += "\"card_type\": \"MEMBER_CARD\",";postData += "\"member_card\": {";postData += "\"background_pic_url\": \"http://mmbiz.qpic.cn/mmbiz_png/ySO19CiarcdMbs3ckFC0icAPnic8XMjWH1eB8vNuu8n7uhW1F5mkw5ZIiaEUtRlQ5RVty6MkJV6MQbYmXJTnpOCrCA/0\",";postData += "\"base_info\": {";postData += "\"logo_url\": \"http://mmbiz.qpic.cn/mmbiz_png/ySO19CiarcdPa3tkCvgclHiciacQEqDyb0LibyNnc9st3cDsLLxEZ7YDqMRfbB6DJwbxuFZOWAuELqcC7AHJ3pBdoA/0\",";postData += "\"brand_name\": \"" + brand_name + "\",";postData += "\"code_type\": \"CODE_TYPE_BARCODE\",";postData += "\"title\": \"" + title + "\",";postData += "\"color\": \"Color010\",";postData += "\"notice\": \"使用时向服务员出示此会员卡\",";postData += "\"service_phone\": \"0335-5300544\",";postData += "\"description\": \"" + description + "\",";postData += "\"date_info\": {";postData += "\"type\": \"DATE_TYPE_PERMANENT\"";postData += "},";postData += "\"sku\": {";postData += "\"quantity\": 100000000";postData += "},";postData += "\"get_limit\": 1,";postData += "\"use_custom_code\": false,";postData += "\"can_give_friend\": true,";postData += "\"custom_url_name\": \"会员卡中心\",";postData += "\"custom_url\": \"http://www.zhiluo.cc/mobile/member/login.aspx/\"";postData += "},";postData += "\"supply_bonus\": false,";postData += "\"supply_balance\": false,";postData += "\"prerogative\": \"" + prerogative + "\",";postData += "\"wx_activate\": true,";postData += "\"wx_activate_after_submit\": true,";postData += "\"wx_activate_after_submit_url\": \"http://www.baidu.com\"";postData += "}";postData += "}";postData += "}";return postData;}/// <summary>/// 发送Post请求到微信端/// </summary>/// <param name="postUrl">请求的路径</param>/// <param name="paramData">发送的数据</param>/// <returns></returns>public string PostWebRequest(string postUrl, string paramData){string ret = string.Empty;try{byte[] byteArray = Encoding.UTF8.GetBytes(paramData); //转化HttpWebRequest webReq = (HttpWebRequest)WebRequest.Create(new Uri(postUrl));webReq.Method = "POST";webReq.ContentType = "application/json";webReq.ContentLength = byteArray.Length;Stream newStream = webReq.GetRequestStream();newStream.Write(byteArray, 0, byteArray.Length);//写入参数
                newStream.Close();HttpWebResponse response = (HttpWebResponse)webReq.GetResponse();StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.UTF8);ret = sr.ReadToEnd();sr.Close();response.Close();newStream.Close();}catch (Exception ex){LogError(ex);}return ret;}#endregion

删除微信会员卡券

#region 删除微信会员卡券public void DelWxMemCard(){int flag = 0;string getAuthorize = GetAuthorize();string access_token = "";try{if (getAuthorize != ""){getAuthorize = "[" + getAuthorize + "]";Newtonsoft.Json.Linq.JArray javascript = (Newtonsoft.Json.Linq.JArray)JsonConvert.DeserializeObject(getAuthorize);Newtonsoft.Json.Linq.JObject obj = (Newtonsoft.Json.Linq.JObject)javascript[0];if (obj["access_token"] != null && obj["access_token"].ToString() != ""){access_token = obj["access_token"].ToString();         }}string postUrl = "https://api.weixin.qq.com/card/delete?access_token=" + access_token;string cardId = "prXT7wZYBhzfTc8xv7O5wKbRe44w";string postData = "{\"card_id\":\"" + cardId + "\"}";string result = PostWebRequest(postUrl, postData);if (!string.IsNullOrEmpty(result)){result = "[" + result + "]";Newtonsoft.Json.Linq.JArray cardResult = (Newtonsoft.Json.Linq.JArray)JsonConvert.DeserializeObject(result);Newtonsoft.Json.Linq.JObject cardObj = (Newtonsoft.Json.Linq.JObject)cardResult[0];if (cardObj["errmsg"] != null && cardObj["errmsg"].ToString() != ""){if (cardObj["errmsg"].ToString() == "ok"){flag = 1;}else{flag = -1;}}}}catch (Exception ex){LogError(ex);flag = -1;}Context.Response.Write(flag);}#endregion

查询卡券列表

#region 查询卡券列表 参考:https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025272&anchor=4public void GetWxMemCardList(){int flag = 0;string getAuthorize = GetAuthorize();string access_token = "";try{if (getAuthorize != ""){getAuthorize = "[" + getAuthorize + "]";Newtonsoft.Json.Linq.JArray javascript = (Newtonsoft.Json.Linq.JArray)JsonConvert.DeserializeObject(getAuthorize);Newtonsoft.Json.Linq.JObject obj = (Newtonsoft.Json.Linq.JObject)javascript[0];if (obj["access_token"] != null && obj["access_token"].ToString() != ""){access_token = obj["access_token"].ToString();
                    }}string postUrl = "https://api.weixin.qq.com/card/batchget?access_token=" + access_token;string postData = "{\"offset\":\"0\",\"count\":\"10\",\"status_list\":[\"CARD_STATUS_VERIFY_OK\",\"CARD_STATUS_DISPATCH\"]}";string result = PostWebRequest(postUrl, postData);if (!string.IsNullOrEmpty(result)){result = "[" + result + "]";Newtonsoft.Json.Linq.JArray cardResult = (Newtonsoft.Json.Linq.JArray)JsonConvert.DeserializeObject(result);Newtonsoft.Json.Linq.JObject cardObj = (Newtonsoft.Json.Linq.JObject)cardResult[0];//card_id_list    卡券ID列表。
                }}catch (Exception ex){LogError(ex);flag = -1;}Context.Response.Write(flag);}#endregion

把卡券生成二维码

#region 通过生成二维码让会员来领取微信会员卡 参考:https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025062public void WxCreateQRcode(){string flag = "0";string getAuthorize = GetAuthorize();string access_token = "";try{if (getAuthorize != ""){getAuthorize = "[" + getAuthorize + "]";Newtonsoft.Json.Linq.JArray javascript = (Newtonsoft.Json.Linq.JArray)JsonConvert.DeserializeObject(getAuthorize);Newtonsoft.Json.Linq.JObject obj = (Newtonsoft.Json.Linq.JObject)javascript[0];if (obj["access_token"] != null && obj["access_token"].ToString() != ""){access_token = obj["access_token"].ToString();
                    }}string postUrl = "https://api.weixin.qq.com/card/qrcode/create?access_token=" + access_token;string postData = "{";postData += "\"action_name\":\"QR_CARD\",";postData += "\"expire_seconds\":\"\",";postData += "\"action_info\":{";postData += "\"card\": {";postData += "\"card_id\":\"prXT7wb2qAGJOLAkAuacfWtwBss0\",";postData += "\"code\":\"\",";postData += "\"openid\":\"\",";postData += "\"is_unique_code\":false,";postData += "\"outer_str\":\"12b\"";postData += "}";postData += "}";postData += "}";string result = PostWebRequest(postUrl, postData);if (!string.IsNullOrEmpty(result)){result = "[" + result + "]";Newtonsoft.Json.Linq.JArray cardResult = (Newtonsoft.Json.Linq.JArray)JsonConvert.DeserializeObject(result);Newtonsoft.Json.Linq.JObject cardObj = (Newtonsoft.Json.Linq.JObject)cardResult[0];if (cardObj["errmsg"] != null && cardObj["errmsg"].ToString() != ""){if (cardObj["errmsg"].ToString() == "ok"){flag = cardObj["show_qrcode_url"].ToString();}else{flag = "-1";}}}}catch (Exception ex){LogError(ex);flag = "-1";}Context.Response.Write(flag);}#endregion

LogError(ex);这个是我封装的一个异常日志,你们复制过去了会报错,删了就是了,不影响的

转载于:https://www.cnblogs.com/LoveQin/p/10147798.html

C# 微信开发-----微信会员卡(一)相关推荐

  1. 微信开发 ━━ 微信商户v3微信支付H5方式开发之php篇

    native方式开发纪要:<微信开发 ━━ 微信商户native方式支付v3开发之php篇> 一.流程 流程是必须要弄懂的,弄懂之后遇到问题也能知道出在哪里. 官方说明:<H5支付统 ...

  2. C# 微信开发-----微信会员卡(二)

    主要说说如何使用微信的激活会员卡 如图: 点击激活会员卡时,要跳转到如下的图片: 要实现这个功能,首先我们在创建会员卡后就操作如下代码 #region 添加激活时的自定义字段string custom ...

  3. 微信开发---微信网页授权、JS-SDK和微信公众号的基本设置

    用了好几个小时的时间,整理了一下关于公众号的思维导图,由于CSDN不能上传相对应的文件,所以萍子一一的分解开的截图附上来,希望对大家有所帮助哦~ 因为是电脑设备自动截图,又鉴于内容比较多,可能不是太清 ...

  4. 微信开发 ━━ 微信商户v3微信支付回调之php篇

    开发内容都在这里: 微信支付API v3 证书和回调报文解密 在微信支付时提供一个回调地址,支付完成后微信会向这个回调地址发送一个json格式的报文,将报文内容解密后获取订单号等数据 报文内容: {& ...

  5. 微信开发-微信公共账号申请与接入(1)

    接触微信已经一年啦,也算是有点小体会啦,大大小小的项目也做了些,在此温故知新也.在接下来的博客中,我会从申请到开发微信项目做下简单的介绍,方便新手学习,也请大神们多多指点哈 首先要想开发微信公共号,你 ...

  6. [微信开发] 微信公众号被关注后如何回复多条消息?

    当开发微信公众号接口的时候,第一次关注以后,可以给用户回复多条自动回复消息 需要用到客服接口的功能,公众号是认证的订阅号或者是服务号 当收到关注事件以后,调用客户接口的回复消息功能,可以回复多条 可以 ...

  7. 微信开发--微信公众号相关配置--添加子管理员

    微信公众号一般由客户申请,客户方会有一位微信公众号的超级管理员管理公众号: 为了方便开发,开发者最好成为微信公众号的子管理员,下面将说明如何添加微信公众号子管理员 首先从客户那里获取到所开发微信公众号 ...

  8. 微信开发 ━━ 微信支付之商户API证书获得

    微信开发需要用到商户平台密钥,可用于生成签名等工作.操作时跟着提示一步一步走就行了,里面下载的最新软件链接都有. 进入商户平台 => 账户中心 => API安全 => API证书 = ...

  9. C# 微信开发-----微信会员卡(三)激活会员卡

    在会员领取了会员卡之后需要做 一个跳转性激活,模式请看下图: 在创建会员卡的时候需要配置下这个参数的值: memberActivate.aspx页面代码如下: <%@ Page Language ...

最新文章

  1. ADC中宽带巴伦的使用
  2. 如此精心整理的深度学习资源只在这里,值得你拥有!(上篇)
  3. 低调的 Linux 文件系统家族
  4. iOS UI基础-11.0 UINavigationController
  5. vue中向数组去重_「前端剑指offer第3期」来,手写一下数组去重
  6. 2021年3月15日_读书|总结笔记目录
  7. 【QT】QT从零入门教程(十):QT布局管理QLayout
  8. ASUS F9系列XP硬件驱动
  9. docker stats 监控资源使用情况
  10. mysql导出成execl
  11. fis 前端构建工具
  12. 深度神经网络的优化算法,深度神经网络算法原理
  13. textbox多行文本框_文本框脚本
  14. phpmyadmin mysql_phpmyadmin
  15. Nvidia Jetson AGX Orin 初体验
  16. 如何合并多个PDF文件?这几个小妙招快来码住吧
  17. 使用Tableau对综测成绩进行可视化数据分析
  18. 【leetcode个人练习记录】 滑动窗口的问题
  19. 大数据因果推理与学习入门综合概述
  20. 中国科学技术大学计算机考研难吗,中国科学技术大学(专业学位)计算机技术考研难吗...

热门文章

  1. Flask-SQLALchemy 连接数据库
  2. inner join,left join,right join 三者的用法
  3. java xml解析_Java解析XML(4种方法)
  4. STL和C++标准库
  5. 【C#】C#实现鼠标滚轮的图像居中缩放
  6. 【Tensorflow】深度学习实战05——Tensorflow实现Inception V3
  7. pytorch ——模型创建与nn.Module
  8. numpy中的*(矩阵对应位置元素相乘)和np.dot(矩阵执行矩阵乘法运算)
  9. leetcode - 647. 回文子串
  10. leetcode - 70. 爬楼梯