Ejemplo n.º 1
0
        /// <summary>
        /// 订单查询
        /// </summary>
        /// <param name="input">查询数据</param>
        /// <returns></returns>
        public async Task <AlipayTradeQueryResponse> Query(AlipayTradeQueryModel input)
        {
            var request = new AlipayTradeQueryRequest();

            request.SetBizModel(input);

            var response = await _alipayService.ExecuteAsync(request);

            return(response);
        }
        public async Task <JsonResult> Query(string tradeno, string alipayTradeNo)
        {
            /*DefaultAopClient client = new DefaultAopClient(Config.Gatewayurl, Config.AppId, Config.PrivateKey, "json", "2.0",
             *      Config.SignType, Config.AlipayPublicKey, Config.CharSet, false);*/
            AlipayTradeQueryModel model = new AlipayTradeQueryModel
            {
                OutTradeNo = tradeno,
                TradeNo    = alipayTradeNo
            };

            AlipayTradeQueryRequest request = new AlipayTradeQueryRequest();

            request.SetBizModel(model);

            var response = await _alipayService.ExecuteAsync(request);

            return(Json(response.Body));
        }