|
@@ -23,12 +23,12 @@ namespace MySystem
|
|
|
#region 代商家签约
|
|
|
|
|
|
|
|
|
- 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();
|
|
|
+ AlipayOpenAgentFacetofaceSignRequest request= new AlipayOpenAgentFacetofaceSignRequest() ;
|
|
|
request.BatchNo = BatchNo;
|
|
|
- request.MccCode = MccCode;
|
|
|
- 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";
|
|
|
- request.AppName = "客小爽";
|
|
|
-
|
|
|
-
|
|
|
- List<string> WebSites = new List<string>();
|
|
|
- WebSites.Add("http://www.kexiaoshuang.com/");
|
|
|
- request.WebSites = WebSites;
|
|
|
- request.AlipayLifeName = "客小爽";
|
|
|
- request.WechatOfficialAccountName = "客小爽";
|
|
|
-
|
|
|
-
|
|
|
- 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);
|
|
|
+ AlipayOpenAgentFacetofaceSignResponse response = client.Execute(request);
|
|
|
result = response.Body;
|
|
|
function.WriteLog(result, "代商家发起签约产品申请");
|
|
|
-
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
@@ -165,6 +259,7 @@ namespace MySystem
|
|
|
result = "";
|
|
|
}
|
|
|
return result;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
#endregion
|