public virtual string CreateMd5Sign(string accessToken, string timeStamp, string nonceStr, string url)
        {
            var    ticket         = WeChatTools.GetJSApi_Ticket(accessToken);
            var    JsApiTicket    = JsonHelper.JsonToModel <U_JsApiTicket>(ticket);//用户ID
            var    queryString    = string.Format("jsapi_ticket={0}&noncestr={1}&timestamp={2}&url={3}", JsApiTicket.ticket, nonceStr, timeStamp, url);
            string parameterValue = GetSHA1(queryString, Encoding.UTF8).ToLower();

            return(parameterValue);
        }
Exemplo n.º 2
0
        //查询订单
        private bool QueryOrder(string transaction_id)
        {
            WxPayData req = new WxPayData();

            req.SetValue("transaction_id", transaction_id);
            WxPayData res = WeChatTools.OrderQuery(req);

            if (res.GetValue("return_code").ToString() == "SUCCESS" && res.GetValue("result_code").ToString() == "SUCCESS")
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }