收藏
回答

微信刷脸支付getWxpayFaceAuthInfo.php一直返回“无效的RawData数据”?

返回结果:

<xml><return_code><![CDATA[ERROR]]></return_code>

    <return_msg><![CDATA[无效的RawData数据]]></return_msg>

    <nonce_str><![CDATA[5lrdujrJmNf4igr4HyAxgnou2W2b0YwA]]></nonce_str>

    <sign><![CDATA[083013700CBAAEF96057965AB7EBFF36]]></sign>

    </xml>

1、确定使用的rawdata与getWxpayfaceRawdata()返回的rawdata数据一致;

2、时间now参数与当前时间一致;

请求RequestBody:

val body = RequestBody.create(MediaType.parse("application/xml"), reqStr)


reqStr数据内容如下:

<xml>

    <appid>......</appid>

    <device_id>LTA0P18937F130532000001</device_id>

    <mch_id>......</mch_id>

    <nonce_str>V37ZHZVf2OrwsUV7kXTjTguP74c0byvE</nonce_str>

    <now>1604577508</now>

    <rawdata>0OkagdJBd6U9MKXwAl2KxLwaIq4zdinYxadhJp4/6gfuQaWCgWYJzYGoBitog7WkxAtpAFk9J4HTvf9a814M+ows5zI6LBwaq3RVVoNO4FsgQVaYFjaNhW0eEuCwsQbzm9DikCQZFR+pR7kY9FVtobO+KsTbjcpF1/pkne8YKa4fR/Y/SZMFbW/TwD+iwEPyQdQZo7mzHQCa53IZRrzpeVyGSKpDUK71wyMRV4WvnVzrpqOE2vqQq/RaqE2oiNA2pDcrTGK1F+JZ/BN2hTo2RkTCAU3V/XWiQwf6GV+X3zKNTrnsTQidSkb3c9IEIwZb5b529jd2Deb957iwiRaaQYRGPPV/mr16pWkGiHoVxbsloNv5aC8ahtktGK/h50Rz569Yii0XJT0V0/rKaLAMUbPyxQp8Sfc7gOVySXV3wC+xOY7My7KqWkXJJIzw38/fdUUB+yBHMf2Hpj4XtJAR6UVsfHIokU7+cSOWHl2VJEOmVo6khjXEEonaBwxduHLq+xMcla8DRqdmo7+VT3zEdvELiWbJVPJM/Cbw/MUvc4F6IU/hzWSyCWyPqPwHKi3LwcQ82Aj9WmyEWG1ZErbID9CwXIGc0lmVdM8LmONpbiqBXrGpPEs7dwSlkERYVHaepcA1trLjZKv0CG57g4rURBoqmjIwejEAipTmSWT266XozmEfW7uJ22vMmb3UBosKhhhsC9n3LCYy6p7uiaGBi2QEVsEvOyjiRULv3oDhPImOEckj2ra3zR1JAltoOHkYQ3eGt+t/SiiKT3J6LphV0vNyt1CwmAmYCoHo+PTwwYrYLlkYNjxngsViZkkzJwtZ1UXCZFYTxPTlRKWlvw==</rawdata>

    <sign>4E1B9DBE3DDA0C6ABF4E1265F95F98DE</sign>

    <sign_type>MD5</sign_type>

    <version>1</version>

    </xml>

最后一次编辑于  11-05
回答关注问题邀请回答
收藏

1 个回答

  • 邹丰
    邹丰
    11-05

    发现问题了,是调用的接口地址不正确,使用的演示demo的地址,和平台sdk文档中的地址不一样。

    Demp源代码中的地址:

    https://wxpay.wxutil.com/wxfacepay/api/getWxpayFaceAuthInfo.php
    


    平台sdk文档地址:

    https://payapp.weixin.qq.com/face/get_wxpayface_authinfo
    


    11-05
    有用 1
    回复
登录 后发表内容
问题标签