public class WechatMpClient extends Object implements WechatMpApi
cgi_bin_ticket_getticket, cgibin_add_template, cgibin_get_industry, cgibin_send_data, cgibin_set_industry, cgibin_token, oauth2_access_token, oauth2_refresh_token, sns_auth_token, sns_userinfo| 构造器和说明 |
|---|
WechatMpClient() |
public static MpOauthTokenResponse obtainOauthAccessToken(Map<String,Object> mapToken) throws Exception
WechatMpCore.obtainOauthAccessToken(java.util.Map<java.lang.String, java.lang.Object>)mapToken - the map tokenException - the exceptionpublic static MpOauthTokenResponse obtainOauthAccessToken(MpObtainOauthTokenRequest request) throws Exception
WechatMpCore.obtainOauthAccessToken(java.util.Map<java.lang.String, java.lang.Object>)request - the requestException - the exceptionpublic static MpOauthTokenResponse refreshOauthAccessToken(Map<String,Object> mapToken) throws Exception
WechatMpCore.refreshOauthAccessToken(java.util.Map<java.lang.String, java.lang.Object>)mapToken - the map tokenException - the exceptionpublic static MpOauthTokenResponse refreshOauthAccessToken(MpRefreshOauthTokenRequest request) throws Exception
WechatMpCore.refreshOauthAccessToken(java.util.Map<java.lang.String, java.lang.Object>)request - the requestException - the exceptionpublic static String generateWechatUrl(String appId, AuthorizeType scope, String callback, String bizData) throws Exception
WechatMpCore.generateWechatUrl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)appId - the app idscope - the scopecallback - the callbackbizData - the biz dataException - the exceptionpublic static MpUserInfoResponse obtainUserInfo(Map<String,Object> userInfoMap) throws Exception
userInfoMap - the user info mapException - the exceptionpublic static MpUserInfoResponse obtainUserInfo(MpUserInfoRequest request) throws Exception
request - the requestException - the exceptionpublic static boolean isvalidOauthAccessToken(Map<String,Object> mapToken) throws Exception
WechatMpCore.isvalidOauthAccessToken(java.util.Map<java.lang.String, java.lang.Object>)mapToken - the map tokenException - the exceptionpublic static boolean isvalidOauthAccessToken(MpValidOauthTokenRequest request) throws Exception
WechatMpCore.isvalidOauthAccessToken(java.util.Map<java.lang.String, java.lang.Object>)request - the requestException - the exceptionpublic static MpTokenResponse obtainAccessToken(String appid, String secret) throws Exception
WechatMpCore.obtainAccessToken(java.lang.String, java.lang.String)appid - the appidsecret - the secretException - the exceptionpublic static MpJsApiTicketResponse obtainJsApiTicket(String token) throws Exception
WechatMpCore.obtainJsApiTicket(java.lang.String)token - 普通tokenException - the exceptionpublic static MpJsApiTicketResponse obtainJsApiTicket(String appid, String secret) throws Exception
WechatMpCore.obtainJsApiTicket(java.lang.String)appid - the appidsecret - the secretException - the exceptionpublic static MpTemplateResponse obtainTemplateId(String access_token, String template_id_short) throws Exception
access_token - the access tokentemplate_id_short - the template id shortException - the exceptionpublic static MpSetIndustryResponse setupIndustry(String access_token, String industry_id1, String industry_id2) throws Exception
access_token - the access tokenindustry_id1 - the industry id 1industry_id2 - the industry id 2Exception - the exceptionpublic static MpGetIndustryResponse getIndustry(String accessToken) throws Exception
accessToken - the access tokenException - the exceptionpublic static MpSendDataResponse sendMsgToUser(String access_token, String data) throws Exception
WechatMpCore.sendMsgToUser(java.lang.String, java.lang.String)access_token - the access tokendata - json格式数据,是 MpSendDataRequest JSONException - the exceptionpublic static boolean isFromWechat(javax.servlet.http.HttpServletRequest request)
request - the requestCopyright © 2019. All rights reserved.