微信支付提交的XML Data数据[查询退款]
コード例 #1
0
        /// <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));
        }
コード例 #2
0
ファイル: TenPayV3.cs プロジェクト: JeffreySu/WeiXinMPSDK
 /// <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);
 }