收藏
回答

微信支付 请求中含有未在API文档中定义的参数,怎么解决?

微信下单接口返回错误:https://api.mch.weixin.qq.com/pay/unifiedorder


<?xml version="1.0" encoding="utf-16"?>

<xml xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <appid>wx5d75fbe067ffxxxx</appid>

  <mch_id>162117xxxx</mch_id>

  <nonce_str>47d389671794470dba3d02ee4e0820a2</nonce_str>

  <sign>EB67901D34872B1A3B0E4FA15C240AA1</sign>

  <body>xxxxxxxxxx</body>

  <out_trade_no>230208171922596524</out_trade_no>

  <total_fee>1980</total_fee>

  <spbill_create_ip>31.39.40.94</spbill_create_ip>

  <notify_url>http://bbb.oxxxxx.com/pay/notify</notify_url>

  <trade_type>MWEB</trade_type>

</xml>

返回错误:

<?xml version="1.0" encoding="utf-16"?>

<xml xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <return_code>FAIL</return_code>

  <return_msg>请求中含有未在API文档中定义的参数</return_msg>

</xml>


请问什么原因,之前都是好的,突然就不行了

最后一次编辑于  2023-02-08
回答关注问题邀请回答
收藏

2 个回答

  • Memory
    Memory
    2023-02-09

    你需要这样传,不支持传文档内没有的参数

    
    <xml>
    
    
      <appid>wx5d75fbe067ffxxxx</appid>
    
    
      <mch_id>162117xxxx</mch_id>
    
    
      <nonce_str>47d389671794470dba3d02ee4e0820a2</nonce_str>
    
    
      <sign>EB67901D34872B1A3B0E4FA15C240AA1</sign>
    
    
      <body>xxxxxxxxxx</body>
    
    
      <out_trade_no>230208171922596524</out_trade_no>
    
    
      <total_fee>1980</total_fee>
    
    
      <spbill_create_ip>31.39.40.94</spbill_create_ip>
    
    
      <notify_url>http://bbb.oxxxxx.com/pay/notify</notify_url>
    
    
      <trade_type>MWEB</trade_type>
    
    
    </xml>
    
    
    
    2023-02-09
    有用 2
    回复 3
    • 沈先飞
      沈先飞
      2023-02-09
      确实可以了,不过挺没道理啊,我们其它支付都是好的,就是2个长时间没用的出现这个问题呢
      2023-02-09
      回复
    • Memory
      Memory
      2023-02-09回复沈先飞
      后续会全部拦截,建议早点处理
      2023-02-09
      1
      回复
    • 沈先飞
      沈先飞
      2023-02-09回复Memory
      好的,谢谢
      2023-02-09
      回复
  • 青寒
    青寒
    2023-02-08

    把xmlns这些去掉试试?

    2023-02-08
    有用
    回复
登录 后发表内容