示例#1
0
        public static SortedDictionary <string, object> UnifiedOrderAPP(SortedDictionary <string, object> dic, string appkey, int timeOut = 6)
        {
            dic.Add("device_info", WeiXinHelper.device_info);
            dic.Add("nonce_str", WeiXinHelper.GetNonce_str());
            dic.Add("sign", WeiXinHelper.GetMakeSignAPP(dic, appkey));
            string xml  = WeiXinHelper.WxPayDataToXml(dic);
            string xml2 = WeiXinHelper.Post(xml, WeiXinHelper.orderurl, false, timeOut);

            return(WeiXinHelper.WxPayDataFromXml(xml2));
        }
示例#2
0
        public static SortedDictionary <string, object> UnifiedOrder(SortedDictionary <string, object> dic, int timeOut = 6)
        {
            dic.Add("appid", WeiXinHelper.appid);
            dic.Add("mch_id", WeiXinHelper.mch_id);
            dic.Add("device_info", WeiXinHelper.device_info);
            dic.Add("sign", WeiXinHelper.GetMakeSign(dic));
            string xml  = WeiXinHelper.WxPayDataToXml(dic);
            string xml2 = WeiXinHelper.Post(xml, WeiXinHelper.orderurl, false, timeOut);

            return(WeiXinHelper.WxPayDataFromXml(xml2));
        }
示例#3
0
        public static SortedDictionary <string, object> OrderQuery(SortedDictionary <string, object> dic, int timeOut = 6)
        {
            dic.Add("appid", WeiXinHelper.appid);
            dic.Add("mch_id", WeiXinHelper.mch_id);
            dic.Add("nonce_str", WeiXinHelper.GetNonce_str());
            dic.Add("sign", WeiXinHelper.GetMakeSign(dic));
            string xml  = WeiXinHelper.WxPayDataToXml(dic);
            string xml2 = WeiXinHelper.Post(xml, WeiXinHelper.orderquery, false, timeOut);

            return(WeiXinHelper.WxPayDataFromXml(xml2));
        }