AlipayOpenAgentCommonSignRequest.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. using System;
  2. using System.Collections.Generic;
  3. using Aop.Api.Response;
  4. using Aop.Api.Util;
  5. namespace Aop.Api.Request
  6. {
  7. /// <summary>
  8. /// AOP API: alipay.open.agent.common.sign
  9. /// </summary>
  10. public class AlipayOpenAgentCommonSignRequest : IAopUploadRequest<AlipayOpenAgentCommonSignResponse>
  11. {
  12. /// <summary>
  13. /// 支付宝生活号(原服务窗)名称(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
  14. /// </summary>
  15. public string AlipayLifeName { get; set; }
  16. /// <summary>
  17. /// APP demo,格式为.apk;或者应用说明文档, 格式为.doc .docx .pdf格式(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
  18. /// </summary>
  19. public FileItem AppDemo { get; set; }
  20. /// <summary>
  21. /// 商户的APP应用名称(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
  22. /// </summary>
  23. public string AppName { get; set; }
  24. /// <summary>
  25. /// 代商户操作事务编号,通过alipay.open.agent.create接口进行创建。
  26. /// </summary>
  27. public string BatchNo { get; set; }
  28. /// <summary>
  29. /// 营业执照授权函图片,个体工商户如果使用总公司或其他公司的营业执照认证需上传该授权函图片,最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg
  30. /// </summary>
  31. public FileItem BusinessLicenseAuthPic { get; set; }
  32. /// <summary>
  33. /// 营业执照号码
  34. /// </summary>
  35. public string BusinessLicenseNo { get; set; }
  36. /// <summary>
  37. /// 营业执照图片。被代创建商户运营主体为个人账户必填,企业账户无需填写。图片最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg。
  38. /// </summary>
  39. public FileItem BusinessLicensePic { get; set; }
  40. /// <summary>
  41. /// 营业期限
  42. /// </summary>
  43. public string DateLimitation { get; set; }
  44. /// <summary>
  45. /// 营业期限是否长期有效
  46. /// </summary>
  47. public Nullable<bool> LongTerm { get; set; }
  48. /// <summary>
  49. /// <a href="https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.59bgD2&treeId=222&articleId=105364&docType=1#s1">商家经营类目</a> 中的“经营类目编码”
  50. /// </summary>
  51. public string MccCode { get; set; }
  52. /// <summary>
  53. /// isv要代商户签约产品码,产品码是支付宝内部对产品的唯一标识
  54. /// </summary>
  55. public string ProductCode { get; set; }
  56. /// <summary>
  57. /// 店铺内景图片,最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg。
  58. /// </summary>
  59. public FileItem ShopScenePic { get; set; }
  60. /// <summary>
  61. /// 店铺门头照图片,最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg。
  62. /// </summary>
  63. public FileItem ShopSignBoardPic { get; set; }
  64. /// <summary>
  65. /// 企业特殊资质图片,可参考 <a href="https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.59bgD2&treeId=222&articleId=105364&docType=1#s1">商家经营类目</a> 中的“需要的特殊资质证书”。文件最小为 5KB,最大为5M,图片格式必须为:png、bmp、gif、jpg、jpeg。
  66. /// </summary>
  67. public FileItem SpecialLicensePic { get; set; }
  68. /// <summary>
  69. /// 网站首页截图,最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg
  70. /// </summary>
  71. public FileItem WebHomeScreenshot { get; set; }
  72. /// <summary>
  73. /// 网站商品页截图,最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg
  74. /// </summary>
  75. public FileItem WebItemScreenshot { get; set; }
  76. /// <summary>
  77. /// 网站支付页截图,最小5KB,最大5M,图片格式必须为:png、bmp、gif、jpg、jpeg
  78. /// </summary>
  79. public FileItem WebPayScreenshot { get; set; }
  80. /// <summary>
  81. /// 接入网址信息(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
  82. /// </summary>
  83. public List<string> WebSites { get; set; }
  84. /// <summary>
  85. /// 接入网址的授权涵,格式为.doc .docx .pdf格式
  86. /// </summary>
  87. public FileItem WebSitesLoa { get; set; }
  88. /// <summary>
  89. /// 网站状态,枚举值为:已上线,未上线
  90. /// </summary>
  91. public string WebStatus { get; set; }
  92. /// <summary>
  93. /// 可以登录此网站的测试账户
  94. /// </summary>
  95. public string WebTestAccount { get; set; }
  96. /// <summary>
  97. /// 可以登录此网站的账户的密码。对应web_test_account的登录密码
  98. /// </summary>
  99. public string WebTestAccountPassword { get; set; }
  100. /// <summary>
  101. /// 微信公众号名称(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
  102. /// </summary>
  103. public string WechatOfficialAccountName { get; set; }
  104. #region IAopRequest Members
  105. private bool needEncrypt=false;
  106. private string apiVersion = "1.0";
  107. private string terminalType;
  108. private string terminalInfo;
  109. private string prodCode;
  110. private string notifyUrl;
  111. private string returnUrl;
  112. private AopObject bizModel;
  113. private Dictionary<string, string> udfParams; //add user-defined text parameters
  114. public void SetNeedEncrypt(bool needEncrypt){
  115. this.needEncrypt=needEncrypt;
  116. }
  117. public bool GetNeedEncrypt(){
  118. return this.needEncrypt;
  119. }
  120. public void SetNotifyUrl(string notifyUrl){
  121. this.notifyUrl = notifyUrl;
  122. }
  123. public string GetNotifyUrl(){
  124. return this.notifyUrl;
  125. }
  126. public void SetReturnUrl(string returnUrl){
  127. this.returnUrl = returnUrl;
  128. }
  129. public string GetReturnUrl(){
  130. return this.returnUrl;
  131. }
  132. public void SetTerminalType(String terminalType){
  133. this.terminalType=terminalType;
  134. }
  135. public string GetTerminalType(){
  136. return this.terminalType;
  137. }
  138. public void SetTerminalInfo(String terminalInfo){
  139. this.terminalInfo=terminalInfo;
  140. }
  141. public string GetTerminalInfo(){
  142. return this.terminalInfo;
  143. }
  144. public void SetProdCode(String prodCode){
  145. this.prodCode=prodCode;
  146. }
  147. public string GetProdCode(){
  148. return this.prodCode;
  149. }
  150. public void SetApiVersion(string apiVersion){
  151. this.apiVersion=apiVersion;
  152. }
  153. public string GetApiVersion(){
  154. return this.apiVersion;
  155. }
  156. public string GetApiName()
  157. {
  158. return "alipay.open.agent.common.sign";
  159. }
  160. public void PutOtherTextParam(string key, string value)
  161. {
  162. if(this.udfParams == null)
  163. {
  164. this.udfParams = new Dictionary<string, string>();
  165. }
  166. this.udfParams.Add(key, value);
  167. }
  168. public IDictionary<string, string> GetParameters()
  169. {
  170. AopDictionary parameters = new AopDictionary();
  171. parameters.Add("alipay_life_name", this.AlipayLifeName);
  172. parameters.Add("app_name", this.AppName);
  173. parameters.Add("batch_no", this.BatchNo);
  174. parameters.Add("business_license_no", this.BusinessLicenseNo);
  175. parameters.Add("date_limitation", this.DateLimitation);
  176. parameters.Add("long_term", this.LongTerm);
  177. parameters.Add("mcc_code", this.MccCode);
  178. parameters.Add("product_code", this.ProductCode);
  179. parameters.Add("web_sites", this.WebSites);
  180. parameters.Add("web_status", this.WebStatus);
  181. parameters.Add("web_test_account", this.WebTestAccount);
  182. parameters.Add("web_test_account_password", this.WebTestAccountPassword);
  183. parameters.Add("wechat_official_account_name", this.WechatOfficialAccountName);
  184. if(udfParams != null)
  185. {
  186. foreach (string key in this.udfParams.Keys)
  187. {
  188. parameters.Add(key, this.udfParams[key]);
  189. }
  190. }
  191. return parameters;
  192. }
  193. public AopObject GetBizModel()
  194. {
  195. return this.bizModel;
  196. }
  197. public void SetBizModel(AopObject bizModel)
  198. {
  199. this.bizModel = bizModel;
  200. }
  201. #endregion
  202. #region IAopUploadRequest Members
  203. public IDictionary<string, FileItem> GetFileParameters()
  204. {
  205. IDictionary<string, FileItem> parameters = new Dictionary<string, FileItem>();
  206. parameters.Add("app_demo", this.AppDemo);
  207. parameters.Add("business_license_auth_pic", this.BusinessLicenseAuthPic);
  208. parameters.Add("business_license_pic", this.BusinessLicensePic);
  209. parameters.Add("shop_scene_pic", this.ShopScenePic);
  210. parameters.Add("shop_sign_board_pic", this.ShopSignBoardPic);
  211. parameters.Add("special_license_pic", this.SpecialLicensePic);
  212. parameters.Add("web_home_screenshot", this.WebHomeScreenshot);
  213. parameters.Add("web_item_screenshot", this.WebItemScreenshot);
  214. parameters.Add("web_pay_screenshot", this.WebPayScreenshot);
  215. parameters.Add("web_sites_loa", this.WebSitesLoa);
  216. return parameters;
  217. }
  218. #endregion
  219. }
  220. }