public async Task <IActionResult> Refund(string tradeNum, string oTradeNum, long amount, string currency, string notifyUrl) { var request = new JDPayRefundRequest() { TradeNum = tradeNum, OTradeNum = oTradeNum, Amount = amount, Currency = currency, NotifyUrl = notifyUrl }; var response = await _client.ExecuteAsync(request); return(Content(response.Body)); }
public async Task <IActionResult> Refund(JDPayRefundViewModel viewModel) { var request = new JDPayRefundRequest { TradeNum = viewModel.TradeNum, OTradeNum = viewModel.OTradeNum, Amount = viewModel.Amount, Currency = viewModel.Currency, NotifyUrl = viewModel.NotifyUrl }; var response = await _client.ExecuteAsync(request); ViewData["response"] = response.Body; return(View()); }