Showing
4 changed files
with
7 additions
and
7 deletions
@@ -19,7 +19,7 @@ public class AddressUtil { | @@ -19,7 +19,7 @@ public class AddressUtil { | ||
19 | String decryptStr = str; | 19 | String decryptStr = str; |
20 | try{ | 20 | try{ |
21 | str = str.replace(' ','+'); | 21 | str = str.replace(' ','+'); |
22 | - decryptStr = AES.decrypt(DynamicPropertyFactory.getInstance().getStringProperty("password.aes.key", "yoho9646yoho9646").get(), str); | 22 | + decryptStr = AES.decrypt("yoho9646yoho9646", str); |
23 | return Integer.parseInt(decryptStr); | 23 | return Integer.parseInt(decryptStr); |
24 | }catch (Exception e){ | 24 | }catch (Exception e){ |
25 | logger.error("getDecryptStr failed. str is {}, e is {}", str, e); | 25 | logger.error("getDecryptStr failed. str is {}, e is {}", str, e); |
@@ -53,6 +53,8 @@ public class AddressUtil { | @@ -53,6 +53,8 @@ public class AddressUtil { | ||
53 | 53 | ||
54 | 54 | ||
55 | public static void main(String[] args){ | 55 | public static void main(String[] args){ |
56 | - System.out.println(getEncryptStr("2395724")); | 56 | + |
57 | + int result = AddressUtil.getDecryptStr("YR5uNKQ+Cd8z0Nu4+hHr0g=="); | ||
58 | + System.out.println(result); | ||
57 | } | 59 | } |
58 | } | 60 | } |
1 | package com.yohoufo.order.controller; | 1 | package com.yohoufo.order.controller; |
2 | 2 | ||
3 | -import com.yoho.error.event.PaymentEvent; | ||
4 | import com.yohoufo.common.ApiResponse; | 3 | import com.yohoufo.common.ApiResponse; |
5 | import com.yohoufo.common.utils.WXUtil; | 4 | import com.yohoufo.common.utils.WXUtil; |
6 | -import com.yohoufo.order.common.Payment; | ||
7 | import com.yohoufo.order.model.NotifyResponse; | 5 | import com.yohoufo.order.model.NotifyResponse; |
8 | import com.yohoufo.order.model.PaymentData; | 6 | import com.yohoufo.order.model.PaymentData; |
9 | import com.yohoufo.order.model.request.PaymentRequest; | 7 | import com.yohoufo.order.model.request.PaymentRequest; |
@@ -31,7 +31,7 @@ import java.util.TreeMap; | @@ -31,7 +31,7 @@ import java.util.TreeMap; | ||
31 | public abstract class AlipayServiceAbstract extends AbstractPayService { | 31 | public abstract class AlipayServiceAbstract extends AbstractPayService { |
32 | 32 | ||
33 | 33 | ||
34 | - private static final Logger logger = LoggerFactory.getLogger("wechatLogger"); | 34 | + private static final Logger logger = LoggerFactory.getLogger("alipayLogger"); |
35 | 35 | ||
36 | @Autowired | 36 | @Autowired |
37 | private HttpClient httpClient; | 37 | private HttpClient httpClient; |
@@ -27,7 +27,7 @@ import java.util.Map; | @@ -27,7 +27,7 @@ import java.util.Map; | ||
27 | public abstract class AbstractWeixinPayService extends AbstractPayService { | 27 | public abstract class AbstractWeixinPayService extends AbstractPayService { |
28 | 28 | ||
29 | 29 | ||
30 | - private static final Logger logger = LoggerFactory.getLogger("alipayLogger"); | 30 | + private static final Logger logger = LoggerFactory.getLogger("wechatLogger"); |
31 | 31 | ||
32 | 32 | ||
33 | @Value("${wechat.notifyurl}") | 33 | @Value("${wechat.notifyurl}") |
@@ -423,7 +423,7 @@ public abstract class AbstractWeixinPayService extends AbstractPayService { | @@ -423,7 +423,7 @@ public abstract class AbstractWeixinPayService extends AbstractPayService { | ||
423 | parameters.put(WeixinPayConfig.ApiConstants.MCH_ID, getMchId()); | 423 | parameters.put(WeixinPayConfig.ApiConstants.MCH_ID, getMchId()); |
424 | parameters.put(WeixinPayConfig.ApiConstants.NONCE_STR, WXUtils.getNonceStr()); | 424 | parameters.put(WeixinPayConfig.ApiConstants.NONCE_STR, WXUtils.getNonceStr()); |
425 | parameters.put(WeixinPayConfig.ApiConstants.BODY, "订单号:" + orderInfo.getOrderCode()); | 425 | parameters.put(WeixinPayConfig.ApiConstants.BODY, "订单号:" + orderInfo.getOrderCode()); |
426 | - parameters.put(WeixinPayConfig.ApiConstants.OUT_TRADE_NO, "YOHOBuy_" + orderInfo.getOrderCode()); | 426 | + parameters.put(WeixinPayConfig.ApiConstants.OUT_TRADE_NO, String.valueOf(orderInfo.getOrderCode())); |
427 | parameters.put(WeixinPayConfig.ApiConstants.TOTAL_FEE, orderInfo.getFenAmount()); | 427 | parameters.put(WeixinPayConfig.ApiConstants.TOTAL_FEE, orderInfo.getFenAmount()); |
428 | //"X-Real-IP"可能出现"10.41.100.248, 120.197.194.125"这样的数据,微信支付会报错。需要截取一下 | 428 | //"X-Real-IP"可能出现"10.41.100.248, 120.197.194.125"这样的数据,微信支付会报错。需要截取一下 |
429 | //parameters.put(WeixinPayConfig.ApiConstants.SPBILL_CREATE_IP, WXUtils.getSingleIp(remoteIp)); | 429 | //parameters.put(WeixinPayConfig.ApiConstants.SPBILL_CREATE_IP, WXUtils.getSingleIp(remoteIp)); |
-
Please register or login to post a comment