示例#1
0
        public async Task <IActionResult> WebQuickPay(LianLianPayWebQuickPayViewModel viewModel)
        {
            var request = new LianLianPayCreateBillRequest
            {
                UserId         = viewModel.UserId,
                NoOrder        = viewModel.NoOrder,
                DtOrder        = viewModel.DtOrder,
                NameGoods      = viewModel.NameGoods,
                MoneyOrder     = viewModel.MoneyOrder,
                NotifyUrl      = viewModel.NotifyUrl,
                UrlReturn      = viewModel.UrlReturn,
                RiskItem       = viewModel.RiskItem,
                FlagPayProduct = "0",
                FlagChnl       = "2"
            };
            var response = await _client.ExecuteAsync(request, _optionsAccessor.Value);

            return(Redirect(response.GatewayUrl));
        }
        public async Task <IActionResult> WebQuickPay(LianLianPayWebQuickPayViewModel viewModel)
        {
            var request = new LianLianPayWebQuickPayRequest()
            {
                NoOrder    = viewModel.NoOrder,
                DtOrder    = viewModel.DtOrder,
                MoneyOrder = viewModel.MoneyOrder,
                NameGoods  = viewModel.NameGoods,
                UserId     = viewModel.UserId,
                NotifyUrl  = viewModel.NotifyUrl,
                UrlReturn  = viewModel.UrlReturn,
                BankCode   = viewModel.BankCode,
                PayType    = viewModel.PayType,
                NoAgree    = viewModel.NoAgree,
                RiskItem   = viewModel.RiskItem,
                IdType     = viewModel.IdType,
                IdNo       = viewModel.IdNo,
                AcctName   = viewModel.AcctName,
                CardNo     = viewModel.CardNo,
            };
            var response = await _client.PageExecuteAsync(request);

            return(Content(response.Body, "text/html;charset=utf-8"));
        }