|
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using CCBSign;
- using Learun.Application.Base.SystemModule;
- using Learun.Loger;
- using Learun.Util;
-
- namespace Learun.Application.Web.Controllers
- {
- public class PayResultNoticeController : Controller
- {
- //ccb Notice 建行支付通知
-
- [HttpPost]
- public ActionResult ccb()
- {
- //签名串
- string signString =
- "3f075c001b32f9ae33e235e5584442438a3c1a60472dd6e2a45eccf91f16b648c173f7ed86cc7e51495f1b59bc91a71314c70a5ac3ea29f080d97fc9e41e1c3c42c4e4b889e338426b20480483cd94a089987076485fc3cb37dfabafea1dd37d0eaaa92d60a3717557824ac3768a5f94d6e0c2a0c108d780e093bdd9319f526f";
- //公钥
- string pubKey =
- "30819d300d06092a864886f70d010101050003818b00308187028181009ba4951169c5deecf03a8ddb2fd934f53747c03a211f63bccc84773182bdd8f7159634705041087e4c9053df05326952a143e1aab5e8ba75ed891a91c2db484b66a064abba6605418944d8763814ff23c161101948ec9ef2dfac735b4bb7c7dac18fbf87157b424780eb7080a3e7c9e79dd4841e44a001edfe497b9e3d2181b9020111";
- //签名源串
- string initString =
- "POSID=000000&BRANCHID=110000000&ORDERID=00320995&PAYMENT=0.01&CURCODE=01&REMARK1=test1&REMARK2=test2&SUCCESS=Y";
-
- //RSASig sign = new RSASig();
- //sign.setPublicKey(pubKey);
- //bool result = sign.verifySigature(signString, initString);
- //if (true == result)//验证成功
- //{
- // Console.WriteLine("RSA verified!");
- //}
- //else//验证失败
- //{
- // Console.WriteLine("RSA not verified!");
- //}
- //Console.ReadKey();
- string ORDERID = Request["ORDERID"];
- string ACC_TYPE = Request["ACC_TYPE"];
- string SUCCESS = Request["SUCCESS"];
- string TYPE = Request["TYPE"];
- string REFERER = Request["REFERER"];
- string CLIENTIP = Request["CLIENTIP"];
- string ACCDATE = Request["ACCDATE"];
- string USRMSG = Request["USRMSG"];
- string USRINFO = Request["USRINFO"];
- string PAYTYPE = Request["PAYTYPE"];
- string SIGN = Request["SIGN"];
- LogEntity logEntity=new LogEntity();
- logEntity.F_CategoryId = 121;
- logEntity.F_Module = "cbc";
- logEntity.F_ExecuteResultJson = new
- {ORDERID, ACC_TYPE, SUCCESS, TYPE, REFERER, CLIENTIP, ACCDATE, USRMSG, USRINFO, PAYTYPE, SIGN}.ToJson();
- logEntity.WriteLog();
- return Content("true");
- }
- }
- }
|