using System; using Aop.Api.Domain; using System.Collections.Generic; using Aop.Api.Response; using Aop.Api.Util; namespace Aop.Api.Request { /// /// AOP API: alipay.open.agent.facetoface.sign /// public class AlipayOpenAgentFacetofaceSignRequest : IAopUploadRequest { /// /// 代商户操作事务编号,通过https://opendocs.alipay.com/apis/api_50/alipay.open.agent.create (开启代商户签约、创建应用事务)接口进行事务创建后获取。 /// public string BatchNo { get; set; } /// /// 营业执照授权函图片,个体工商户如果使用总公司或其他公司的营业执照认证需上传该授权函图片,最小5KB,最大5M(暂不限制图片宽高),图片格式必须为:png、bmp、gif、jpg、jpeg /// public FileItem BusinessLicenseAuthPic { get; set; } /// /// 被邀请授权的营业执照法人手机号码,上传非同人营业执照时必填 /// public string BusinessLicenseMobile { get; set; } /// /// 营业执照号码 /// public string BusinessLicenseNo { get; set; } /// /// 营业执照图片。被代创建商户运营主体为个人账户必填,企业账户无需填写,最小5KB,最大5M(暂不限制图片宽高),图片格式必须为:png、bmp、gif、jpg、jpeg /// public FileItem BusinessLicensePic { get; set; } /// /// 营业期限 /// public string DateLimitation { get; set; } /// /// 营业期限是否长期有效 /// public Nullable LongTerm { get; set; } /// /// 商家经营类目编码。参见 商家经营类目2.0 中的“一级类目code_二级类目code”。 /// public string MccCode { get; set; } /// /// 服务费率(%),0.38~0.6 之间(小数点后两位,可取0.38%及0.6%)。 当签约且授权标识 sign_and_auth=true 时,该费率信息必填。 /// public string Rate { get; set; } /// /// 店铺地址 /// public SignAddressInfo ShopAddress { get; set; } /// /// 店铺名称 /// public string ShopName { get; set; } /// /// 店铺内景图片,最小5KB,最大5M(暂不限制图片宽高),图片格式必须为:png、bmp、gif、jpg、jpeg /// public FileItem ShopScenePic { get; set; } /// /// 店铺门头照图片,最小5KB,最大5M(暂不限制图片宽高),图片格式必须为:png、bmp、gif、jpg、jpeg /// public FileItem ShopSignBoardPic { get; set; } /// /// 签约且授权标识,默认为false,只进行签约操作; 如果设置为true,则表示签约成功后,会自动进行应用授权操作。 /// public Nullable SignAndAuth { get; set; } /// /// 企业特殊资质图片,当mcc_code为需要特殊资质类目时必填。可参考 商家经营类目 中的“所需资质”,最小5KB ,最大5M(暂不限制图片宽高),图片格式必须为:png、bmp、gif、jpg、jpeg /// public FileItem SpecialLicensePic { get; set; } #region IAopRequest Members private bool needEncrypt=false; private string apiVersion = "1.0"; private string terminalType; private string terminalInfo; private string prodCode; private string notifyUrl; private string returnUrl; private AopObject bizModel; private Dictionary udfParams; //add user-defined text parameters public void SetNeedEncrypt(bool needEncrypt){ this.needEncrypt=needEncrypt; } public bool GetNeedEncrypt(){ return this.needEncrypt; } public void SetNotifyUrl(string notifyUrl){ this.notifyUrl = notifyUrl; } public string GetNotifyUrl(){ return this.notifyUrl; } public void SetReturnUrl(string returnUrl){ this.returnUrl = returnUrl; } public string GetReturnUrl(){ return this.returnUrl; } public void SetTerminalType(String terminalType){ this.terminalType=terminalType; } public string GetTerminalType(){ return this.terminalType; } public void SetTerminalInfo(String terminalInfo){ this.terminalInfo=terminalInfo; } public string GetTerminalInfo(){ return this.terminalInfo; } public void SetProdCode(String prodCode){ this.prodCode=prodCode; } public string GetProdCode(){ return this.prodCode; } public void SetApiVersion(string apiVersion){ this.apiVersion=apiVersion; } public string GetApiVersion(){ return this.apiVersion; } public string GetApiName() { return "alipay.open.agent.facetoface.sign"; } public void PutOtherTextParam(string key, string value) { if(this.udfParams == null) { this.udfParams = new Dictionary(); } this.udfParams.Add(key, value); } public IDictionary GetParameters() { AopDictionary parameters = new AopDictionary(); parameters.Add("batch_no", this.BatchNo); parameters.Add("business_license_mobile", this.BusinessLicenseMobile); parameters.Add("business_license_no", this.BusinessLicenseNo); parameters.Add("date_limitation", this.DateLimitation); parameters.Add("long_term", this.LongTerm); parameters.Add("mcc_code", this.MccCode); parameters.Add("rate", this.Rate); parameters.Add("shop_address", this.ShopAddress); parameters.Add("shop_name", this.ShopName); parameters.Add("sign_and_auth", this.SignAndAuth); if(udfParams != null) { parameters.AddAll(this.udfParams); } return parameters; } public AopObject GetBizModel() { return this.bizModel; } public void SetBizModel(AopObject bizModel) { this.bizModel = bizModel; } #endregion #region IAopUploadRequest Members public IDictionary GetFileParameters() { IDictionary parameters = new Dictionary(); parameters.Add("business_license_auth_pic", this.BusinessLicenseAuthPic); parameters.Add("business_license_pic", this.BusinessLicensePic); parameters.Add("shop_scene_pic", this.ShopScenePic); parameters.Add("shop_sign_board_pic", this.ShopSignBoardPic); parameters.Add("special_license_pic", this.SpecialLicensePic); return parameters; } #endregion } }