public async Task <IActionResult> Async() { try { var notify = await _client.ExecuteAsync <JDPayAsyncNotify>(Request, _optionsAccessor.Value); Console.WriteLine("TradeNum: " + notify.TradeNum + " tradeType :" + notify.TradeType);// notify.TradeType 0-消费 1-退款 return(JDPayNotifyResult.Success); } catch { return(NoContent()); } }
public async Task <IActionResult> Return() { try { var notify = await _notifyClient.ExecuteAsync <JDPaySyncReturn>(Request); ViewData["response"] = "支付成功"; return(View()); } catch { ViewData["response"] = "出现错误"; return(View()); } }