Commit 663dc2bd by chongli

微信回调调试

parent 542bc591
......@@ -121,9 +121,7 @@ public class NotifyController {
@RequestMapping(value = "/weiXinRefoundNotifyUrl", produces = "application/json;charset=UTF-8")
@ResponseBody
public String weiXinRefoundNotifyUrl(HttpServletRequest request,HttpServletResponse response) throws Exception{
System.out.println("aaaaaaaaaaaaaaaaaaaaaa1");
System.out.println("aaaaaaaaaaaaaaaaaaaaaa2");
System.out.println("aaaaaaaaaaaaaaaaaaaaaa3");
BufferedReader reader = null;
reader = request.getReader();
String line = "";
......@@ -135,11 +133,7 @@ public class NotifyController {
}
xmlString = inputString.toString();
request.getReader().close();
System.out.println("----接收到的数据如下:---" + xmlString);
System.out.println("aaaaaaaaaaaaaaaaaaaaaa4");
System.out.println("aaaaaaaaaaaaaaaaaaaaaa5");
System.out.println("aaaaaaaaaaaaaaaaaaaaaa6");
this.notifyService.notifyForVoucherMiniApp(xmlString);
this.notifyService.weiXinRefoundNotifyUrl(xmlString);
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 orderType,String xml) {
public String weiXinRefoundNotifyUrl(String xml) {
HttpEntity<String> entity = new HttpEntity<String>(xml);
String response = restTemplate.exchange(this.getServerBaseNotifyPath()+"/"+orderType+"/weiXinRefoundNotifyUrl", HttpMethod.POST, entity, new ParameterizedTypeReference<String>() {
String response = restTemplate.exchange(this.getServerBaseNotifyPath()+"/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