Example #1
0
        public async Task <IActionResult> Query(AlipayTradeQueryViewModel viewMode)
        {
            var model = new AlipayTradeQueryModel
            {
                OutTradeNo = viewMode.OutTradeNo,
                TradeNo    = viewMode.TradeNo
            };

            var req = new AlipayTradeQueryRequest();

            req.SetBizModel(model);

            var response = await _client.CertificateExecuteAsync(req, _optionsAccessor.Value);

            return(Ok(response.Body));
        }
Example #2
0
        public async Task <IActionResult> Query(AlipayTradeQueryViewModel viewMode)
        {
            var model = new AlipayTradeQueryModel()
            {
                OutTradeNo = viewMode.OutTradeNo,
                TradeNo    = viewMode.TradeNo
            };

            var req = new AlipayTradeQueryRequest();

            req.SetBizModel(model);

            var response = await _client.ExecuteAsync(req);

            ViewData["response"] = response.Body;
            return(View());
        }