java110
2022-01-17 932aece38465004dfce15b0c3d3ef52de675aa11
service-job/src/main/java/com/java110/job/adapt/fee/ReturnPayFeeToPlutusAdapt.java
@@ -19,7 +19,7 @@
import com.java110.utils.util.PayUtil;
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.Component;
import org.springframework.web.client.RestTemplate;
@@ -64,7 +64,7 @@
    @Autowired
    private RestTemplate outRestTemplate;
    public static final String wechatReturnUrl = "https://api.mch.weixin.qq.com/secapi/pay/refund";
    public static final String wechatReturnUrl = "https://api.plutuspay.com/open/v2/refund";
    private static Logger logger = LoggerFactory.getLogger(ReturnPayFeeMoneyAdapt.class);
@@ -127,8 +127,9 @@
            throw new IllegalArgumentException("未配置公众号或者小程序信息");
        }
        String privateKey = CommunitySettingFactory.getRemark(smallWeChatDtos.get(0).getObjId(), "PLUTUS_PRIVATE_KEY");
        String devId = CommunitySettingFactory.getValue(smallWeChatDto.getObjId(), "PLUTUS_DEV_ID");
        String param = PlutusFactory.Encryption(parameters.toJSONString(),privateKey,smallWeChatDtos.get(0).getPayPassword());
        String param = PlutusFactory.Encryption(parameters.toJSONString(),privateKey,smallWeChatDtos.get(0).getPayPassword(),devId);
        System.out.println(param);
        String str = PlutusFactory.post(wechatReturnUrl, param);
@@ -148,7 +149,7 @@
            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);