|
@@ -257,7 +257,7 @@ public class WxpayController {
|
|
|
*/
|
|
*/
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "/appPay", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/appPay", method = RequestMethod.POST)
|
|
|
- public String appPay(@RequestParam("jsonStr") String jsonStr, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
|
|
|
|
|
+ public JSONObject appPay(@RequestParam("jsonStr") String jsonStr, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
ProjectRecode projectRecode= null;
|
|
ProjectRecode projectRecode= null;
|
|
|
try {
|
|
try {
|
|
@@ -265,7 +265,7 @@ public class WxpayController {
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
logger.error("生成商户订单错误,原因:{}", e.getMessage());
|
|
logger.error("生成商户订单错误,原因:{}", e.getMessage());
|
|
|
jsonObject.put("error", "参数错误");
|
|
jsonObject.put("error", "参数错误");
|
|
|
- return jsonObject.toJSONString();
|
|
|
|
|
|
|
+ return jsonObject;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
WxPayConfig wxPayConfig = wxPayApi.getConfig();
|
|
WxPayConfig wxPayConfig = wxPayApi.getConfig();
|
|
@@ -309,7 +309,7 @@ public class WxpayController {
|
|
|
|
|
|
|
|
jsonObject.put("sign", packageSign);
|
|
jsonObject.put("sign", packageSign);
|
|
|
}
|
|
}
|
|
|
- return jsonObject.toJSONString();
|
|
|
|
|
|
|
+ return jsonObject;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|