Exemple #1
0
 /// <summary>
 /// 发送请求
 /// </summary>
 /// <param name="url"></param>
 /// <param name="content"></param>
 /// <param name="method"></param>
 /// <returns></returns>
 public static async Task <string> RequestAsync(string url, object content = null, string method = "post")
 {
     return(await UtilHelper.RequestAsync(url, content, method));;
 }
Exemple #2
0
        /// <summary>
        /// 微信统一下单
        /// </summary>
        /// <param name="xml">xml格式字符串</param>
        /// <returns></returns>
        public static async Task <WxUnifieResult> UnifiedOrderAsync(string xml)
        {
            var content = await RequestAsync("https://api.mch.weixin.qq.com/pay/unifiedorder", xml);

            return(UtilHelper.ReadXml <WxUnifieResult>(content));
        }