Exemplo n.º 1
0
        public async Task <IActionResult> Unifiedorder()
        {
            try
            {
                var notify = await _client.ExecuteAsync <QPayUnifiedOrderNotifyResponse>(Request);

                if ("SUCCESS" == notify.TradeState)
                {
                    Console.WriteLine("OutTradeNo: " + notify.OutTradeNo);
                    return(QPayNotifyResult.Success);
                }
                return(NoContent());
            }
            catch
            {
                return(NoContent());
            }
        }
Exemplo n.º 2
0
        public async Task <IActionResult> PostAsync()
        {
            try
            {
                var notify = await _client.ExecuteAsync <QPayUnifiedOrderNotifyResponse>(Request);

                if ("SUCCESS" == notify.TradeState)
                {
                    Console.WriteLine("OutTradeNo: " + notify.OutTradeNo);
                    return(Content("<xml><return_code>SUCCESS</return_code></xml>", "text/xml"));
                }
                return(NoContent());
            }
            catch
            {
                return(NoContent());
            }
        }