mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-10-31 10:38:42 +08:00 
			
		
		
		
	🆕 #3189 【开放平台】增加试用小程序快速认证接口
This commit is contained in:
		| @ -6,6 +6,7 @@ import me.chanjar.weixin.common.error.WxErrorException; | ||||
| import me.chanjar.weixin.open.bean.ma.WxMaPrefetchDomain; | ||||
| import me.chanjar.weixin.open.bean.ma.WxMaScheme; | ||||
| import me.chanjar.weixin.open.bean.message.WxOpenMaSubmitAuditMessage; | ||||
| import me.chanjar.weixin.open.bean.message.WxOpenMaVerifybetaweappMessage; | ||||
| import me.chanjar.weixin.open.bean.result.*; | ||||
|  | ||||
| import java.io.File; | ||||
| @ -113,17 +114,22 @@ public interface WxOpenMaService extends WxMaService { | ||||
|   String API_TEST_QRCODE = "https://api.weixin.qq.com/wxa/get_qrcode"; | ||||
|  | ||||
|   /** | ||||
|    * 3. 获取授权小程序帐号的可选类目 | ||||
|    * 3. 试用小程序快速认证 | ||||
|    */ | ||||
|   String API_VERIFYBETAWEAPP = "https://api.weixin.qq.com/wxa/verifybetaweapp"; | ||||
|  | ||||
|   /** | ||||
|    * 4. 获取授权小程序帐号的可选类目 | ||||
|    */ | ||||
|   String API_GET_CATEGORY = "https://api.weixin.qq.com/wxa/get_category"; | ||||
|  | ||||
|   /** | ||||
|    * 4. 获取小程序的第三方提交代码的页面配置(仅供第三方开发者代小程序调用) | ||||
|    * 5. 获取小程序的第三方提交代码的页面配置(仅供第三方开发者代小程序调用) | ||||
|    */ | ||||
|   String API_GET_PAGE = "https://api.weixin.qq.com/wxa/get_page"; | ||||
|  | ||||
|   /** | ||||
|    * 5. 将第三方提交的代码包提交审核(仅供第三方开发者代小程序调用) | ||||
|    * 6. 将第三方提交的代码包提交审核(仅供第三方开发者代小程序调用) | ||||
|    */ | ||||
|   String API_SUBMIT_AUDIT = "https://api.weixin.qq.com/wxa/submit_audit"; | ||||
|  | ||||
| @ -278,13 +284,14 @@ public interface WxOpenMaService extends WxMaService { | ||||
|   /** | ||||
|    * 修改域名 | ||||
|    * <a href="https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/Mini_Program_Basic_Info/Server_Address_Configuration.html">文档地址</a> | ||||
|    * | ||||
|    * @param action           delete删除, set覆盖, get获取 | ||||
|    * @param requestDomains   request 合法域名;当 action 是 get 时不需要此字段 | ||||
|    * @param wsRequestDomains socket 合法域名;当 action 是 get 时不需要此字段 | ||||
|    * @param uploadDomains    uploadFile 合法域名;当 action 是 get 时不需要此字段 | ||||
|    * @param downloadDomains  downloadFile 合法域名;当 action 是 get 时不需要此字段 | ||||
|    * @param tcpDomains tcp 合法域名;当 action 是 get 时不需要此字段 | ||||
|    * @param udpDomains udp 合法域名;当 action 是 get 时不需要此字段 | ||||
|    * @param tcpDomains       tcp 合法域名;当 action 是 get 时不需要此字段 | ||||
|    * @param udpDomains       udp 合法域名;当 action 是 get 时不需要此字段 | ||||
|    * @return the wx open ma domain result | ||||
|    * @throws WxErrorException the wx error exception | ||||
|    */ | ||||
| @ -441,6 +448,15 @@ public interface WxOpenMaService extends WxMaService { | ||||
|    */ | ||||
|   File getTestQrcode(String pagePath, Map<String, String> params) throws WxErrorException; | ||||
|  | ||||
|   /** | ||||
|    * 试用小程序快速认证 | ||||
|    * | ||||
|    * @param verifybetaweappMessage the verify mini program message | ||||
|    * @return the wx open result | ||||
|    * @throws WxErrorException the wx error exception | ||||
|    */ | ||||
|   WxOpenResult verifybetaweapp(WxOpenMaVerifybetaweappMessage verifybetaweappMessage) throws WxErrorException; | ||||
|  | ||||
|   /** | ||||
|    * 获取授权小程序帐号的可选类目 | ||||
|    * <p> | ||||
| @ -689,6 +705,7 @@ public interface WxOpenMaService extends WxMaService { | ||||
|  | ||||
|   /** | ||||
|    * 购物订单 | ||||
|    * | ||||
|    * @return 购物订单服务 | ||||
|    */ | ||||
|   WxOpenMaShoppingOrdersService getShoppingOrdersService(); | ||||
|  | ||||
| @ -18,6 +18,7 @@ import me.chanjar.weixin.open.bean.ma.WxMaPrefetchDomain; | ||||
| import me.chanjar.weixin.open.bean.ma.WxMaQrcodeParam; | ||||
| import me.chanjar.weixin.open.bean.ma.WxMaScheme; | ||||
| import me.chanjar.weixin.open.bean.message.WxOpenMaSubmitAuditMessage; | ||||
| import me.chanjar.weixin.open.bean.message.WxOpenMaVerifybetaweappMessage; | ||||
| import me.chanjar.weixin.open.bean.result.*; | ||||
| import me.chanjar.weixin.open.executor.MaQrCodeRequestExecutor; | ||||
|  | ||||
| @ -218,6 +219,12 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ | ||||
|     return wxMaService.execute(MaQrCodeRequestExecutor.create(getRequestHttp()), API_TEST_QRCODE, qrcodeParam); | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public WxOpenResult verifybetaweapp(WxOpenMaVerifybetaweappMessage verifybetaweappMessage) throws WxErrorException { | ||||
|     String response = post(API_VERIFYBETAWEAPP, GSON.toJson(verifybetaweappMessage)); | ||||
|     return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class); | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public WxOpenMaCategoryListResult getCategoryList() throws WxErrorException { | ||||
|     String response = get(API_GET_CATEGORY, null); | ||||
|  | ||||
| @ -0,0 +1,57 @@ | ||||
| package me.chanjar.weixin.open.bean.ma; | ||||
|  | ||||
| import com.google.gson.annotations.SerializedName; | ||||
| import lombok.Data; | ||||
|  | ||||
| import java.io.Serializable; | ||||
|  | ||||
| /** | ||||
|  * 企业法人认证需要的信息 | ||||
|  * | ||||
|  * @author lg | ||||
|  * created on  2023/12/19 | ||||
|  */ | ||||
| @Data | ||||
| public class WxMaVerifybetaweappVerifyInfo implements Serializable { | ||||
|  | ||||
|   /** | ||||
|    * 企业名(需与工商部门登记信息一致);如果是“无主体名称个体工商户”则填“个体户+法人姓名”,例如“个体户张三” | ||||
|    */ | ||||
|   @SerializedName("enterprise_name") | ||||
|   private String enterpriseName; | ||||
|  | ||||
|   /** | ||||
|    * 企业代码 | ||||
|    */ | ||||
|   private String code; | ||||
|  | ||||
|   /** | ||||
|    * 企业代码类型 1:统一社会信用代码(18 位) 2:组织机构代码(9 位 xxxxxxxx-x) 3:营业执照注册号(15 位) | ||||
|    */ | ||||
|   @SerializedName("code_type") | ||||
|   private String codeType; | ||||
|  | ||||
|   /** | ||||
|    * 法人微信号 | ||||
|    */ | ||||
|   @SerializedName("legal_persona_wechat") | ||||
|   private String legalPersonaWechat; | ||||
|  | ||||
|   /** | ||||
|    * 法人姓名(绑定银行卡) | ||||
|    */ | ||||
|   @SerializedName("legal_persona_name") | ||||
|   private String legalPersonaName; | ||||
|  | ||||
|   /** | ||||
|    * 第三方联系电话 | ||||
|    */ | ||||
|   @SerializedName("component_phone") | ||||
|   private String componentPhone; | ||||
|  | ||||
|   /** | ||||
|    * 法人身份证号 | ||||
|    */ | ||||
|   @SerializedName("legal_persona_idcard") | ||||
|   private String legalPersonaIdcard; | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| package me.chanjar.weixin.open.bean.message; | ||||
|  | ||||
| import com.google.gson.annotations.SerializedName; | ||||
| import lombok.Data; | ||||
| import me.chanjar.weixin.open.bean.ma.WxMaVerifybetaweappVerifyInfo; | ||||
|  | ||||
| import java.io.Serializable; | ||||
|  | ||||
| /** | ||||
|  * 试用小程序快速认证(仅供第三方开发者代小程序调用) | ||||
|  * | ||||
|  * @author yqx | ||||
|  * created on  2018/9/13 | ||||
|  */ | ||||
| @Data | ||||
| public class WxOpenMaVerifybetaweappMessage implements Serializable { | ||||
|   private static final long serialVersionUID = 4595618023108631478L; | ||||
|  | ||||
|   /** | ||||
|    * 企业法人认证需要的信息 | ||||
|    */ | ||||
|   @SerializedName("verify_info") | ||||
|   private WxMaVerifybetaweappVerifyInfo verifyInfo; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 lemos
					lemos