提交代码

dev-discount
胡锐 3 years ago
parent f7c50a7f57
commit 0c9504a75b
  1. 6
      hai-cweb/src/main/java/com/cweb/controller/pay/UnionPayController.java

@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedOutputStream;
import java.math.BigDecimal;
import java.net.URLDecoder;
import java.util.*;
@Controller
@ -88,7 +89,10 @@ public class UnionPayController {
log.info(params);
if (StringUtils.isNotBlank(params)) {
JSONObject body = JSONObject.parseObject(params.substring(0, params.length() - 1));
// 参数解码
String paramsStr = URLDecoder.decode(params,"utf-8");
// 转换成JSON格式
JSONObject body = JSONObject.parseObject(paramsStr.substring(0, paramsStr.length() - 1));
if (StringUtils.isNotBlank(body.getString("tradetrace"))) {
// 查询订单信息
HighOrder order = highOrderService.getOrderByOrderNo(body.getString("tradetrace"));

Loading…
Cancel
Save