Authored by mali

Merge branch 'dev'

package com.yohoufo.order.controller;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yohoufo.common.ApiResponse;
import com.yohoufo.common.annotation.IgnoreSession;
import com.yohoufo.common.annotation.IgnoreSignature;
... ... @@ -8,22 +22,12 @@ import com.yohoufo.order.constants.RefundContant;
import com.yohoufo.order.model.NotifyResponse;
import com.yohoufo.order.model.PayRefundBo;
import com.yohoufo.order.model.PaymentData;
import com.yohoufo.order.model.PaymentOrderQueryBO;
import com.yohoufo.order.model.request.PaymentRequest;
import com.yohoufo.order.model.response.PaymentConfirmRsp;
import com.yohoufo.order.model.response.PrepayResponse;
import com.yohoufo.order.service.IPaymentService;
import com.yohoufo.order.service.pay.alipay.AlipayService;
import com.yohoufo.order.service.pay.weixin.WeixinPayAppService;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
import com.yohoufo.order.service.pay.alipay.AlipayOuyinService;
import com.yohoufo.order.service.pay.weixin.WeixinPayUFOAppService;
@RestController
@RequestMapping(value = "/payment")
... ... @@ -42,10 +46,10 @@ public class PaymentController {
IPaymentService paymentService;
@Autowired
WeixinPayAppService weixinPayAppService;
WeixinPayUFOAppService weixinPayAppService;
@Autowired
AlipayService alipayService;
AlipayOuyinService alipayService;
public static final String RETURN_CODE = "return_code";
... ...
... ... @@ -22,6 +22,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.util.*;
... ... @@ -500,7 +501,11 @@ public abstract class AlipayServiceAbstract extends AbstractPayService {
if(StringUtils.isEmpty(entry.getValue())) {
continue;
}
sortMap.put(entry.getKey(), entry.getValue());
try {
sortMap.put(entry.getKey(), new String(entry.getValue().getBytes("ISO-8859-1")));
} catch (UnsupportedEncodingException e) {
logger.error("解析支付宝回调参数出错:key={}, msg= {}",entry.getKey(), e.getMessage());
}
}
return getUrlString(sortMap);
... ...