public class WeChatMP extends Object
| Constructor and Description |
|---|
WeChatMP(WeChatMPConfig config,
WeChatMPEventHandler eventHandler,
WeChatMPHttpClient httpClient,
WeChatMPAccessTokenStorage atStorage) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAccessToken() |
ReplyXMLFormat |
incomingMessage(String signature,
int timestamp,
String nonce,
String encryptType,
String msgSignature,
String body)
Call this method when you have a incoming request.
|
<T extends PushJSONFormat> |
pushMessage(T message)
Push message to WeChat platform.
|
String |
validate(String signature,
String echostr,
int timestamp,
String nonce)
Call this method when you have incoming validate request.
It is usually GET request for your endpoint. |
public WeChatMP(WeChatMPConfig config, WeChatMPEventHandler eventHandler, WeChatMPHttpClient httpClient, WeChatMPAccessTokenStorage atStorage)
public String validate(String signature, String echostr, int timestamp, String nonce)
signature - echostr - timestamp - nonce - public ReplyXMLFormat incomingMessage(String signature, int timestamp, String nonce, String encryptType, String msgSignature, String body)
signature - From request query string 'signature'timestamp - From request query string 'timestamp'nonce - From request query string 'nonce'encryptType - From request query string 'encrypt_type'msgSignature - From request query string 'msg_signature'body - From request bodyWeChatException - When there is underlying exception thrown, public String getAccessToken()
public <T extends PushJSONFormat> void pushMessage(T message)
message - Copyright © 2014. All rights reserved.