generated from root/miduo_server
灵动sdk接入
parent
a3eaa2d977
commit
f99a6156dd
|
|
@ -64,39 +64,42 @@ public class MHTRechargeController {
|
||||||
// }
|
// }
|
||||||
String response = "SUCCESS";
|
String response = "SUCCESS";
|
||||||
try {
|
try {
|
||||||
String consumerid = request.getParameterValues("consumerid")[0];
|
String consumerid = parameterMap.get("consumerid");
|
||||||
String consumerName =parameterMap.get("consumername");
|
String ext =parameterMap.get("ext");
|
||||||
String gameCurrency ="0";
|
String gameCurrency ="0";
|
||||||
String mhtOrderAmt =parameterMap.get("mhtOrderAmt");
|
String mhtOrderAmt =parameterMap.get("mhtOrderAmt");
|
||||||
String orderDetail =parameterMap.get("orderDetail");
|
String orderDetail =parameterMap.get("orderDetail");
|
||||||
String orderNo =parameterMap.get("orderNo");
|
String orderNo =parameterMap.get("orderNo");
|
||||||
String time =parameterMap.get("time");
|
String time =parameterMap.get("time");
|
||||||
String sign = parameterMap.get("sign");
|
String sign = parameterMap.get("sign");
|
||||||
String stringBuilder = "consumerid" + "=" + consumerid + "&" +
|
String temp = "consumerid" + "=" + consumerid + "&" +
|
||||||
"consumerName" + "=" + consumerName + "&" +
|
"ext" + "=" + ext;
|
||||||
"gameCurrency" + "=" + gameCurrency + "&" +
|
String stringBuilder = "gameCurrency" + "=" + gameCurrency + "&" +
|
||||||
"mhtOrderAmt" + "=" + mhtOrderAmt + "&" +
|
"mhtOrderAmt" + "=" + mhtOrderAmt + "&" +
|
||||||
"orderDetail" + "=" + orderDetail + "&" +
|
"orderDetail" + "=" + orderDetail + "&" +
|
||||||
"orderNo" + "=" + orderNo + "&" +
|
"orderNo" + "=" + orderNo + "&" +
|
||||||
"time" + "=" + time;
|
"time" + "=" + time;
|
||||||
LOGGER.info("stringBuilder"+stringBuilder);
|
LOGGER.info("stringBuilder"+stringBuilder);
|
||||||
|
LOGGER.info("temp"+temp);
|
||||||
String plain = stringBuilder + MD5Util.encrypByMd5(MHTSDKConstans.secretKey);
|
String plain = stringBuilder + MD5Util.encrypByMd5(MHTSDKConstans.secretKey);
|
||||||
String sig = MD5Util.encrypByMd5(plain);
|
String sig = MD5Util.encrypByMd5(plain);
|
||||||
|
|
||||||
String goodID;
|
String goodID;
|
||||||
if(consumerName.isEmpty()){
|
String uid;
|
||||||
|
if(ext.isEmpty()){
|
||||||
LOGGER.info("callback==>roleUid={},sin derify fail,mine sign={} ",consumerid,sig);
|
LOGGER.info("callback==>roleUid={},sin derify fail,mine sign={} ",consumerid,sig);
|
||||||
return "FAIL";
|
return "FAIL";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sig.equals(sign)){
|
if (!sig.equals(sign)){
|
||||||
LOGGER.info("callback==>roleUid={},sin derify fail,mine sign={} ",consumerid,sig);
|
LOGGER.info("callback==>roleUid={},sin derify fail,mine sign={} ",ext,sig);
|
||||||
return "FAIL";
|
return "FAIL";
|
||||||
}
|
}
|
||||||
String[] split1 = consumerName.split("#");
|
String[] split1 = ext.split("#");
|
||||||
goodID = split1[0];
|
uid = split1[0];
|
||||||
if(null==goodID||goodID.isEmpty()){
|
goodID = split1[1];
|
||||||
LOGGER.info("callback==>roleUid={},sin derify fail,mine sign={} ,consumerName={}",consumerid,sig,consumerName);
|
if(null==uid||uid.isEmpty()||null==goodID||goodID.isEmpty()){
|
||||||
|
LOGGER.info("callback==>roleUid={},sin derify fail,mine sign={} ,EXT={}",consumerid,sig,ext);
|
||||||
}
|
}
|
||||||
|
|
||||||
CUserInfo cUserInfo = cuserDao.findUserInfo(Integer.valueOf(consumerid));
|
CUserInfo cUserInfo = cuserDao.findUserInfo(Integer.valueOf(consumerid));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue