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