Java 微信支付 统一下单 签名错误

以核对过 官方提供的签名工具 完全一致 商户平台 密钥重置N次依然无效 求大神解救

生成xml

                <xml>
                            <appid>wx84e8f8a8bf03084e</appid>
                            <body>哔辟-会员充值</body>
            <fee_type>CNY</fee_type>
            <mch_id>1507329861</mch_id>
            <nonce_str>33</nonce_str>
            <notify_url>http://test.bpfind.com/home/home/</notify_url>
            <out_trade_no>2018062116141258</out_trade_no>
            <sign>250DFDFC3E2A1578E7EBAA2EDC0B4B8F</sign>
            <spbill_create_ip>123.12.12.123</spbill_create_ip>
            <total_fee>1</total_fee>
            <trade_type>APP</trade_type>
     </xml>

签名

                String stringA = "appid=wx84e8f8a8bf03****&body=test&device_info=1000&mch_id=150732****&nonce_str=ibuaiVcKdpRxkhJA";
    String stringSignTemp = stringA + "&key=3e1434a3ff0e45d280bda54789b1****";
    MD5 md5 = new MD5();
    String sign = MD5.stringToMD5(stringSignTemp).toUpperCase();

错误信息

        json:<xml>
                            <return_code><![CDATA[FAIL]]></return_code>
                            <return_msg><![CDATA[签名错误]]></return_msg>
                    </xml>
        status:200
   270DFDFC3E2A1578E7EBAA2EDC0B4B8F
            String stringA = "appid=wx84e8f8a8bf03****&body=test&device_info=1000&mch_id=150732****&nonce_str=ibuaiVcKdpRxkhJA";
String stringSignTemp = stringA + "&key=3e1434a3ff0e45d280bda54789b1****";
MD5 md5 = new MD5();
String sign = MD5.stringToMD5(stringSignTemp).toUpperCase();

拼接的字符串与微信生成的不一样

字符串拼接与微信生成不匹配。

字符串 一定要和 微信生成的一致才可以的

你的签名字符串错了
正确签名字符串为:String sign = "appId=*****&timeStamp=******&nonceStr=****&package=******&signType=*****&key=*******"