Commit d1e7ea1b by chongli

小程序订场退款回调

parent f66cd9f1
......@@ -122,8 +122,8 @@ public class NotifyController {
* @param createPayOrderRequestBean CreatePayOrderRequestBean
*/
@ResponseBody
@RequestMapping(value = "/weiXinRefoundNotifyUrl", method = RequestMethod.POST)
public Object weiXinRefoundNotifyUrl(HttpServletRequest request,HttpServletResponse response) throws Exception{
@RequestMapping(value = "/{orderType}/weiXinRefoundNotifyUrl", method = RequestMethod.POST)
public Object weiXinRefoundNotifyUrl(HttpServletRequest request,HttpServletResponse response,@PathVariable String orderType) throws Exception{
BufferedReader reader = null;
reader = request.getReader();
String line = "";
......@@ -135,7 +135,7 @@ public class NotifyController {
}
xmlString = inputString.toString();
request.getReader().close();
this.notifyService.weiXinRefoundNotifyUrl(xmlString);
this.notifyService.weiXinRefoundNotifyUrl(xmlString,orderType);
response.getWriter().write("<xml><return_code><![CDATA[SUCCESS]]></return_code></xml>");
return null;
}
......
......@@ -75,9 +75,9 @@ public class NotifyService {
* @param paymentResponse
* @return
*/
public String weiXinRefoundNotifyUrl(String xml) {
public String weiXinRefoundNotifyUrl(String xml,String orderType) {
HttpEntity<String> entity = new HttpEntity<String>(xml);
String response = restTemplate.exchange(this.getServerBaseNotifyPath()+"/eventActivityOrder/weiXinRefoundNotifyUrl", HttpMethod.POST, entity, new ParameterizedTypeReference<String>() {
String response = restTemplate.exchange(this.getServerBaseNotifyPath()+"/"+orderType+"/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