Authored by tanling

no message

... ... @@ -19,7 +19,7 @@ public class AddressUtil {
String decryptStr = str;
try{
str = str.replace(' ','+');
decryptStr = AES.decrypt(DynamicPropertyFactory.getInstance().getStringProperty("password.aes.key", "yoho9646yoho9646").get(), str);
decryptStr = AES.decrypt("yoho9646yoho9646", str);
return Integer.parseInt(decryptStr);
}catch (Exception e){
logger.error("getDecryptStr failed. str is {}, e is {}", str, e);
... ... @@ -53,6 +53,8 @@ public class AddressUtil {
public static void main(String[] args){
System.out.println(getEncryptStr("2395724"));
int result = AddressUtil.getDecryptStr("YR5uNKQ+Cd8z0Nu4+hHr0g==");
System.out.println(result);
}
}
... ...
package com.yohoufo.order.controller;
import com.yoho.error.event.PaymentEvent;
import com.yohoufo.common.ApiResponse;
import com.yohoufo.common.utils.WXUtil;
import com.yohoufo.order.common.Payment;
import com.yohoufo.order.model.NotifyResponse;
import com.yohoufo.order.model.PaymentData;
import com.yohoufo.order.model.request.PaymentRequest;
... ...
... ... @@ -31,7 +31,7 @@ import java.util.TreeMap;
public abstract class AlipayServiceAbstract extends AbstractPayService {
private static final Logger logger = LoggerFactory.getLogger("wechatLogger");
private static final Logger logger = LoggerFactory.getLogger("alipayLogger");
@Autowired
private HttpClient httpClient;
... ...
... ... @@ -27,7 +27,7 @@ import java.util.Map;
public abstract class AbstractWeixinPayService extends AbstractPayService {
private static final Logger logger = LoggerFactory.getLogger("alipayLogger");
private static final Logger logger = LoggerFactory.getLogger("wechatLogger");
@Value("${wechat.notifyurl}")
... ... @@ -423,7 +423,7 @@ public abstract class AbstractWeixinPayService extends AbstractPayService {
parameters.put(WeixinPayConfig.ApiConstants.MCH_ID, getMchId());
parameters.put(WeixinPayConfig.ApiConstants.NONCE_STR, WXUtils.getNonceStr());
parameters.put(WeixinPayConfig.ApiConstants.BODY, "订单号:" + orderInfo.getOrderCode());
parameters.put(WeixinPayConfig.ApiConstants.OUT_TRADE_NO, "YOHOBuy_" + orderInfo.getOrderCode());
parameters.put(WeixinPayConfig.ApiConstants.OUT_TRADE_NO, String.valueOf(orderInfo.getOrderCode()));
parameters.put(WeixinPayConfig.ApiConstants.TOTAL_FEE, orderInfo.getFenAmount());
//"X-Real-IP"可能出现"10.41.100.248, 120.197.194.125"这样的数据,微信支付会报错。需要截取一下
//parameters.put(WeixinPayConfig.ApiConstants.SPBILL_CREATE_IP, WXUtils.getSingleIp(remoteIp));
... ...