diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/PayResultNoticeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/PayResultNoticeController.cs new file mode 100644 index 000000000..2065b2ee4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/PayResultNoticeController.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using CCBSign; +using Learun.Util; + +namespace Learun.Application.Web.Controllers +{ + public class PayResultNoticeController : Controller + { + //ccb Notice 建行支付通知 + + 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"]; + + return Content(new { ORDERID, ACC_TYPE, SUCCESS, TYPE, REFERER, CLIENTIP, ACCDATE, USRMSG, USRINFO, PAYTYPE, SIGN }.ToJson()); + } + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index a3db0315b..831a3380c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -54,6 +54,9 @@ 4 + + ..\packages\建行支付结果推送api\CCBRSA.dll + ..\packages\ClosedXML.0.93.0\lib\net40\ClosedXML.dll @@ -81,6 +84,15 @@ ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll + + ..\packages\建行支付结果推送api\IKVM.OpenJDK.Core.dll + + + ..\packages\建行支付结果推送api\IKVM.OpenJDK.Security.dll + + + ..\packages\建行支付结果推送api\IKVM.Runtime.dll + False ..\packages\Microsoft.AspNet.SignalR.Client.2.2.3\lib\net45\Microsoft.AspNet.SignalR.Client.dll @@ -531,6 +543,7 @@ + @@ -6433,6 +6446,7 @@ + diff --git a/Learun.Framework.Ultimate V7/packages/建行支付结果推送api/CCBRSA.dll b/Learun.Framework.Ultimate V7/packages/建行支付结果推送api/CCBRSA.dll new file mode 100644 index 000000000..08a5cdeac Binary files /dev/null and b/Learun.Framework.Ultimate V7/packages/建行支付结果推送api/CCBRSA.dll differ diff --git a/Learun.Framework.Ultimate V7/packages/建行支付结果推送api/IKVM.OpenJDK.Core.dll b/Learun.Framework.Ultimate V7/packages/建行支付结果推送api/IKVM.OpenJDK.Core.dll new file mode 100644 index 000000000..d9e93b161 Binary files /dev/null and b/Learun.Framework.Ultimate V7/packages/建行支付结果推送api/IKVM.OpenJDK.Core.dll differ diff --git a/Learun.Framework.Ultimate V7/packages/建行支付结果推送api/IKVM.OpenJDK.Security.dll b/Learun.Framework.Ultimate V7/packages/建行支付结果推送api/IKVM.OpenJDK.Security.dll new file mode 100644 index 000000000..1d5e71705 Binary files /dev/null and b/Learun.Framework.Ultimate V7/packages/建行支付结果推送api/IKVM.OpenJDK.Security.dll differ diff --git a/Learun.Framework.Ultimate V7/packages/建行支付结果推送api/IKVM.Runtime.dll b/Learun.Framework.Ultimate V7/packages/建行支付结果推送api/IKVM.Runtime.dll new file mode 100644 index 000000000..1c00e075a Binary files /dev/null and b/Learun.Framework.Ultimate V7/packages/建行支付结果推送api/IKVM.Runtime.dll differ