java110 пре 4 година
родитељ
комит
7e5ed0e7b5

+ 2 - 2
java110-core/src/main/java/com/java110/core/factory/PlutusFactory.java

@@ -150,7 +150,7 @@ public class PlutusFactory {
         return null;
     }
 
-    public static String Encryption(String url,String priKey,String secretKey) {
+    public static String Encryption(String url,String priKey,String secretKey,String devId) {
         JSONObject object = new JSONObject();
         try {
             byte[] b = url.getBytes("UTF-8");
@@ -162,7 +162,7 @@ public class PlutusFactory {
             byte[] sign = PlutusFactory.sign256(text, getPrivateKey(priKey));
             String signature = Base64.toBase64String(sign);
 
-            object.put("devId", "xqHQzM5n");
+            object.put("devId", devId);
             object.put("content", content);
             object.put("signature", signature);
 

+ 4 - 2
service-acct/src/main/java/com/java110/acct/smo/impl/QrCodePlutusPaymentAdapt.java

@@ -85,8 +85,9 @@ public class QrCodePlutusPaymentAdapt implements IQrCodePaymentSMO {
         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);
@@ -140,8 +141,9 @@ public class QrCodePlutusPaymentAdapt implements IQrCodePaymentSMO {
         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);

+ 4 - 2
service-api/src/main/java/com/java110/api/smo/payment/adapt/plutuspay/PlutusPayAdapt.java

@@ -160,10 +160,12 @@ public class PlutusPayAdapt implements IPayAdapt {
 
         logger.debug("调用支付统一下单接口" + paramMap.toJSONString());
         String privateKey = CommunitySettingFactory.getRemark(smallWeChatDto.getObjId(), "PLUTUS_PRIVATE_KEY");
-        String param = PlutusFactory.Encryption(paramMap.toJSONString(), privateKey, smallWeChatDto.getPayPassword());
+        String devId = CommunitySettingFactory.getValue(smallWeChatDto.getObjId(), "PLUTUS_DEV_ID");
+
+        String param = PlutusFactory.Encryption(paramMap.toJSONString(), privateKey, smallWeChatDto.getPayPassword(),devId);
         System.out.println(param);
 
-        String str = PlutusFactory.post(wechatAuthProperties.getWxPayUnifiedOrder(), param);
+        String str = PlutusFactory.post(PAY_UNIFIED_ORDER_URL, param);
         System.out.println(str);
 
         JSONObject json = JSON.parseObject(str);

+ 2 - 1
service-job/src/main/java/com/java110/job/adapt/fee/ReturnPayFeeToPlutusAdapt.java

@@ -127,8 +127,9 @@ public class ReturnPayFeeToPlutusAdapt extends DatabusAdaptImpl {
             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);