| @@ -25,15 +25,10 @@ public class WechatCalllbackController extends BaseController { | |||||
| protected WxOpenService wxOpenService; | protected WxOpenService wxOpenService; | ||||
| @RequestMapping("/notify") | @RequestMapping("/notify") | ||||
| public Object receiveTicket(HttpServletRequest request) throws IOException { | |||||
| logger.info("[" +getIpAddr() + "]接收微信请求"); | |||||
| InputStream inStream = request.getInputStream(); | |||||
| byte[] buffer = new byte[1024]; | |||||
| int len = 0; | |||||
| while ((len = inStream.read(buffer)) != -1) { | |||||
| logger.debug(buffer.toString()); | |||||
| } | |||||
| /* | |||||
| public Object receiveTicket(@RequestBody(required = false) String requestBody, @RequestParam("timestamp") String timestamp, | |||||
| @RequestParam("nonce") String nonce, @RequestParam("signature") String signature, | |||||
| @RequestParam(name = "encrypt_type", required = false) String encType, | |||||
| @RequestParam(name = "msg_signature", required = false) String msgSignature) { | |||||
| logger.info( | logger.info( | ||||
| "\n接收微信请求:[signature=[{}], encType=[{}], msgSignature=[{}]," | "\n接收微信请求:[signature=[{}], encType=[{}], msgSignature=[{}]," | ||||
| + " timestamp=[{}], nonce=[{}], requestBody=[\n{}\n] ", | + " timestamp=[{}], nonce=[{}], requestBody=[\n{}\n] ", | ||||
| @@ -54,12 +49,11 @@ public class WechatCalllbackController extends BaseController { | |||||
| } catch (WxErrorException e) { | } catch (WxErrorException e) { | ||||
| this.logger.error("notify", e); | this.logger.error("notify", e); | ||||
| } | } | ||||
| */ | |||||
| return "success"; | return "success"; | ||||
| } | } | ||||
| @RequestMapping("callback/{appId}") | |||||
| @RequestMapping("/{appId}/callback") | |||||
| public Object callback(@RequestBody(required = false) String requestBody, | public Object callback(@RequestBody(required = false) String requestBody, | ||||
| @PathVariable("appId") String appId, | @PathVariable("appId") String appId, | ||||
| @RequestParam("signature") String signature, | @RequestParam("signature") String signature, | ||||