public class WechatUtil extends Object
| 构造器和说明 |
|---|
WechatUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Object |
buildRequest(Object o,
Class clz,
String apiKey)
Build request object.
|
static String |
buildXmlRequest(Object o,
Class clz,
String apiKey)
Build xml request string.
|
static void |
h5_pay(javax.servlet.http.HttpServletRequest request,
UnifiedOrderResponse response,
String outTradeNo,
String apiKey)
微信 H5 公众号支付,数据处理(存入request,返回jsp页面时用于发起H5支付)
|
static NotifyResponse |
parseNotifyMsg(String xmlResult)
微信支付异步通知结果解析为Object
|
static String |
sign(Map<String,Object> params,
String key)
sign wechat request data
|
public static String sign(Map<String,Object> params, String key)
params - the paramskey - the keypublic static NotifyResponse parseNotifyMsg(String xmlResult) throws JAXBException
xmlResult - the xml resultJAXBException - the jaxb exceptionpublic static Object buildRequest(Object o, Class clz, String apiKey)
o - the oclz - the clzapiKey - the api keypublic static String buildXmlRequest(Object o, Class clz, String apiKey) throws JAXBException
o - the oclz - the clzapiKey - the api keyJAXBException - the jaxb exceptionpublic static void h5_pay(javax.servlet.http.HttpServletRequest request,
UnifiedOrderResponse response,
String outTradeNo,
String apiKey)
request - the requestresponse - the responseoutTradeNo - the out trade noapiKey - the api keyCopyright © 2018. All rights reserved.