Parcourir la source

调整支付宝接口

lcl il y a 1 an
Parent
commit
af8004e74a

+ 131 - 36
AppStart/Alipay/AlipayFunction.cs

@@ -23,12 +23,12 @@ namespace MySystem
         #region 代商家签约
 
         //(开启事务)接口创建应用事务,返回生成代商户操作事务编号 batch_no
-        public string GetBatchNo(string AlipayAccount, string Name, string Mobile, string Email)
+        public string GetBatchNo(string Name, string Mobile, string Email)
         {
             IAopClient client = new DefaultAopClient("https://openapi.alipay.com/gateway.do", AppId, PrivateKey, "json", "1.0", "RSA2", AlipayPublicKey, "utf-8", false);
             AlipayOpenAgentCreateRequest request = new AlipayOpenAgentCreateRequest();
             request.BizContent = "{" +
-            "\"account\":\"" + AlipayAccount + "\"," +
+            "\"account\":\"" + Email + "\"," +
             "\"contact_info\":{" +
             "\"contact_name\":\"" + Name + "\"," +
             "\"contact_mobile\":\"" + Mobile + "\"," +
@@ -50,66 +50,160 @@ namespace MySystem
             }
             return result;
         }
+        //提交代商户签约、创建应用事务
+        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="{" +
+            "  \"batch_no\":\"" + BatchNo + "\"" +
+            "}";
+            string result = "";
+            try
+            {
+                AlipayOpenAgentConfirmResponse response = client.Execute(request);
+                result = response.Body;
+                function.WriteLog(result, "提交代商户签约");
+            }
+            catch (Exception ex)
+            {
+                function.WriteLog(ex.ToString(), "提交代商户签约异常");
+                result = "";
+            }
+            return result;
+        }
         //代签约产品通用接口,代商家发起签约产品申请
+        // public string CommonSign(string BatchNo, string MccCode, string BusinessLicenseNo = "", string BusinessLicensePicPath = "", string SpecialLicensePicPath = "", string ShopScenePicPath = "", string ShopSignBoardPicPath = "")
+        // { 
+        //     IAopClient client = new DefaultAopClient("https://openapi.alipay.com/gateway.do", AppId, PrivateKey, "json", "1.0", "RSA2", AlipayPublicKey, "utf-8", false);
+        //     AlipayOpenAgentCommonSignRequest request = new AlipayOpenAgentCommonSignRequest();
+        //     request.BatchNo = BatchNo;
+        //     request.MccCode = MccCode; //软件系统商 D_D05_7372
+        //     if(string.IsNullOrEmpty(SpecialLicensePicPath)) SpecialLicensePicPath = BusinessLicensePicPath;
+        //     FileItem SpecialLicensePic = new FileItem(SpecialLicensePicPath);
+        //     request.SpecialLicensePic = SpecialLicensePic;
+        //     if (!string.IsNullOrEmpty(BusinessLicenseNo))
+        //     {
+        //         request.BusinessLicenseNo = BusinessLicenseNo;  //营业执照号码
+        //     }
+        //     if (!string.IsNullOrEmpty(BusinessLicensePicPath))
+        //     {
+        //         FileItem BusinessLicensePic = new FileItem(BusinessLicensePicPath);
+        //         request.BusinessLicensePic = BusinessLicensePic; //营业执照图片。被代创建商户运营主体为个人账户必填,企业账户无需填写
+        //     }
+        //     FileItem BusinessLicenseAuthPic = new FileItem(BusinessLicensePicPath);
+        //     request.BusinessLicenseAuthPic = BusinessLicenseAuthPic;
+        //     request.LongTerm = true;
+        //     request.DateLimitation = "长期";
+        //     if (!string.IsNullOrEmpty(ShopScenePicPath))
+        //     {
+        //         FileItem ShopScenePic = new FileItem(ShopScenePicPath);
+        //         request.ShopScenePic = ShopScenePic;
+        //     }
+        //     if (!string.IsNullOrEmpty(ShopSignBoardPicPath))
+        //     {
+        //         FileItem ShopSignBoardPic = new FileItem(ShopSignBoardPicPath);
+        //         request.ShopSignBoardPic = ShopSignBoardPic;
+        //     }
+        //     request.ProductCode = "FACE_TO_FACE_PAYMENT"; //isv要代商户签约产品码,产品码是支付宝内部对产品的唯一标识,例如:QUICK_WAP_WAY:手机网站支付,FACE_TO_FACE_PAYMENT:当面付
+        //     request.AppName = "客小爽";
+        //     // FileItem AppDemo = new FileItem(BusinessLicensePicPath);
+        //     // request.AppDemo = AppDemo;
+        //     List<string> WebSites = new List<string>();
+        //     WebSites.Add("http://www.kexiaoshuang.com/");
+        //     request.WebSites = WebSites;
+        //     request.AlipayLifeName = "客小爽";
+        //     request.WechatOfficialAccountName = "客小爽";
+        //     // FileItem WebSitesLoa = new FileItem(BusinessLicensePicPath);
+        //     // request.WebSitesLoa = WebSitesLoa;
+        //     request.WebTestAccount = "testAccount";
+        //     request.WebTestAccountPassword = "testPassword";
+        //     FileItem WebHomeScreenshot = new FileItem(BusinessLicensePicPath);
+        //     request.WebHomeScreenshot = WebHomeScreenshot;
+        //     FileItem WebItemScreenshot = new FileItem(BusinessLicensePicPath);
+        //     request.WebItemScreenshot = WebItemScreenshot;
+        //     FileItem WebPayScreenshot = new FileItem(BusinessLicensePicPath);
+        //     request.WebPayScreenshot = WebPayScreenshot;
+        //     request.WebStatus = "已上线";
+        //     string result = "";
+        //     try
+        //     {
+        //         AlipayOpenAgentCommonSignResponse response = client.Execute(request);
+        //         result = response.Body;
+        //         function.WriteLog(result, "代商家发起签约产品申请");
+        //         //{"alipay_open_agent_common_sign_response":{"code":"10000","msg":"Success"},"sign":"qt0DiXFXIJ7mX+W2+IX+cyYXx8ROGe8yxesXHGNltxpEv/s/zW16xzf4HQLtUlaAiWf3DiD2QV7Hj+REyoZw9AcktDAmlobcjQ28lTYufPECZoUJHpkn9VpGB932FC0hScVwCbsxQakH84MGT4cmjr1hCuSs7+XogdhlCTIKjau1e7ZglLnt7f1NqT8JnljVhmvkkE9gJTLq5H+Zq6XbFfBVptvM9w09HdjfhrsxAXJyQ4yU6JYX2tUYsRGz8ZrveDQMvXKTN9jnwKE9hh8ik6Sq49eUqfutV9GkKqhC96+Vy3nOTOTnPoECXZkco1wP5jsqHottWVsRV+NxdylnTw=="}
+        //     }
+        //     catch (Exception ex)
+        //     {
+        //         function.WriteLog(ex.ToString(), "代签约产品通用接口异常");
+        //         result = "";
+        //     }
+        //     return result;
+        // }
         public string CommonSign(string BatchNo, string MccCode, string BusinessLicenseNo = "", string BusinessLicensePicPath = "", string SpecialLicensePicPath = "", string ShopScenePicPath = "", string ShopSignBoardPicPath = "")
         { 
             IAopClient client = new DefaultAopClient("https://openapi.alipay.com/gateway.do", AppId, PrivateKey, "json", "1.0", "RSA2", AlipayPublicKey, "utf-8", false);
-            AlipayOpenAgentCommonSignRequest request = new AlipayOpenAgentCommonSignRequest();
+            AlipayOpenAgentFacetofaceSignRequest request= new AlipayOpenAgentFacetofaceSignRequest() ;
             request.BatchNo = BatchNo;
-            request.MccCode = MccCode; //软件系统商 D_D05_7372
-            if(string.IsNullOrEmpty(SpecialLicensePicPath)) SpecialLicensePicPath = BusinessLicensePicPath;
-            FileItem SpecialLicensePic = new FileItem(SpecialLicensePicPath);
-            request.SpecialLicensePic = SpecialLicensePic;
+            request.MccCode = MccCode;
             if (!string.IsNullOrEmpty(BusinessLicenseNo))
             {
                 request.BusinessLicenseNo = BusinessLicenseNo;  //营业执照号码
             }
             if (!string.IsNullOrEmpty(BusinessLicensePicPath))
             {
-                FileItem BusinessLicensePic = new FileItem(BusinessLicensePicPath);
+                FileItem BusinessLicensePic = new FileItem(function.getPath(BusinessLicensePicPath));
                 request.BusinessLicensePic = BusinessLicensePic; //营业执照图片。被代创建商户运营主体为个人账户必填,企业账户无需填写
+                FileItem BusinessLicenseAuthPic = new FileItem(function.getPath(BusinessLicensePicPath));
+                request.BusinessLicenseAuthPic = BusinessLicenseAuthPic;
+            }
+            if (!string.IsNullOrEmpty(SpecialLicensePicPath))
+            {
+                FileItem SpecialLicensePic = new FileItem(function.getPath(SpecialLicensePicPath));
+                request.SpecialLicensePic = SpecialLicensePic;
             }
-            FileItem BusinessLicenseAuthPic = new FileItem(BusinessLicensePicPath);
-            request.BusinessLicenseAuthPic = BusinessLicenseAuthPic;
-            request.LongTerm = true;
-            request.DateLimitation = "长期";
             if (!string.IsNullOrEmpty(ShopScenePicPath))
             {
-                FileItem ShopScenePic = new FileItem(ShopScenePicPath);
+                FileItem ShopScenePic = new FileItem(function.getPath(ShopScenePicPath));
                 request.ShopScenePic = ShopScenePic;
             }
             if (!string.IsNullOrEmpty(ShopSignBoardPicPath))
             {
-                FileItem ShopSignBoardPic = new FileItem(ShopSignBoardPicPath);
+                FileItem ShopSignBoardPic = new FileItem(function.getPath(ShopSignBoardPicPath));
                 request.ShopSignBoardPic = ShopSignBoardPic;
             }
-            request.ProductCode = "FACE_TO_FACE_PAYMENT"; //isv要代商户签约产品码,产品码是支付宝内部对产品的唯一标识,例如:QUICK_WAP_WAY:手机网站支付,FACE_TO_FACE_PAYMENT:当面付
-            request.AppName = "客小爽";
-            // FileItem AppDemo = new FileItem(BusinessLicensePicPath);
-            // request.AppDemo = AppDemo;
-            List<string> WebSites = new List<string>();
-            WebSites.Add("http://www.kexiaoshuang.com/");
-            request.WebSites = WebSites;
-            request.AlipayLifeName = "客小爽";
-            request.WechatOfficialAccountName = "客小爽";
-            // FileItem WebSitesLoa = new FileItem(BusinessLicensePicPath);
-            // request.WebSitesLoa = WebSitesLoa;
-            request.WebTestAccount = "testAccount";
-            request.WebTestAccountPassword = "testPassword";
-            FileItem WebHomeScreenshot = new FileItem(BusinessLicensePicPath);
-            request.WebHomeScreenshot = WebHomeScreenshot;
-            FileItem WebItemScreenshot = new FileItem(BusinessLicensePicPath);
-            request.WebItemScreenshot = WebItemScreenshot;
-            FileItem WebPayScreenshot = new FileItem(BusinessLicensePicPath);
-            request.WebPayScreenshot = WebPayScreenshot;
-            request.WebStatus = "已上线";
+            // FileItem SpecialLicensePic = new FileItem("C:/Downloads/ooopic_963991_7eea1f5426105f9e6069/16365_1271139700.jpg");
+            // request.setSpecialLicensePic = "-";
+            // request.Rate = "0.38";
+            // request.SignAndAuth = true;
+            // request.BusinessLicenseNo = "1532501100006302";
+            // FileItem BusinessLicensePic = new FileItem("C:/Downloads/ooopic_963991_7eea1f5426105f9e6069/16365_1271139700.jpg");
+            // request.setBusinessLicensePic = "-";
+            // FileItem BusinessLicenseAuthPic = new FileItem("C:/Downloads/ooopic_963991_7eea1f5426105f9e6069/16365_1271139700.jpg");
+            // request.setBusinessLicenseAuthPic = "-";
+            // request.LongTerm = true;
+            // request.DateLimitation = "2017-11-11";
+            // FileItem ShopScenePic = new FileItem("C:/Downloads/ooopic_963991_7eea1f5426105f9e6069/16365_1271139700.jpg");
+            // request.setShopScenePic = "-";
+            // FileItem ShopSignBoardPic = new FileItem("C:/Downloads/ooopic_963991_7eea1f5426105f9e6069/16365_1271139700.jpg");
+            // request.setShopSignBoardPic = "-";
+            // request.ShopName = "-";
+            // SignAddressInfo signAddressInfo = new SignAddressInfo();
+            // signAddressInfo.country_code = "156";
+            // signAddressInfo.province_code = "370000";
+            // signAddressInfo.city_code = "371000";
+            // signAddressInfo.district_code = "371002";
+            // signAddressInfo.detail_address = "xx街道xx小区xx楼xx号";
+            // signAddressInfo.longitude = "120.760001";
+            // signAddressInfo.latitude = "60.270001";
+            // request.shop_address = signAddressInfo;
+            // request.BusinessLicenseMobile = "13189652239";
             string result = "";
             try
             {
-                AlipayOpenAgentCommonSignResponse response = client.Execute(request);
+                AlipayOpenAgentFacetofaceSignResponse response = client.Execute(request);
                 result = response.Body;
                 function.WriteLog(result, "代商家发起签约产品申请");
-                //{"alipay_open_agent_common_sign_response":{"code":"10000","msg":"Success"},"sign":"qt0DiXFXIJ7mX+W2+IX+cyYXx8ROGe8yxesXHGNltxpEv/s/zW16xzf4HQLtUlaAiWf3DiD2QV7Hj+REyoZw9AcktDAmlobcjQ28lTYufPECZoUJHpkn9VpGB932FC0hScVwCbsxQakH84MGT4cmjr1hCuSs7+XogdhlCTIKjau1e7ZglLnt7f1NqT8JnljVhmvkkE9gJTLq5H+Zq6XbFfBVptvM9w09HdjfhrsxAXJyQ4yU6JYX2tUYsRGz8ZrveDQMvXKTN9jnwKE9hh8ik6Sq49eUqfutV9GkKqhC96+Vy3nOTOTnPoECXZkco1wP5jsqHottWVsRV+NxdylnTw=="}
             }
             catch (Exception ex)
             {
@@ -165,6 +259,7 @@ namespace MySystem
                 result = "";
             }
             return result;
+            //{"alipay_open_agent_order_query_response":{"code":"10000","msg":"Success","order_no":"20230613034000100000035309978329","product_agent_status_infos":[{"product_code":"FACE_TO_FACE_PAYMENT","product_name":"当面付","status":"WAIT_CONFIRM"}],"order_status":"MERCHANT_CONFIRM","confirm_url":"https:\/\/b.alipay.com\/page\/message\/messageList?type=todoTasks","merchant_pid":"2088641405724089"},"sign":"nwPLGsIQRV25znCK+3G8Pf/sgF7G11jh2QQWwq+UsP2K3FyG9e14x3pPwf0NLOinFHV0AVRI8FhZLbChNl/PUjPzrhoa1OHwB1n4lvo/2uvYVU3KPPV6NKUuxy3YAB6jHDi1AuSqFVOckfm0tvm6p4a/5RYF+3pNEufDISueTdduyvOabcuf7PqQs9J4/7lAmvJxNdxkrgaHrQ4mWk102k2tc657wrRLguUULFF6+j7HtGA4WrAWxrA+KLkzjbFlFu4qtwwZUHpF666mPMQSV0IDEtqiEn3PYDtBztUu9JKTfEoUxlm36pbpp7zynthXAFyMCR8nchsFXxU4bXJcng=="}
         }
 
         #endregion

+ 14 - 16
AppStart/Helper/CheckAlipaySignService.cs

@@ -29,7 +29,12 @@ namespace MySystem
                 string content = RedisDbconn.Instance.RPop<string>("AlipaySignQueue");
                 if (!string.IsNullOrEmpty(content))
                 {
-                    StartDo(Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantSign>(content));
+                    string result = StartDo(Newtonsoft.Json.JsonConvert.DeserializeObject<MerchantSign>(content));
+                    if(result == "wait")
+                    {
+                        Thread.Sleep(10000);
+                        RedisDbconn.Instance.AddList("AlipaySignQueue", content);
+                    }
                 }
                 else
                 {
@@ -38,7 +43,7 @@ namespace MySystem
             }
         }
 
-        public void StartDo(MerchantSign sign)
+        public string StartDo(MerchantSign sign)
         {
             try
             {
@@ -56,7 +61,7 @@ namespace MySystem
                             merchantadd.QueryCount = 1;
                             string confirm_url = "/static/alipay_confirm_url/";
                             string fileName = function.MD5_16(Guid.NewGuid().ToString());
-                            function.CreateQRCode2(sign_url, fileName, "/bsserver_com" + confirm_url);
+                            function.CreateQRCode2(sign_url, fileName, "/" + confirm_url);
                             string SignUrlList = function.CheckNull(merchantadd.SeoKeyword);
                             if (string.IsNullOrEmpty(SignUrlList))
                             {
@@ -70,6 +75,7 @@ namespace MySystem
                             merchantadd.SeoTitle = dic["alipay_open_agent_order_query_response"]["merchant_pid"].ToString();
                             db.SaveChanges();
                         }
+                        return "wait";
                     }
                     else if (dic["alipay_open_agent_order_query_response"]["order_status"].ToString() == "MERCHANT_CONFIRM_SUCCESS")
                     {
@@ -78,19 +84,6 @@ namespace MySystem
                         {
                             merchantadd.QueryCount = 2;
                             db.SaveChanges();
-                            RedisDbconn.Instance.Set("MerchantAddInfo:" + sign.MerchantAddInfoId, merchantadd);
-                            if (merchantadd.Status == 2 && merchantadd.QueryCount == 2)
-                            {
-                                PxcModels.MerchantInfo merchant = db.MerchantInfo.FirstOrDefault(m => m.Id == sign.MerchantAddInfoId);
-                                List<PxcModels.MerchantInfo> merchants = RedisDbconn.Instance.GetList<PxcModels.MerchantInfo>("TmpMerchantInfo:" + merchant.UserId, 1, 1000000);
-                                PxcModels.MerchantInfo check = merchants.FirstOrDefault(m => m.Id == sign.MerchantAddInfoId);
-                                if (check != null)
-                                {
-                                    merchants.Remove(check);
-                                    RedisDbconn.Instance.Clear("TmpMerchantInfo:" + merchant.UserId);
-                                    RedisDbconn.Instance.AddList("TmpMerchantInfo:" + merchant.UserId, merchants.ToArray());
-                                }
-                            }
                         }
                     }
                     else if (dic["alipay_open_agent_order_query_response"]["order_status"].ToString() == "MERCHANT_APPLY_ORDER_CANCELED")
@@ -118,12 +111,17 @@ namespace MySystem
                             db.SaveChanges();
                         }
                     }
+                    else if (dic["alipay_open_agent_order_query_response"]["order_status"].ToString() == "MERCHANT_AUDITING")
+                    { 
+                        return "wait";
+                    }
                 }
             }
             catch (Exception ex)
             {
                 function.WriteLog(DateTime.Now.ToString() + ":" + ex.ToString(), "public:merchant:signerr");
             }
+            return "";
         }
     }
 }

+ 47 - 26
AppStart/Helper/MerchantConfirmService.cs

@@ -33,8 +33,12 @@ namespace MySystem
                     {
                         JsonData jsonObj = JsonMapper.ToObject(content);
                         int MerchantId = int.Parse(jsonObj["MerchantId"].ToString());
-                        // int Kind = int.Parse(jsonObj["Kind"].ToString());
-                        StartDo(MerchantId);
+                        int Kind = 0;
+                        if(content.Contains("\"Kind\""))
+                        {
+                            Kind = int.Parse(jsonObj["Kind"].ToString());
+                        }
+                        StartDo(MerchantId, Kind);
                     }
                     catch (Exception ex)
                     {
@@ -133,7 +137,7 @@ namespace MySystem
                 if (Kind == 0 || Kind == 1)
                 {
                     bool checkAlipay = true;
-                    string content = new AlipayFunction().GetBatchNo(AddInfo.CreateMan, AddInfo.IdCardName, AddInfo.MobilePhone, AddInfo.ContactEmail);
+                    string content = new AlipayFunction().GetBatchNo(AddInfo.IdCardName, AddInfo.MobilePhone, AddInfo.ContactEmail);
                     JsonData json = JsonMapper.ToObject(content);
                     if (json["alipay_open_agent_create_response"]["code"].ToString() == "10000")
                     {
@@ -141,35 +145,52 @@ namespace MySystem
                         string Qualifications = AddInfo.Qualifications;
                         if (!string.IsNullOrEmpty(Qualifications))
                         {
-                            Qualifications = function.getPath("/bsserver_com" + Qualifications);
+                            Qualifications = function.getPath("/" + Qualifications);
                         }
-                        content = new AlipayFunction().CommonSign(batch_no, AddInfo.UpdateMan, AddInfo.LicenseNumber, function.getPath("/bsserver_com" + AddInfo.LicenseCopy), Qualifications);
+                        content = new AlipayFunction().CommonSign(batch_no, AddInfo.UpdateMan, AddInfo.LicenseNumber, AddInfo.LicenseCopy, AddInfo.LicenseCopy, AddInfo.StoreEntrancePic, AddInfo.IndoorPic);
                         json = JsonMapper.ToObject(content);
-                        if (json["alipay_open_agent_common_sign_response"]["code"].ToString() == "10000")
+                        if (json["alipay_open_agent_facetoface_sign_response"]["code"].ToString() == "10000")
                         {
-                            content = new AlipayFunction().CommonSignConfirm(batch_no);
+                            content = new AlipayFunction().AgentConfirm(batch_no);
                             json = JsonMapper.ToObject(content);
-                            if (json["alipay_open_agent_commonsign_confirm_response"]["code"].ToString() == "10000")
+                            if (json["alipay_open_agent_confirm_response"]["code"].ToString() == "10000")
                             {
-                                AddInfo.QueryCount = 0;
-                                AddInfo.SeoTitle = batch_no;
-                                db.SaveChanges();
-                                List<MerchantSign> signs = RedisDbconn.Instance.GetList<MerchantSign>("MerchantSignList", 1, 10000000);
-                                bool op = signs.Any(m => m.BusinessCode == batch_no);
-                                if (!op)
+                                RedisDbconn.Instance.AddList("AlipaySignQueue", new MerchantSign()
                                 {
-                                    RedisDbconn.Instance.AddList("AlipaySignQueue", new MerchantSign()
-                                    {
-                                        BusinessCode = batch_no,
-                                        MerchantAddInfoId = MerchantId,
-                                        Status = ""
-                                    });
-                                }
-                                signs.Clear();
-                                if (db.MerchantInfo.Any(m => m.Id == merchant.Id) == false)
-                                {
-                                    RedisDbconn.Instance.AddList("MerchantList:" + merchant.UserId, merchant);
-                                }
+                                    BusinessCode = batch_no,
+                                    MerchantAddInfoId = MerchantId,
+                                    Status = ""
+                                });
+                                // content = new AlipayFunction().QuerySignStatus(batch_no);
+
+                                // content = new AlipayFunction().CommonSignConfirm(batch_no);
+                                // json = JsonMapper.ToObject(content);
+                                // if (json["alipay_open_agent_commonsign_confirm_response"]["code"].ToString() == "10000")
+                                // {
+                                //     AddInfo.QueryCount = 0;
+                                //     AddInfo.SeoTitle = batch_no;
+                                //     db.SaveChanges();
+                                //     List<MerchantSign> signs = RedisDbconn.Instance.GetList<MerchantSign>("MerchantSignList", 1, 10000000);
+                                //     bool op = signs.Any(m => m.BusinessCode == batch_no);
+                                //     if (!op)
+                                //     {
+                                //         RedisDbconn.Instance.AddList("AlipaySignQueue", new MerchantSign()
+                                //         {
+                                //             BusinessCode = batch_no,
+                                //             MerchantAddInfoId = MerchantId,
+                                //             Status = ""
+                                //         });
+                                //     }
+                                //     signs.Clear();
+                                //     if (db.MerchantInfo.Any(m => m.Id == merchant.Id) == false)
+                                //     {
+                                //         RedisDbconn.Instance.AddList("MerchantList:" + merchant.UserId, merchant);
+                                //     }
+                                // }
+                                // else
+                                // {
+                                //     checkAlipay = false;
+                                // }
                             }
                             else
                             {

+ 6 - 0
Controllers/HomeController.cs

@@ -80,6 +80,12 @@ namespace MySystem.Controllers
             db.Dispose();
             return txt;
         }
+
+        public string testAlipay()
+        {
+            string content = new AlipayFunction().QuerySignStatus("2023061317351531100060045");
+            return content;
+        }
     
     }
 }

+ 9 - 8
Startup.cs

@@ -171,14 +171,15 @@ namespace MySystem
             });
 
             //必须打开的
-            MerchantConfirmService.Instance.Start(); //特约商户进件队列
-            CheckWeChatSignService.Instance.Start(); //特约商户签约队列
-            WeChatPayBackService.Instance.Start(); //微信支付回调队列
-            WeChatPayBackService.Instance.StartProfitShare(); //监听已支付订单,超过1分钟的订单执行分账
-            ProfitHelper.Instance.StartActive(); //发放达标奖励队列
-            ProfitHelper.Instance.StartListenTrade(); //支付宝返现队列
-            ProfitHelper.Instance.StartListenWxTrade(); //微信返现队列
-            ProfitShareService.Instance.Start(); //分账状态监控队列,分账完成则提交返现
+            // MerchantConfirmService.Instance.Start(); //特约商户进件队列
+            // CheckAlipaySignService.Instance.Start(); //特约商户签约队列(支付宝)
+            // CheckWeChatSignService.Instance.Start(); //特约商户签约队列(微信)
+            // WeChatPayBackService.Instance.Start(); //微信支付回调队列
+            // WeChatPayBackService.Instance.StartProfitShare(); //监听已支付订单,超过1分钟的订单执行分账
+            // ProfitHelper.Instance.StartActive(); //发放达标奖励队列
+            // ProfitHelper.Instance.StartListenTrade(); //支付宝返现队列
+            // ProfitHelper.Instance.StartListenWxTrade(); //微信返现队列
+            // ProfitShareService.Instance.Start(); //分账状态监控队列,分账完成则提交返现
             //必须打开的
         }
     }