|
@@ -16,7 +16,6 @@ import com.zanxiang.sdk.domain.bo.WxPayConfigBO;
|
|
import com.zanxiang.sdk.service.OrderPayService;
|
|
import com.zanxiang.sdk.service.OrderPayService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.io.IOUtils;
|
|
import org.apache.commons.io.IOUtils;
|
|
-import org.apache.commons.lang.StringEscapeUtils;
|
|
|
|
import org.apache.logging.log4j.util.Strings;
|
|
import org.apache.logging.log4j.util.Strings;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -108,9 +107,9 @@ public class WxPayServiceImpl extends PayService implements OrderPayService {
|
|
Map<String, String> packageParams = XmlUtil.xmlToMap(requestStr);
|
|
Map<String, String> packageParams = XmlUtil.xmlToMap(requestStr);
|
|
log.info("微信支付回调 map:{}", JsonUtil.toString(packageParams));
|
|
log.info("微信支付回调 map:{}", JsonUtil.toString(packageParams));
|
|
//获取订单信息
|
|
//获取订单信息
|
|
- String attachStr = StringEscapeUtils.unescapeJava(packageParams.get("attach"));
|
|
|
|
|
|
+ String attachStr = packageParams.get("attach");
|
|
log.info("微信支付回调 attachStr:{}", attachStr);
|
|
log.info("微信支付回调 attachStr:{}", attachStr);
|
|
- ProductPayAttachParamBO attachBO = JsonUtil.toObj(JsonUtil.toString(attachStr), ProductPayAttachParamBO.class);
|
|
|
|
|
|
+ ProductPayAttachParamBO attachBO = JsonUtil.toObj(attachStr, ProductPayAttachParamBO.class);
|
|
if (attachBO == null) {
|
|
if (attachBO == null) {
|
|
log.info("回调参数中attach值为空");
|
|
log.info("回调参数中attach值为空");
|
|
return null;
|
|
return null;
|
|
@@ -139,6 +138,7 @@ public class WxPayServiceImpl extends PayService implements OrderPayService {
|
|
// 通知微信.异步确认成功.必写.不然会一直通知后台.八次之后就认为交易失败了
|
|
// 通知微信.异步确认成功.必写.不然会一直通知后台.八次之后就认为交易失败了
|
|
xmlMap.put("return_code", "SUCCESS");
|
|
xmlMap.put("return_code", "SUCCESS");
|
|
xmlMap.put("return_msg", "OK");
|
|
xmlMap.put("return_msg", "OK");
|
|
|
|
+ log.info("微信订单号{}付款成功1111111111111", orderNo);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 处理业务完毕
|
|
// 处理业务完毕
|