/// <summary> /// 【异步方法】退款查询接口 /// </summary> /// <param name="dataInfo"></param> /// <returns></returns> public static async Task <RefundQueryResult> RefundQueryAsync(TenPayV3RefundQueryRequestData dataInfo) { var urlFormat = "https://api.mch.weixin.qq.com/pay/refundquery"; var data = dataInfo.PackageRequestHandler.ParseXML(); var formDataBytes = data == null ? new byte[0] : Encoding.UTF8.GetBytes(data); MemoryStream ms = new MemoryStream(); ms.Write(formDataBytes, 0, formDataBytes.Length); ms.Seek(0, SeekOrigin.Begin);//设置指针读取位置 var resultXml = await RequestUtility.HttpPostAsync(urlFormat, null, ms); return(new RefundQueryResult(resultXml)); }
/// <summary> /// 【异步方法】退款查询接口 /// </summary> /// <param name="dataInfo"></param> /// <returns></returns> public static async Task<RefundQueryResult> RefundQueryAsync(TenPayV3RefundQueryRequestData dataInfo) { var urlFormat = "https://api.mch.weixin.qq.com/pay/refundquery"; var data = dataInfo.PackageRequestHandler.ParseXML(); var formDataBytes = data == null ? new byte[0] : Encoding.UTF8.GetBytes(data); MemoryStream ms = new MemoryStream(); ms.Write(formDataBytes, 0, formDataBytes.Length); ms.Seek(0, SeekOrigin.Begin);//设置指针读取位置 var resultXml = await RequestUtility.HttpPostAsync(urlFormat, null, ms); return new RefundQueryResult(resultXml); }