/// <summary> /// 支付宝充值首页 /// </summary> /// <returns></returns> public ActionResult Alipay(decimal? fee ,int? paymentID) { if (paymentID.HasValue) { EPayment payment = ModelFacade.Trade.PaymentModel.Get(p => p.PaymentID == paymentID); return View(payment); } else { //生成支付订单 EPayment payment = new EPayment(); payment.PaymentNo = ModelFacade.Trade.PaymentModel.GetPaymentNo(this.Passport.TenantCode); payment.PaymentFee = fee.Value; payment.TargetTenantCode = this.Passport.TenantCode; payment.TargetTenantName = this.Passport.TenantName; payment.TenantCode = this.Passport.TenantCode; payment.TenantName = this.Passport.TenantName; payment.PaymentStatus = 0; payment.PaymentTitle = "帐号充值"; payment.PaymentType = 1; payment.PaymentRemark = ""; payment.CreateTime = DateTime.Now; ModelFacade.Trade.PaymentModel.Add(payment); return View(payment); } }
/// <summary> /// 支付宝提交充值 /// </summary> /// <returns></returns> public ActionResult AlipayPay(EPayment trade) { //提交支付订单 return Content(ModelFacade.Trade.PaymentModel.AlipayPay(trade)); }