| | |
| | | import com.java110.vo.ResultVo; |
| | | import org.bouncycastle.util.encoders.Base64; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | paramMap.put("tradeAmount", PayUtil.moneyToIntegerStr(payAmount)); |
| | | paramMap.put("payTypeId", "0"); |
| | | String privateKey = CommunitySettingFactory.getRemark(smallWeChatDtos.get(0).getObjId(), "PLUTUS_PRIVATE_KEY"); |
| | | String devId = CommunitySettingFactory.getValue(smallWeChatDto.getObjId(), "PLUTUS_DEV_ID"); |
| | | |
| | | String param = PlutusFactory.Encryption(paramMap.toJSONString(), privateKey, smallWeChatDtos.get(0).getPayPassword()); |
| | | String param = PlutusFactory.Encryption(paramMap.toJSONString(), privateKey, smallWeChatDtos.get(0).getPayPassword(),devId); |
| | | System.out.println(param); |
| | | |
| | | String str = PlutusFactory.post(PAY_UNIFIED_ORDER_URL, param); |
| | |
| | | throw new IllegalArgumentException("支付失败签名失败"); |
| | | } |
| | | //解密 |
| | | byte[] bb = PlutusFactory.decrypt(Base64.decode(content), PlutusFactory.SECRET_KEY); |
| | | byte[] bb = PlutusFactory.decrypt(Base64.decode(content), smallWeChatDtos.get(0).getPayPassword()); |
| | | //服务器返回内容 |
| | | String paramOut = new String(bb); |
| | | |
| | |
| | | paramMap.put("sn", smallWeChatDto.getMchId()); // 富友分配给二级商户的商户号 |
| | | paramMap.put("outTradeId", orderNum); |
| | | String privateKey = CommunitySettingFactory.getRemark(smallWeChatDtos.get(0).getObjId(), "PLUTUS_PRIVATE_KEY"); |
| | | String devId = CommunitySettingFactory.getValue(smallWeChatDto.getObjId(), "PLUTUS_DEV_ID"); |
| | | |
| | | String param = PlutusFactory.Encryption(paramMap.toJSONString(), privateKey, smallWeChatDtos.get(0).getPayPassword()); |
| | | String param = PlutusFactory.Encryption(paramMap.toJSONString(), privateKey, smallWeChatDtos.get(0).getPayPassword(),devId); |
| | | System.out.println(param); |
| | | |
| | | String str = PlutusFactory.post(PAY_UNIFIED_ORDER_URL, param); |
| | |
| | | throw new IllegalArgumentException("支付失败签名失败"); |
| | | } |
| | | //解密 |
| | | byte[] bb = PlutusFactory.decrypt(Base64.decode(content), PlutusFactory.SECRET_KEY); |
| | | byte[] bb = PlutusFactory.decrypt(Base64.decode(content), smallWeChatDtos.get(0).getPayPassword()); |
| | | //服务器返回内容 |
| | | String paramOut = new String(bb); |
| | | |