|
@@ -417,164 +417,46 @@ namespace MySystem
|
|
|
|
|
|
#region 小程序提审
|
|
|
|
|
|
- public string MiniProgramApply()
|
|
|
+ public string MiniProgramApply(string AppVersion, string VersionDesc)
|
|
|
{
|
|
|
string result = "";
|
|
|
try
|
|
|
{
|
|
|
IAopClient client = new DefaultAopClient("https://openapi.alipay.com/gateway.do", MiniAppId, MiniPrivateKey, "json", "1.0", "RSA2", MiniAlipayPublicKey, "UTF-8", false);
|
|
|
- string imageBase64 = "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAEUlEQVR42mP4TyRgGFVIX4UAI/uOgGWVNeQAAAAASUVORK5CYII=";
|
|
|
AlipayOpenMiniVersionAuditApplyRequest request = new AlipayOpenMiniVersionAuditApplyRequest();
|
|
|
- // request.AppSlogan = "专注潮流女装20年";
|
|
|
- // FileItem firstLicensePic = new FileItem("firstLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FirstLicensePic = firstLicensePic;
|
|
|
- // FileItem secondScreenShot = new FileItem("secondScreenShot.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.SecondScreenShot = secondScreenShot;
|
|
|
- // FileItem fourthLicensePic = new FileItem("fourthLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FourthLicensePic = fourthLicensePic;
|
|
|
- // request.TestPassword = "12121";
|
|
|
- // List<RegionInfo> serviceRegionInfo = new List<RegionInfo>();
|
|
|
- // RegionInfo serviceRegionInfo0 = new RegionInfo();
|
|
|
- // serviceRegionInfo0.ProvinceName = "浙江省";
|
|
|
- // serviceRegionInfo0.AreaCode = "311100";
|
|
|
- // serviceRegionInfo0.CityCode = "310000";
|
|
|
- // serviceRegionInfo0.ProvinceCode = "310000";
|
|
|
- // serviceRegionInfo0.AreaName = "余杭区";
|
|
|
- // serviceRegionInfo0.CityName = "杭州市";
|
|
|
- // serviceRegionInfo.Add(serviceRegionInfo0);
|
|
|
- // request.ServiceRegionInfo = serviceRegionInfo;
|
|
|
- // FileItem secondSpecialLicensePic = new FileItem("secondSpecialLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.SecondSpecialLicensePic = secondSpecialLicensePic;
|
|
|
- // FileItem thirdSpecialLicensePic = new FileItem("thirdSpecialLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.ThirdSpecialLicensePic = thirdSpecialLicensePic;
|
|
|
- // request.LicenseNo = "licenseNo";
|
|
|
- // FileItem appLogo = new FileItem("appLogo.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.AppLogo = appLogo;
|
|
|
- // FileItem fifthScreenShot = new FileItem("fifthScreenShot.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FifthScreenShot = fifthScreenShot;
|
|
|
- // request.VersionDesc = "本次版本更新优化了3项功能,修复了5个BUG";
|
|
|
- // FileItem testFileName = new FileItem("testFileName.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.TestFileName = testFileName;
|
|
|
- // request.AutoOnline = "true";
|
|
|
- // request.AppVersion = "0.0.1";
|
|
|
- // request.RegionType = "CHINA";
|
|
|
- // FileItem thirdScreenShot = new FileItem("thirdScreenShot.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.ThirdScreenShot = thirdScreenShot;
|
|
|
- // request.Memo = "小程序示例";
|
|
|
- // request.LicenseName = "营业执照名称";
|
|
|
- // FileItem fifthLicensePic = new FileItem("fifthLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FifthLicensePic = fifthLicensePic;
|
|
|
- // FileItem outDoorPic = new FileItem("outDoorPic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.OutDoorPic = outDoorPic;
|
|
|
- // request.MiniCategoryIds = "XS1001_XS2001_XS3002;XS1011_XS2089;XS1002_XS2008_XS3024";
|
|
|
- // FileItem secondLicensePic = new FileItem("secondLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.SecondLicensePic = secondLicensePic;
|
|
|
- // request.AppName = "杭州支小宝潮流女装店";
|
|
|
- // request.TestAccout = "12122";
|
|
|
- // request.BundleId = "com.alipay.alipaywallet";
|
|
|
- // request.ServicePhone = "13110101010";
|
|
|
- // FileItem firstSpecialLicensePic = new FileItem("firstSpecialLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FirstSpecialLicensePic = firstSpecialLicensePic;
|
|
|
- // FileItem thirdLicensePic = new FileItem("thirdLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.ThirdLicensePic = thirdLicensePic;
|
|
|
- // request.SpeedUp = "true";
|
|
|
- // FileItem fourthScreenShot = new FileItem("fourthScreenShot.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FourthScreenShot = fourthScreenShot;
|
|
|
- // request.AppDesc = "一家专注做潮流女装的店铺,带给消费者价格便宜、质量上乘的衣服";
|
|
|
- // request.AuditRule = "BASE_PROMOTE";
|
|
|
- // FileItem firstScreenShot = new FileItem("firstScreenShot.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FirstScreenShot = firstScreenShot;
|
|
|
- // request.ServiceEmail = "example@mail.com";
|
|
|
- // request.LicenseValidDate = "9999-12-31";
|
|
|
- AlipayOpenMiniVersionAuditApplyResponse response = client.Execute(request);
|
|
|
+ request.VersionDesc = ""; //小程序版本描述,30-500个字符。
|
|
|
+ request.AppVersion = ""; //小程序版本号,请选择开发版本执行提交审核操作。
|
|
|
+ AlipayOpenMiniVersionAuditApplyResponse response = client.Execute(request, null, "202306BBdf295279800a428ea07f5574bb73eX31");
|
|
|
result = response.Body;
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
- function.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "支付宝授权报错日志");
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "支付宝小程序提审异常");
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
- #region 小程序退回
|
|
|
+ #region 查询小程序版本状态和详情
|
|
|
|
|
|
- public string MiniProgramBack()
|
|
|
+ public string MiniProgramQuery(string AppVersion)
|
|
|
{
|
|
|
string result = "";
|
|
|
try
|
|
|
{
|
|
|
IAopClient client = new DefaultAopClient("https://openapi.alipay.com/gateway.do", MiniAppId, MiniPrivateKey, "json", "1.0", "RSA2", MiniAlipayPublicKey, "UTF-8", false);
|
|
|
- string imageBase64 = "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAEUlEQVR42mP4TyRgGFVIX4UAI/uOgGWVNeQAAAAASUVORK5CYII=";
|
|
|
- AlipayOpenMiniVersionAuditApplyRequest request = new AlipayOpenMiniVersionAuditApplyRequest();
|
|
|
- // request.AppSlogan = "专注潮流女装20年";
|
|
|
- // FileItem firstLicensePic = new FileItem("firstLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FirstLicensePic = firstLicensePic;
|
|
|
- // FileItem secondScreenShot = new FileItem("secondScreenShot.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.SecondScreenShot = secondScreenShot;
|
|
|
- // FileItem fourthLicensePic = new FileItem("fourthLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FourthLicensePic = fourthLicensePic;
|
|
|
- // request.TestPassword = "12121";
|
|
|
- // List<RegionInfo> serviceRegionInfo = new List<RegionInfo>();
|
|
|
- // RegionInfo serviceRegionInfo0 = new RegionInfo();
|
|
|
- // serviceRegionInfo0.ProvinceName = "浙江省";
|
|
|
- // serviceRegionInfo0.AreaCode = "311100";
|
|
|
- // serviceRegionInfo0.CityCode = "310000";
|
|
|
- // serviceRegionInfo0.ProvinceCode = "310000";
|
|
|
- // serviceRegionInfo0.AreaName = "余杭区";
|
|
|
- // serviceRegionInfo0.CityName = "杭州市";
|
|
|
- // serviceRegionInfo.Add(serviceRegionInfo0);
|
|
|
- // request.ServiceRegionInfo = serviceRegionInfo;
|
|
|
- // FileItem secondSpecialLicensePic = new FileItem("secondSpecialLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.SecondSpecialLicensePic = secondSpecialLicensePic;
|
|
|
- // FileItem thirdSpecialLicensePic = new FileItem("thirdSpecialLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.ThirdSpecialLicensePic = thirdSpecialLicensePic;
|
|
|
- // request.LicenseNo = "licenseNo";
|
|
|
- // FileItem appLogo = new FileItem("appLogo.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.AppLogo = appLogo;
|
|
|
- // FileItem fifthScreenShot = new FileItem("fifthScreenShot.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FifthScreenShot = fifthScreenShot;
|
|
|
- // request.VersionDesc = "本次版本更新优化了3项功能,修复了5个BUG";
|
|
|
- // FileItem testFileName = new FileItem("testFileName.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.TestFileName = testFileName;
|
|
|
- // request.AutoOnline = "true";
|
|
|
- // request.AppVersion = "0.0.1";
|
|
|
- // request.RegionType = "CHINA";
|
|
|
- // FileItem thirdScreenShot = new FileItem("thirdScreenShot.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.ThirdScreenShot = thirdScreenShot;
|
|
|
- // request.Memo = "小程序示例";
|
|
|
- // request.LicenseName = "营业执照名称";
|
|
|
- // FileItem fifthLicensePic = new FileItem("fifthLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FifthLicensePic = fifthLicensePic;
|
|
|
- // FileItem outDoorPic = new FileItem("outDoorPic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.OutDoorPic = outDoorPic;
|
|
|
- // request.MiniCategoryIds = "XS1001_XS2001_XS3002;XS1011_XS2089;XS1002_XS2008_XS3024";
|
|
|
- // FileItem secondLicensePic = new FileItem("secondLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.SecondLicensePic = secondLicensePic;
|
|
|
- // request.AppName = "杭州支小宝潮流女装店";
|
|
|
- // request.TestAccout = "12122";
|
|
|
- // request.BundleId = "com.alipay.alipaywallet";
|
|
|
- // request.ServicePhone = "13110101010";
|
|
|
- // FileItem firstSpecialLicensePic = new FileItem("firstSpecialLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FirstSpecialLicensePic = firstSpecialLicensePic;
|
|
|
- // FileItem thirdLicensePic = new FileItem("thirdLicensePic.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.ThirdLicensePic = thirdLicensePic;
|
|
|
- // request.SpeedUp = "true";
|
|
|
- // FileItem fourthScreenShot = new FileItem("fourthScreenShot.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FourthScreenShot = fourthScreenShot;
|
|
|
- // request.AppDesc = "一家专注做潮流女装的店铺,带给消费者价格便宜、质量上乘的衣服";
|
|
|
- // request.AuditRule = "BASE_PROMOTE";
|
|
|
- // FileItem firstScreenShot = new FileItem("firstScreenShot.jpg",Convert.FromBase64String(imageBase64));
|
|
|
- // request.FirstScreenShot = firstScreenShot;
|
|
|
- // request.ServiceEmail = "example@mail.com";
|
|
|
- // request.LicenseValidDate = "9999-12-31";
|
|
|
- AlipayOpenMiniVersionAuditApplyResponse response = client.Execute(request);
|
|
|
+ AlipayOpenMiniVersionDetailQueryRequest request = new AlipayOpenMiniVersionDetailQueryRequest();
|
|
|
+ request.BizContent = "{" +
|
|
|
+ "\"app_version\":\"" + AppVersion + "\"" +
|
|
|
+ "}" +
|
|
|
+ "}";
|
|
|
+ AlipayOpenMiniVersionDetailQueryResponse response = client.Execute(request, null, "202306BBdf295279800a428ea07f5574bb73eX31");
|
|
|
result = response.Body;
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
- function.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "支付宝授权报错日志");
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "查询小程序版本状态和详情异常");
|
|
|
}
|
|
|
return result;
|
|
|
}
|