public ActionResult GoPay(PayNoticeEntity model, string productTable = "ContributionInfo") { SiteConfigEntity config = GetSiteConfig(); if (config == null || config.EBankType != 3) { return Json(new { result = EnumJsonResult.failure.ToString(), msg = "本网暂未开通网银支付!请通过邮局汇款方式邮寄给我们,汇款地址请查看交费通知单,谢谢!" }); } //商户扩展信息包含4项信息用英文逗号分隔如:交费类型,产品表名,产品表主键字段值,产品描述 string strKzInfo = model.PayType.ToString() + "," + productTable + "," + model.CNumber + ",用户:" + CurAuthor.LoginName + ",支付编号" + model.CNumber + model.PayTypeName + "," + model.NoticeID; string url = new YeepayHelper(config.EBankCode,config.EBankEncryKey) .CreateBuyUrl(model.Amount.ToString(), model.CNumber, model.PayTypeName, model.CTitle, "http://" + Request.Url.Authority.ToString() + "/AuthorFinance/YeepayCallback/", strKzInfo); return Json(new { result = EnumJsonResult.success.ToString(), url = url }); }
public ActionResult YeepayCallback() { YeepayHelper myYeepay = new YeepayHelper(); string message=string.Empty; FinancePayDetailEntity model = myYeepay.GetPayResult((msg) => { message = msg; }); if (model!= null) { model.JournalID = CurAuthor.JournalID; model.AuthorID = CurAuthor.AuthorID; model.EBankType = 3; model.PayDate = DateTime.Now; IFinanceFacadeAPIService service = ServiceContainer.Instance.Container.Resolve<IFinanceFacadeAPIService>(); service.AddFinancePayDetail(model); //更新缴费通知记录 if (model.NoticeID > 0) { PayNoticeQuery query = new PayNoticeQuery(); query.NoticeID = model.NoticeID; query.Status = 2; service.ChangePayNoticeStatus(query); } } return Content(message); }