Pu Zhibing
2024-09-24 5636a3b962bc19c4e46e67646c74018037ee8792
UserZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PayMoneyUtil.java
@@ -345,8 +345,9 @@
        //将结果xml解析成map
        body1 = body1.replaceAll("<!\\[CDATA\\[","");
        body1 = body1.replaceAll("]]>", "");
        System.err.println("调起支付结果-------------->" + body1);
        try {
            map1 = this.xmlToMap(body1, "UTF-8");
            map1 = PayMoneyUtil.xmlToMap(body1, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        } catch (DocumentException e) {
@@ -366,7 +367,7 @@
                        map2.put("nonceStr", map1.get("nonce_str"));
                        map2.put("package", "prepay_id=" + prepay_id);
                        map2.put("signType", "MD5");
                        map2.put("timeStamp", new Date().getTime() + "");
                        map2.put("timeStamp", System.currentTimeMillis() + "");
                        String s2 = this.weixinSignature(map2);
                        map2.put("prepay_id", prepay_id);
@@ -386,7 +387,7 @@
                        map3.put("package", "Sign=WXPay");
                        map3.put("partnerid", mchId);
                        map3.put("prepayid", prepay_id);
                        map3.put("timestamp", new Date().getTime() / 1000);
                        map3.put("timestamp", System.currentTimeMillis() / 1000);
                        String s1 = this.weixinSignature(map3);
                        map3.put("sign", s1);
                        System.err.println(map3);
@@ -394,11 +395,11 @@
                }
                return null;
            }else{
                System.err.println(map1.get("err_code_des"));
                System.err.println("调起支付异常-------------->" + map1.get("err_code_des"));
                return ResultUtil.error(map1.get("err_code_des"));
            }
        }else{//签名错误,请检查后再试1----1602881362
            System.err.println(map1.get("return_msg") + appid + "----" + mchId);
            System.err.println("调起支付异常-------------->" + map1.get("return_msg") + appid + "----" + mchId);
            return ResultUtil.error(map1.get("return_msg"), new JSONObject());
        }
    }
@@ -416,7 +417,7 @@
            String param = this.getParam(request);
            param = param.replaceAll("<!\\[CDATA\\[","");
            param = param.replaceAll("]]>", "");
            Map<String, String> map = this.xmlToMap(param, "UTF-8");
            Map<String, String> map = PayMoneyUtil.xmlToMap(param, "UTF-8");
            String return_code = map.get("return_code");
            if("SUCCESS".equals(return_code)){
                String result_code = map.get("result_code");
@@ -819,7 +820,7 @@
        body1 = body1.replaceAll("<!\\[CDATA\\[","");
        body1 = body1.replaceAll("]]>", "");
        try {
            map1 = this.xmlToMap(body1, "UTF-8");
            map1 = PayMoneyUtil.xmlToMap(body1, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        } catch (DocumentException e) {