Search in sources :

Example 1 with WxMpPayCallback

use of me.chanjar.weixin.mp.bean.result.WxMpPayCallback in project weixin-java-tools by chanjarster.

the class WxMpServiceImpl method getJSSDKCallbackData.

@Override
public WxMpPayCallback getJSSDKCallbackData(String xmlData) {
    try {
        XStream xstream = XStreamInitializer.getInstance();
        xstream.alias("xml", WxMpPayCallback.class);
        WxMpPayCallback wxMpCallback = (WxMpPayCallback) xstream.fromXML(xmlData);
        return wxMpCallback;
    } catch (Exception e) {
        e.printStackTrace();
    }
    return new WxMpPayCallback();
}
Also used : XStream(com.thoughtworks.xstream.XStream) WxMpPayCallback(me.chanjar.weixin.mp.bean.result.WxMpPayCallback) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) ClientProtocolException(org.apache.http.client.ClientProtocolException) IOException(java.io.IOException) WxErrorException(me.chanjar.weixin.common.exception.WxErrorException)

Aggregations

XStream (com.thoughtworks.xstream.XStream)1 IOException (java.io.IOException)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1 WxErrorException (me.chanjar.weixin.common.exception.WxErrorException)1 WxMpPayCallback (me.chanjar.weixin.mp.bean.result.WxMpPayCallback)1 ClientProtocolException (org.apache.http.client.ClientProtocolException)1