Browse Source

调整微信支付宝参数

lcl 1 year ago
parent
commit
a93438ae16

+ 4 - 4
AppStart/Alipay/AlipayFunction.cs

@@ -17,10 +17,10 @@ namespace MySystem
     public class AlipayFunction
     {
         private HttpContext _context;
-        private string AppId = "2021003116616751";
-        private string PrivateKey = "MIIEpAIBAAKCAQEA1KjMzZJIRG6QQ3+c/euVrc+8RR0xMw6A+EONSKhJq4Bg+rtxQPCfdF2bpZ4NMaSqfalSiLoxrZSYBYOZhpDP67i9LXGUoFCWdRL7ROTqJvuU6KyEeMplQ6Q3uwWbuKbh9COt0vhqn/pjlUsomTwq+DRQv10awynkZikqceXdP0EH4iGZG0hyerEP5yLHpHiggf4f7TOsovHX+fGLPmWFO1zUTHHbz7HxU4BQKn3yuje4yMhoyv5h/wZzeVwvj+Qti8Hlh351rF0f5BHwN1YMGIrWuPU5bF8OMHS/UXPxh7Bs795ZZyplYztTz26QfKfLWVVsLOng4pvgPS+OgzZydwIDAQABAoIBAEu6mMQT9Zw46zK+PP/HZxPwSBEsphqSbab7F1LqauGh4+cl3NzNU1szAnxl3jjxdK0vIO8DrzErGz/Lb16WLxS4QtXt/olgaVPjoIsWIbQkHxEEbmA9YvZFgnsdMij9dLVmBz57rCywE8pUa262GG8u4hpjY2Zggq9GtZC91J3zOeETBG828gU+FLHGcDpfz7pD1jC0noDfDRxmIImOMZvChIvvY+tm6MpySXN8lw1vxhLc0aZbKSQkuVyCyB4fIsdJJvh2dRPiY+BA0jXNK3mWwnnHzac/9JXqWFlwk6iPIIjXPUldz7Zq3EpCI+9p+UqLtIu6BAUbk1biFTt8xMECgYEA+2iIxZfdl1N1suA/aEbUdjd0kxeeOsGv7Ps0rOYn+4/q1dkUukg2V6VRy3E8BUt+9zLPTR8DmL7oBi+kDsGehjHlH7U6Pe8qKszB4ufQBDHc71yg9liqOWa4s9VoBD0VIU9CO0HtYjRor7rVuUzp+j58SLP7wIEPGEwdgjeYENECgYEA2IsYEyHiwhjy5rx7fmv3duZC5zyesIqxdA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lipayPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxycehrmnTl2IaIAECP+0HWc1eWGM/T6x022K7K6fdf+xoyC97TBJaG4G3Bcon4gsJX+Sad5IA9OJIQ4eN1joM35hIlwcFZ6MmCuVXx/SMAKThIjK0jsRc6aTxVQG+GVCgS7dXMKb4Sm+vK2wEM6xtDeqcfYMB0BqGZRvxbIV59a2ooPrha4FkV6nNC9DQefzC0picHXV64oYUjMM2ed4ASTQVds7HP9BZfalz//APZcWdBV08f+xv7n79Twz/gNtVAadfuTAlcjsS6aK+G/OrZtr/diuemeRPRUKlVhcr5xOQDhqBgtdIw8M9Wp6I4ULXRlthKVBWToH9j6n9vDIiwIDAQAB";
+        private string AppId = "2021004100667901";
+        private string PrivateKey = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCHDYLsDKk39xIE1lTUtTa2Hnx/O8uWGV+DuNnPfE0lDCkgK1IXqFdcHaoKF5wRm/tkbKK65qZOf9z5kAokCXcRnx8wSBOt0r0zz7cNfoUjNbLAK4+S2yfEsiROPgu38uM8jc/fJksRK5bMchD5MafASCb8XHkRJauJsU510tGc2kg2TfrL6C1pWhelDvjZa3piDWXgVmvMIA4eMt9V5PIDOZdebxMZ3N6nzd/IKpIGn6t2lvUIZC6QdikJqnKTnaEzjCqwBV2d0Co7mqhGLkF+7KJWzYFHo577yIXisPkUn9aTpCC56ZZfwL/iNOe42zViwW4JMepjCvyTwnp6QR2DAgMBAAECggEAShv8+wFbno1jAuqGdI7Ybgm+sacjacOUqVi3lWcVgj3xF2kOTFMhVTgmBhG8n+Eji5Edn0hQfIUnwn7rQak8AJx75ee3fMxG7PaP8cS61H50D4YX7DN82DAVQiZEEfYkAiejqUV/LfXoc1oovEYmUpqFYjhwaxtrzUxRzNAaHGLThcP15Vk116hGm315dMS6iONkhAHgkiYdcjqNjGOGjA/zoP+FDWXPvyYL2Z+VIXQwLmAe2N1HQxJwgq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Zv7ZGyiuuamTn/c+ZAKJAl3EZ8fMEgTrdK9M8+3DX6FIzWywCuPktsnxLIkTj4Lt/LjPI3P3yZLESuWzHIQ+TGnwEgm/Fx5ESWribFOddLRnNpINk36y+gtaVoXpQ742Wt6Yg1l4FZrzCAOHjLfVeTyAzmXXm8TGdzep83fyCqSBp+rdpb1CGQukHYpCapyk52hM4wqsAVdndAqO5qoRi5BfuyiVs2BR6Oe+8iF4rD5FJ/Wk6QguemWX8C/4jTnuNs1YsFuCTHqYwr8k8J6ekEdgwIDAQAB";
+        public string AlipayPublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB";
         public AlipayFunction(HttpContext context)
         {
             _context = context;

File diff suppressed because it is too large
+ 9 - 9
AppStart/WeChatFunction.cs


+ 1 - 6
Areas/Api/Controllers/v1/MainServer/ConsumerOrdersController.cs

@@ -229,12 +229,7 @@ namespace MySystem.Areas.Api.Controllers.v1
             }
             else
             {
-                PublicAccountSet set = new PublicAccountSet()
-                {
-                    WeChatMiniAppId = "wx5417e0770bb19c4e",
-                    WeChatMiniAppSecret = "b853caabd367e1f3fd729c259ac8bee6",
-                };
-                string result = function.GetWebRequest("https://api.weixin.qq.com/sns/jscode2session?appid=" + set.WeChatMiniAppId + "&secret=" + set.WeChatMiniAppSecret + "&js_code=" + Code + "&grant_type=authorization_code");
+                string result = function.GetWebRequest("https://api.weixin.qq.com/sns/jscode2session?appid=" + new WeChatFunction().AppId + "&secret=" + new WeChatFunction().AppSecret + "&js_code=" + Code + "&grant_type=authorization_code");
                 function.WriteLog(DateTime.Now.ToString() + "\n" + result, "微信小程序获取openid");
                 JsonData jsonObj = JsonMapper.ToObject(result);
                 openid = jsonObj["openid"].ToString();

+ 3 - 6
Areas/Api/Controllers/v1/MainServer/ConsumersController.cs

@@ -51,12 +51,9 @@ namespace MySystem.Areas.Api.Controllers.v1
             string iv = data["iv"].ToString(); //微信小程序获取手机号的IV
             Dictionary<string, object> Obj = new Dictionary<string, object>();
             // PublicAccountSet set = RedisDbconn.Instance.Get<PublicAccountSet>("PublicAccountSet") ?? new PublicAccountSet();
-            PublicAccountSet set = new PublicAccountSet()
-            {
-                WeChatMiniAppId = "wx5417e0770bb19c4e",
-                WeChatMiniAppSecret = "b853caabd367e1f3fd729c259ac8bee6",
-            };
-            string result = function.GetWebRequest("https://api.weixin.qq.com/sns/jscode2session?appid=" + set.WeChatMiniAppId + "&secret=" + set.WeChatMiniAppSecret + "&js_code=" + code + "&grant_type=authorization_code");
+            string url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + new WeChatFunction().AppId + "&secret=" + new WeChatFunction().AppSecret + "&js_code=" + code + "&grant_type=authorization_code";
+            function.WriteLog(url, "微信小程序通过code获取openid");
+            string result = function.GetWebRequest(url);
             JsonData jsonObj = JsonMapper.ToObject(result);
             string openid = jsonObj["openid"].ToString();
             string session_key = jsonObj["session_key"].ToString();

+ 1 - 1
Config/WeChatParam.cs

@@ -5,6 +5,6 @@ namespace AppConfig
 {
     public class WeChatParam
     {
-        public static string AesGemKey = "Vs64HGFxAjN7Nc3MYvNEDRDUx3MEQCvt";
+        public static string AesGemKey = "CYV7ZQIY2IZYD5VEIBEUSVXCYWVUNY3N";
     }
 }

Some files were not shown because too many files changed in this diff