浩凡ios

master
xuexinpeng 2022-05-11 18:20:38 +08:00
parent 9ad081f6b6
commit b05daf92a3
1 changed files with 5 additions and 2 deletions

View File

@ -21,6 +21,7 @@ import java.util.*;
public class HaoFanRechargeController {
private static final String PAYKEY = "AA594A9028E147D2AD28C9C1A156F9A1";
private static final String PAYKEY_IOS = "5A98DACA26C446EDB481AE3E617AFBB5";
private static final Logger LOGGER = LoggerFactory.getLogger(HaoFanRechargeController.class);
@Resource
@ -31,7 +32,8 @@ public class HaoFanRechargeController {
return false;
}
StringBuilder builder = new StringBuilder();
builder.append(map.get("orderNo")).append(map.get("userNo")).append(map.get("orderMoney")).append(PAYKEY);
builder.append(map.get("orderNo")).append(map.get("userNo")).append(map.get("orderMoney"))
.append(map.get("pKey"));
String substring =builder.toString();
LOGGER.info("hao fan 参数拼装sign未加密" + substring);
String md5Hex = DigestUtils.md5Hex(substring).toUpperCase();
@ -55,12 +57,13 @@ public class HaoFanRechargeController {
String productId = request.getParameter("productId"); //物品id
String productName = request.getParameter("productName"); //物品名称
String remark = request.getParameter("remark"); //透传参数
String pKey = request.getParameter("pKey");
LOGGER.info("hao fan======》{}", parameterMap);
SortedMap<String, String> map = new TreeMap<>();
map.put("orderNo", orderNo);
map.put("userNo", userNo);
map.put("orderMoney", orderMoney);
map.put("pKey", pKey);
boolean valid = verifySign(map, flag);
if (!valid) {