| | |
| | | throw new BadRequestException(e1.getMessage()); |
| | | } |
| | | } else { |
| | | if (status.equals(PayTypeEnum.HWC)) { |
| | | return MD5.sign(preStr, "&key=" + properties.getKey(), "utf-8"); |
| | | switch (status) { |
| | | case HWC: |
| | | return MD5.sign(preStr, "&key=" + properties.getKey(), "utf-8"); |
| | | case HWC2: |
| | | return MD5.sign(preStr, "&key=" + properties.getKey2(), "utf-8"); |
| | | } |
| | | throw new BadRequestException("汇旺财类型错误"); |
| | | } |
| | |
| | | String preStr = builder.toString(); |
| | | return !SignUtil.verifySign(preStr, sign, "RSA_1_256", properties.getPlatPublicKey()); |
| | | } else if ("MD5".equals(signType)) { |
| | | if (status.equals(PayTypeEnum.HWC)) { |
| | | return !SignUtils.checkParam(resultMap, properties.getKey()); |
| | | switch (status) { |
| | | case HWC: |
| | | return !SignUtils.checkParam(resultMap, properties.getKey()); |
| | | case HWC2: |
| | | return !SignUtils.checkParam(resultMap, properties.getKey2()); |
| | | } |
| | | throw new BadRequestException("汇旺财类型错误"); |
| | | } |