public ActionResult Deposit(string gateway, decimal amount) { string url = string.Empty; var deposit = new UserDeposit(); deposit.UserId = CurrentUser.Id; deposit.IP = Request.UserIP(); deposit.Amount = amount; deposit.Gateway = gateway; deposit.FlowNum = DateTime.Now.ToString("yyyyMMdd") + CurrentUser.Id + DateTime.Now.Ticks; if (gateway == "alipay") { url = PaymentHelper.Alipay(deposit); } else if (gateway == "wechatpay") { url = PaymentHelper.Weixin(deposit); } if (string.IsNullOrEmpty(url)) { return(View()); } return(Redirect(url)); }