Beispiel #1
0
        /// <summary>
        ///  关闭统一下单订单
        /// 请不要和扫码撤销订单搞混
        /// </summary>
        /// <param name="out_trade_no"></param>
        /// <returns></returns>
        public async Task <WxPayBaseResp> CloseUniOrderAsync(string out_trade_no)
        {
            var addressUrl = string.Concat(m_ApiUrl, "/pay/closeorder");

            var baseReq = new WxPayBaseReq();
            var dics    = baseReq.GetDics();

            dics["out_trade_no"] = out_trade_no;

            return(await PostApiAsync <WxPayQueryOrderResp>(addressUrl, dics));
        }
Beispiel #2
0
        /// <summary>
        ///  撤销刷卡订单API,【需要证书】
        /// </summary>
        /// <param name="transaction_id">微信订单号 二选一 String(32) 微信的订单号,建议优先使用</param>
        /// <param name="out_trade_no"> 商户订单号 String(32)</param>
        /// <returns></returns>
        public async Task <WxPayResverOrderResp> ReverseMicroOrderAsync(string transaction_id, string out_trade_no)
        {
            var addressUrl = string.Concat(m_ApiUrl, "/secapi/pay/reverse");

            var baseReq = new WxPayBaseReq();
            var dics    = baseReq.GetDics();

            dics["out_trade_no"]   = out_trade_no;
            dics["transaction_id"] = transaction_id;

            return(await PostApiAsync <WxPayResverOrderResp>(addressUrl, dics, null, GetCertHttpClient()));
        }