Example #1
0
 [HttpPost] // pc post
 public IActionResult Return()
 {
     try
     {
         var notify = _notifyClient.ExecuteAsync <JdPaySyncReturnResponse>(Request);
         return(Content("success", "text/plain"));
     }
     catch
     {
         return(Content("error", "text/plain"));
     }
 }
Example #2
0
        public async Task <IActionResult> Async()
        {
            try
            {
                var notify = await _client.ExecuteAsync <JdPayAsyncNotifyResponse>(Request);

                Console.WriteLine("TradeNum: " + notify.TradeNum + " tradeType :" + notify.TradeType);

                return(Content("success", "text/plain"));
            }
            catch
            {
                return(NoContent());
            }
        }