public async Task <IActionResult> PagePayReturn() { try { var notify = await _notifyClient.ExecuteAsync <AlipayTradePagePayReturnResponse>(Request); return(Content("success", "text/plain")); } catch { return(Content("error", "text/plain")); } }
public async Task <IActionResult> PagePayReturn() { try { var notify = await _notifyClient.ExecuteAsync <AlipayTradePagePayReturnResponse>(Request); ViewData["response"] = "支付成功"; return(View()); } catch { ViewData["response"] = "出现错误"; return(View()); } }
public async Task <IActionResult> PagePayAsync() { try { var notify = await _client.ExecuteAsync <AlipayTradePagePayNotifyResponse>(Request); if ("TRADE_SUCCESS" == notify.TradeStatus) { Console.WriteLine("OutTradeNo: " + notify.OutTradeNo); return(Content("success", "text/plain")); } return(NoContent()); } catch { return(NoContent()); } }
public async Task <IActionResult> Precreate() { try { var notify = await _client.ExecuteAsync <AlipayTradePrecreateNotifyResponse>(Request); if ("TRADE_SUCCESS" == notify.TradeStatus) { Console.WriteLine("OutTradeNo: " + notify.OutTradeNo); return(AlipayNotifyResult.Success); } return(NoContent()); } catch { return(NoContent()); } }