|
@@ -59,6 +59,21 @@ public class PayController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @RequestMapping(value = "/wechat_js", method = RequestMethod.POST)
|
|
|
+ @ApiOperation(value = "微信公众号支付", httpMethod = "POST")
|
|
|
+ public void wechatJs(HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ try {
|
|
|
+ ResultInfo info = tradeService.notifyPay(PayChannel.WECHAT_JS, request);
|
|
|
+ logger.debug(JSON.toJSONString(info));
|
|
|
+ Pay pay = payService.getByNo(info.getNo());
|
|
|
+ response.getWriter().write(tradeService.server(pay, info));
|
|
|
+ }catch (InsideException e){
|
|
|
+ logger.error(e.getMessage());
|
|
|
+ }catch (Exception e){
|
|
|
+ logger.error(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@RequestMapping("/return/wechat_qr")
|
|
|
@ResponseBody
|
|
|
public Response<Pay> wechatQrReturn(@RequestBody String content){
|