| | |
| | | import com.java110.core.factory.CommunitySettingFactory; |
| | | import com.java110.core.factory.PlutusFactory; |
| | | import com.java110.core.factory.WechatFactory; |
| | | import com.java110.dto.smallWeChat.SmallWeChatDto; |
| | | import com.java110.dto.wechat.SmallWeChatDto; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | |
| | | } |
| | | String publicKey = CommunitySettingFactory.getRemark(smallWeChatDto.getObjId(),"PLUTUS_PUBLIC_KEY"); |
| | | //验签 |
| | | Boolean verify = PlutusFactory.verify256(param, org.bouncycastle.util.encoders.Base64.decode(signature),publicKey); |
| | | Boolean verify = PlutusFactory.verify256(content, org.bouncycastle.util.encoders.Base64.decode(signature),publicKey); |
| | | //验签成功 |
| | | if (!verify) { |
| | | throw new IllegalArgumentException("支付失败签名失败"); |
| | |
| | | smallWeChatDto.setMchId(wechatAuthProperties.getMchId()); |
| | | smallWeChatDto.setPayPassword(wechatAuthProperties.getKey()); |
| | | } |
| | | TreeMap<String, String> paramMap = new TreeMap<String, String>(); |
| | | for (String key : map.keySet()) { |
| | | // if ("wId".equals(key)) { |
| | | // continue; |
| | | // } |
| | | paramMap.put(key, map.get(key).toString()); |
| | | } |
| | | |
| | | //String sign = PayUtil.createChinaUmsSign(paramMap, smallWeChatDto.getPayPassword()); |
| | | //JSONObject billPayment = JSONObject.parseObject(map.getString("billPayment")); |
| | | String outTradeNo = map.get("outTransId").toString(); |
| | | String outTradeNo = map.getString("outTransId"); |
| | | |
| | | //查询用户ID |
| | | JSONObject paramIn = new JSONObject(); |