配置测试环境支付成功回调
This commit is contained in:
parent
26d9ec6a6c
commit
67910debe4
|
|
@ -1,6 +1,7 @@
|
|||
package com.chaozhanggui.system.cashierservice.controller;
|
||||
|
||||
|
||||
import cn.hutool.extra.servlet.ServletUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.chaozhanggui.system.cashierservice.service.OrderService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
|
|
@ -8,6 +9,7 @@ import com.chaozhanggui.system.cashierservice.sign.Result;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -25,11 +27,12 @@ public class NotifyController {
|
|||
}
|
||||
|
||||
@RequestMapping("notifyPay")
|
||||
public String notifyPay(@RequestParam Map<String,Object> map){
|
||||
log.info("notifyPay:{}", JSON.toJSONString(map));
|
||||
log.error("notifyPay:{}", JSON.toJSONString(map));
|
||||
log.debug("notifyPay:{}", JSON.toJSONString(map));
|
||||
log.warn("notifyPay:{}", JSON.toJSONString(map));
|
||||
public String notifyPay(HttpServletRequest request,@RequestParam Map<String,Object> map){
|
||||
log.info("request ip:{}", request.getRemoteAddr());
|
||||
Map<String, String[]> params = ServletUtil.getParams(request);
|
||||
String body = ServletUtil.getBody(request);
|
||||
log.info("notifyPay params:{}", JSON.toJSONString(params));
|
||||
log.info("notifyPay body:{}", body);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package com.chaozhanggui.system.cashierservice.interceptor;
|
||||
|
||||
import cn.hutool.extra.servlet.ServletUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
|
@ -9,7 +7,6 @@ import javax.servlet.*;
|
|||
import javax.servlet.annotation.WebFilter;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
|
|
@ -23,10 +20,6 @@ public class CustomFilter implements Filter {
|
|||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
||||
log.info(">>>> customFilter doFilter start <<<<");
|
||||
log.info("request ip:{}", servletRequest.getRemoteAddr());
|
||||
Map<String, String[]> params = ServletUtil.getParams(servletRequest);
|
||||
log.info("request params:{}", params);
|
||||
log.info("request params:{}", JSON.toJSONString(params));
|
||||
RequestWrapper requestWapper = null;
|
||||
if (servletRequest instanceof HttpServletRequest) {
|
||||
requestWapper = new RequestWrapper((HttpServletRequest) servletRequest);
|
||||
|
|
|
|||
|
|
@ -49,6 +49,10 @@ public class SignInterceptor implements HandlerInterceptor {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (requestUri.contains("/notify/notifyPay")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (requestUri.contains("/notify/cancel")) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue