Commit 5d85c6d6 by 翁国栋

8小时运营后台--

保全支付回调
parent 176e9879
...@@ -409,7 +409,7 @@ public class CallBackContorll { ...@@ -409,7 +409,7 @@ public class CallBackContorll {
for (int n; (n = is.read(b)) != -1; ) { for (int n; (n = is.read(b)) != -1; ) {
sb.append(new String(b, 0, n)); sb.append(new String(b, 0, n));
} }
String value = DigestUtils.md5Hex(pid + secretq + timestamp); String value = DigestUtils.md5Hex(pid + secretq + timestamp + sb.toString());
if (!value.equals(sign)) { if (!value.equals(sign)) {
throw new CustomException("增员支付回调验签失败"); throw new CustomException("增员支付回调验签失败");
} }
......
...@@ -802,7 +802,11 @@ public class InsureContorll { ...@@ -802,7 +802,11 @@ public class InsureContorll {
for (int index = 0; index < row.getPhysicalNumberOfCells(); index++) { for (int index = 0; index < row.getPhysicalNumberOfCells(); index++) {
XSSFCell titleCell = titleRow.getCell(index); XSSFCell titleCell = titleRow.getCell(index);
XSSFCell cell = row.getCell(index); XSSFCell cell = row.getCell(index);
cell.setCellType(CellType.STRING); if (cell == null) {
continue;
} else {
cell.setCellType(CellType.STRING);
}
if (cell.getStringCellValue().equals("")) { if (cell.getStringCellValue().equals("")) {
continue; continue;
} }
...@@ -912,7 +916,11 @@ public class InsureContorll { ...@@ -912,7 +916,11 @@ public class InsureContorll {
for (int index = 0; index < row.getPhysicalNumberOfCells(); index++) { for (int index = 0; index < row.getPhysicalNumberOfCells(); index++) {
XSSFCell titleCell = titleRow.getCell(index); XSSFCell titleCell = titleRow.getCell(index);
XSSFCell cell = row.getCell(index); XSSFCell cell = row.getCell(index);
cell.setCellType(CellType.STRING); if (cell == null) {
continue;
} else {
cell.setCellType(CellType.STRING);
}
if (cell.getStringCellValue().equals("")) { if (cell.getStringCellValue().equals("")) {
continue; continue;
} }
...@@ -1220,7 +1228,11 @@ public class InsureContorll { ...@@ -1220,7 +1228,11 @@ public class InsureContorll {
for (int index = 0; index < row.getPhysicalNumberOfCells(); index++) { for (int index = 0; index < row.getPhysicalNumberOfCells(); index++) {
XSSFCell titleCell = titleRow.getCell(index); XSSFCell titleCell = titleRow.getCell(index);
XSSFCell cell = row.getCell(index); XSSFCell cell = row.getCell(index);
cell.setCellType(CellType.STRING); if (cell == null) {
continue;
} else {
cell.setCellType(CellType.STRING);
}
switch (ExcelUtils.getString(titleCell)) { switch (ExcelUtils.getString(titleCell)) {
case "被保人姓名(必填)": case "被保人姓名(必填)":
if (StringUtils.isNullOrEmpty(ExcelUtils.getString(cell))) { if (StringUtils.isNullOrEmpty(ExcelUtils.getString(cell))) {
...@@ -1355,7 +1367,7 @@ public class InsureContorll { ...@@ -1355,7 +1367,7 @@ public class InsureContorll {
/*设置验签参数*/ /*设置验签参数*/
long timestamp = System.currentTimeMillis() / 1000; long timestamp = System.currentTimeMillis() / 1000;
String sign= DigestUtils.md5Hex(appidq + secretq + timestamp); String sign= DigestUtils.md5Hex(appidq + secretq + timestamp);
return ResultUtil.data(importPayInfo.get("pay_url").toString() + "&jump_url=" + base_api_url + "/callBack/policy/payStatus?policyId=" + insurePolicy.getId() + "&notify_url=" + base_api_url + "/callBack/policy/batchPayCallback?pid="+appidq+"?timestamp="+timestamp+"?sign="+sign); return ResultUtil.data(importPayInfo.get("pay_url").toString() + "&jump_url=" + base_api_url + "/callBack/policy/payStatus?policyId=" + insurePolicy.getId() + "&notify_url=" + base_api_url + "/callBack/policy/batchPayCallback&pid="+appidq+"&sign="+sign+"&timestamp="+timestamp);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("重新发起支付异常:", e); log.error("重新发起支付异常:", e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment