Commit d0f18715 by chongli

微信退款回调接口

parent 663dc2bd
......@@ -115,13 +115,15 @@ public class NotifyController {
return null;
}
/**
* 微信退款通知
*
* @param createPayOrderRequestBean CreatePayOrderRequestBean
*/
@RequestMapping(value = "/weiXinRefoundNotifyUrl", produces = "application/json;charset=UTF-8")
@ResponseBody
public String weiXinRefoundNotifyUrl(HttpServletRequest request,HttpServletResponse response) throws Exception{
@RequestMapping(value = "/weiXinRefoundNotifyUrl", method = RequestMethod.POST)
public Object weiXinRefoundNotifyUrl(HttpServletRequest request,HttpServletResponse response) throws Exception{
BufferedReader reader = null;
reader = request.getReader();
String line = "";
......@@ -133,7 +135,7 @@ public class NotifyController {
}
xmlString = inputString.toString();
request.getReader().close();
this.notifyService.weiXinRefoundNotifyUrl(xmlString);
this.notifyService.weiXinRefoundNotifyUrl(xmlString);
response.getWriter().write("<xml><return_code><![CDATA[SUCCESS]]></return_code></xml>");
return null;
}
......
......@@ -77,7 +77,7 @@ public class NotifyService {
*/
public String weiXinRefoundNotifyUrl(String xml) {
HttpEntity<String> entity = new HttpEntity<String>(xml);
String response = restTemplate.exchange(this.getServerBaseNotifyPath()+"/weiXinRefoundNotifyUrl", HttpMethod.POST, entity, new ParameterizedTypeReference<String>() {
String response = restTemplate.exchange(this.getServerBaseNotifyPath()+"/eventActivityOrder/weiXinRefoundNotifyUrl", HttpMethod.POST, entity, new ParameterizedTypeReference<String>() {
}).getBody();
return null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment