lcl 1 år sedan
förälder
incheckning
58f88d449e

+ 2 - 2
AppStart/Alipay/AlipayFunction.cs

@@ -58,8 +58,8 @@ namespace MySystem
         public string AgentConfirm(string BatchNo)
         {
             IAopClient client = new DefaultAopClient("https://openapi.alipay.com/gateway.do", AppId, PrivateKey, "json", "1.0", "RSA2", AlipayPublicKey, "utf-8", false);
-            AlipayOpenAgentConfirmRequest  request= new AlipayOpenAgentConfirmRequest() ;
-            request.BizContent="{" +
+            AlipayOpenAgentConfirmRequest request = new AlipayOpenAgentConfirmRequest();
+            request.BizContent = "{" +
             "  \"batch_no\":\"" + BatchNo + "\"" +
             "}";
             string result = "";

+ 4 - 0
AppStart/Helper/CheckAlipaySignService.cs

@@ -134,6 +134,10 @@ namespace MySystem
                 }
                 else
                 {
+                    if(dic["alipay_open_agent_order_query_response"]["code"].ToString() == "40004" && dic["alipay_open_agent_order_query_response"]["sub_msg"].ToString() == "系统繁忙")
+                    {
+                        return "wait";
+                    }
                     MerchantAddInfo merchantadd = db.MerchantAddInfo.FirstOrDefault(m => m.Id == sign.MerchantAddInfoId);
                     if (merchantadd != null)
                     {

+ 1 - 1
AppStart/Helper/MerchantConfirmService.cs

@@ -204,7 +204,7 @@ namespace MySystem
                     }
                     else
                     {
-                        AddInfo.AlipayRemark = json["alipay_open_agent_facetoface_sign_response"]["sub_msg"].ToString();
+                        AddInfo.AlipayRemark = json["alipay_open_agent_create_response"]["sub_msg"].ToString();
                         AddInfo.QueryCount = -1;
                         merchant.QueryCount = -1;
                         db.SaveChanges();

+ 2 - 2
AppStart/Helper/WeChatPayBackService.cs

@@ -150,8 +150,8 @@ namespace MySystem
                                 //添加分账接收方
                                 if(merchant.Version == 0)
                                 {
-                                    WeChatFunction.Instance.AddReceive(merchantAdd.SubMchid, "MERCHANT_ID", WeChatFunction.Instance.MchId, "四川客小爽科技有限公司", "PARTNER");
-                                    merchantAdd.Version = 1;
+                                    WeChatFunction.Instance.AddReceive(merchantAdd.SubMchid, "MERCHANT_ID", WeChatFunction.Instance.MchId, WeChatFunction.Instance.MchName, "PARTNER");
+                                    merchant.Version = 1;
                                     db.SaveChanges();
                                 }
                                 //发起分账

+ 1 - 0
AppStart/WeChatFunction.cs

@@ -24,6 +24,7 @@ namespace MySystem
         public string AppId = "wx6e074b8e07b6577e";
         public string AppSecret = "883f9ef7831d8ca82168c3fd6dcfb750";
         public string MchId = "1613112281";
+        public string MchName = "四川省润观米科技有限公司";
         public string plateMchId = "1647817950";
         public string serialNo = "14E9FD7F0981BEA23F94137607521CB51C4F76EF";
         public string getSerialNo = "61D99F7218B487788E35D6C4E3ED398E0979D3F6";

+ 2 - 1
Controllers/HomeController.cs

@@ -94,7 +94,8 @@ namespace MySystem.Controllers
             // string content = AlipayFunction.Instance.BindSettleRelation(DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8), "2088141704579033");
             // string content = AlipayFunction.Instance.Refund("2023061622001451251436120885", "0.01", "客小爽来客吧项目盛大来袭");
             // string content = AlipayFunction.Instance.QuerySettle("2023061517455619986938439", "2023061522001451251430528719", "");
-            MerchantConfirmService.Instance.StartDo(68, 2);
+            // MerchantConfirmService.Instance.StartDo(68, 2);
+            
             return "ok";
         }