示例#1
0
        public async Task <IActionResult> SaveOrderPC(JDPaySaveOrderViewModel viewModel)
        {
            var request = new JDPaySaveOrderPCRequest()
            {
                TradeNum    = viewModel.TradeNum,
                TradeName   = viewModel.TradeName,
                TradeTime   = viewModel.TradeTime,
                Amount      = viewModel.Amount,
                OrderType   = viewModel.OrderType,
                Currency    = viewModel.Currency,
                CallbackUrl = viewModel.CallbackUrl,
                NotifyUrl   = viewModel.NotifyUrl,
                UserId      = viewModel.UserId,
            };

            var response = await _client.PageExecuteAsync(request);

            return(Content(response.Body, "text/html;charset=utf-8"));
        }
示例#2
0
        public async Task <IActionResult> SaveOrderPC(string tradeNum, string tradeName, string tradeDesc, string tradeTime, string amount, string orderType, string currency, string note, string callbackUrl, string notifyUrl, string tradeType)
        {
            var request = new JDPaySaveOrderPCRequest()
            {
                TradeNum    = tradeNum,
                TradeName   = tradeName,
                TradeDesc   = tradeDesc,
                TradeTime   = tradeTime,
                Amount      = amount,
                OrderType   = orderType,
                Currency    = currency,
                Note        = note,
                CallbackUrl = callbackUrl,
                NotifyUrl   = notifyUrl,
            };

            var response = await _client.PageExecuteAsync(request, "POST");

            return(Content(response.Body, "text/html"));
        }