From 92ca12ea3dc670c7ff6d6a2958e843d21f11046f Mon Sep 17 00:00:00 2001 From: wangyuan Date: Wed, 3 Jul 2019 15:55:51 +0800 Subject: [PATCH] recharge --- .../com/jmfy/controller/RechargeController.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/jmfy/controller/RechargeController.java b/src/main/java/com/jmfy/controller/RechargeController.java index a3d17a1..820392f 100644 --- a/src/main/java/com/jmfy/controller/RechargeController.java +++ b/src/main/java/com/jmfy/controller/RechargeController.java @@ -34,7 +34,7 @@ public class RechargeController { String orderTime = parameterMap.get("orderTime"); String sign = parameterMap.get("sign"); String roleUid = parameterMap.get("roleUid"); - String sig = MD5Util.encrypByMd5(orderId+userId+productID+userId+amount+orderTime+roleUid+ KTSDKConstans.appkey); + String sig = MD5Util.encrypByMd5(orderId+userId+productID+amount+orderTime+roleUid+ KTSDKConstans.appkey); if (!sig.equals(sign)){ LOGGER.info("callback==>roleUid={},sin derify fail ",roleUid); @@ -98,14 +98,15 @@ public class RechargeController { } public static void main(String[] args) { - String orderId = "123"; - String userId ="wy2588320"; - String productID = "1"; - int amount = 100; + String orderId = "-1882186820"; + String userId ="123151339.sujie"; + String productID = "8"; + int amount = 60; - String orderTime = "" + System.currentTimeMillis(); - String roleUid ="10005403"; - String sig = MD5Util.encrypByMd5(orderId+userId+productID+userId+amount+orderTime+roleUid+ KTSDKConstans.appkey); + String orderTime = "1562139874"; + String roleUid ="10029692"; + String sig = MD5Util.encrypByMd5(orderId+userId+productID+amount+orderTime+roleUid+ KTSDKConstans.appkey); + System.out.println(sig); System.out.println(sig); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("orderId=").append(orderId).append("&");