增加悠谷充值渠道uid校验

master
DESKTOP-C3M45P4\dengdan 2026-09-03 16:25:49 +08:00
parent fd1015fd42
commit 99b5da372f
2 changed files with 10 additions and 1 deletions

View File

@ -67,6 +67,14 @@ public class PayLogic {
LOGGER.info("该用户无此角色" + uid);
return "USER_IS_NOT";
}
//悠谷要做youGuUid验证
if(sdk == PaySdkEnum.YOUGU){
String youGuUid = ext;
if(!cUserInfo.getOpenId().equals(youGuUid)){
LOGGER.info("悠谷uid不一致" + youGuUid + " youGuUid:" + cUserInfo.getOpenId());
return "UID_NOT_TRUE";
}
}
CPayOrder cPayOrder = cuserDao.getCpayOrderByOrderId(orderId);

View File

@ -54,7 +54,8 @@ public class YouGuRechargeController {
int amount = Integer.parseInt(parameterMap.get("amount"))*100; // 充值金额(单位:元)(需要换算成分)
String gameExt = request.getParameter("extinfo"); //透传参数,如CP下单有值提交,则会原样回传,不得超过255个字符
String[] callback = gameExt.split("_");
String result = PayLogic.initOrder(gameExt, orderno, String.valueOf(amount), new Date(), callback[0], PaySdkEnum.YOUGU);
String uid = parameterMap.get("uid");
String result = PayLogic.initOrder(gameExt, orderno, String.valueOf(amount), new Date(), callback[0], PaySdkEnum.YOUGU,uid);
if (result.equals("SUCCESS") || result.equals("ORDER_IS_EXIST")){
jsonObject.put("errno","0");
jsonObject.put("errmsg","SUCCESS");