public void PayDo(string payType, string orderId) { try { var rlt = _rechargeService.GetList().FirstOrDefault(m => m.OrderNumber == orderId); var pay = payType; // ali/wx var outTradeNo = rlt?.OrderNumber; var subject = rlt?.OrderName; var totalFee = rlt?.Money; var num = rlt?.Value; if (pay == "wx") { //string ImageUrl = "/Wx/MakeQrCode?data=" + HttpUtility.UrlEncode(payRlt.Message); //Request.HttpContext.Session.SetString("ImageUrl", ImageUrl); //HttpContext.Session.CommitAsync(); //return Redirect("/Prod/WxPay"); //微信二维码支付页面 } else { Payments(outTradeNo, subject, Convert.ToDecimal(totalFee)); }//支付宝支付页面 } catch (Exception ex) { Logger.Error("PayPayDo error:", ex); } }
public async Task <JsonResult> GetList(RechargePara para) { para.PageNumber = para.PageNumber - 1; para.UserId = LoginInfo.Id; return(await Task.Run(() => { var dtos = _rechargeService.GetList(para, out var count); var list = dtos.MapTo <List <RechargeModel> >(); return Json(new { rows = list, total = count }); })); }