| | |
| | | import cc.mrbird.febs.common.properties.XcxProperties; |
| | | import cc.mrbird.febs.common.utils.SpringContextHolder; |
| | | import cc.mrbird.febs.pay.util.WechatEventUtil; |
| | | import cc.mrbird.febs.pay.util.WeixinServiceUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | private final String wechatToken = "ywgpzfwh"; |
| | | |
| | | |
| | | @Autowired |
| | | WechatEventUtil wechatEventUtil; |
| | | |
| | | /** |
| | | * 服务器校验 |
| | | * @param req 请求 |
| | |
| | | */ |
| | | @GetMapping("/event") |
| | | public String verification(HttpServletRequest req) { |
| | | return WechatEventUtil.verification(req, wechatToken); |
| | | return wechatEventUtil.verification(req, wechatToken); |
| | | } |
| | | |
| | | /** |
| | |
| | | String message = "success"; |
| | | PrintWriter out = resp.getWriter(); |
| | | try { |
| | | String messageEvent = WechatEventUtil.messageEvent(req); |
| | | String messageEvent = wechatEventUtil.messageEvent(req); |
| | | if(messageEvent != null) { |
| | | message = messageEvent; |
| | | } |