|
|
|
@ -1,5 +1,6 @@ |
|
|
|
|
package com.cweb.controller.pay; |
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.hai.common.exception.ErrorCode; |
|
|
|
@ -80,20 +81,15 @@ public class UnionPayController { |
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/notify", method = RequestMethod.POST) |
|
|
|
|
@ApiOperation(value = "银联支付 -> 异步回调") |
|
|
|
|
public void notify(@RequestParam Map<String, String> params, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
|
public void notify(@RequestBody String params,HttpServletRequest request, HttpServletResponse response) { |
|
|
|
|
try { |
|
|
|
|
System.out.println(params); |
|
|
|
|
log.info(JSONObject.toJSONString(params)); |
|
|
|
|
|
|
|
|
|
if (params == null){ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
JSONObject body = JSONObject.parseObject(MapUtils.getObject(params, "params"), JSONObject.class); |
|
|
|
|
if (StringUtils.isBlank(body.getString("tradetrace"))) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
System.out.println(params); |
|
|
|
|
log.info(params); |
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(params)) { |
|
|
|
|
JSONObject body = JSONObject.parseObject(params.substring(0, params.length() - 1)); |
|
|
|
|
if (StringUtils.isNotBlank(body.getString("tradetrace"))) { |
|
|
|
|
// 查询订单信息
|
|
|
|
|
HighOrder order = highOrderService.getOrderByOrderNo(body.getString("tradetrace")); |
|
|
|
|
if (order == null) { |
|
|
|
@ -257,6 +253,8 @@ public class UnionPayController { |
|
|
|
|
|
|
|
|
|
highOrderService.updateOrder(order); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream()); |
|
|
|
|
JSONObject result = new JSONObject(); |
|
|
|
|