收藏
回答

合单支付报错-POST_CONTEN_ERROR 报文哪里有问题?

【请求数据】:<xml>

  <sign>AAA909C3BDA5CF4D1B859E9BEE2072C94C3FC8BC1D8B7E130859625398207760</sign>

  <sign_type>HMAC-SHA256</sign_type>

  <combine_appid>wxceac96733a5f0c77</combine_appid>

  <combine_mch_id>1544564361</combine_mch_id>

  <device_info>test</device_info>

  <nonce_str>1571887469061</nonce_str>

  <combine_out_trade_no>9bd94819-2588-401c-83a8-06baec5d</combine_out_trade_no>

  <spbill_create_ip>192.168.10.107</spbill_create_ip>

  <time_start>20191024112429</time_start>

  <time_expire>20191024113929</time_expire>

 http://api-test.insuresmart.com.cn/v2/gateway/insureWechat.wechat.unifiedOrder.payNotify/v1

  <trade_type>JSAPI</trade_type>

  <combine_openid>os_Dg0uIp8hx0x3qNTfpPYmfaZ7w</combine_openid>

  <sub_order_list>&lt;![CDATA[{"order_num":3,"order_list":[{"appid":"wxceac96733a5f0c77","attach":"药费","body":"药费","fee_type":"CNY","mch_id":"1552398041","out_trade_no":"4ac4c7e8-7a08-4038-af3f-178f520e","total_fee":1},{"appid":"wxceac96733a5f0c77","attach":"服务费","body":"服务费","fee_type":"CNY","mch_id":"1544564361","out_trade_no":"6cc6278e-c584-44ec-8027-f01b41e0","total_fee":1},{"appid":"wxceac96733a5f0c77","attach":"保费","body":"保险费","fee_type":"CNY","mch_id":"1437788202","out_trade_no":"cb4a8411-c3a7-462b-bf74-e354a8a2","total_fee":1}]}]&gt;</sub_order_list>

</xml>

【响应数据】:<xml><return_code><![CDATA[FAIL]]></return_code>

<return_msg><![CDATA[System Error]]></return_msg>

<err_code><![CDATA[POST_CONTEN_ERROR]]></err_code>

<err_code_des><![CDATA[some params type maybe misused.]]></err_code_des>

</xml>

sub_order_list中的数据对<>进行了转译 ,如果不转译则会报下面的错误:

【请求数据】:<xml>

<sign>583703EB1C869BC611D22ABE95BF9F37E2BB9879B424DBB8B2777109E52C8634</sign>

  <sign_type>HMAC-SHA256</sign_type>

  <combine_appid>wxceac96733a5f0c77</combine_appid>

  <nonce_str>1571829755923</nonce_str>

  <combine_out_trade_no>8adda788-06c1-4ee1-a795-ad4c5e44</combine_out_trade_no>

  <spbill_create_ip>192.168.10.107</spbill_create_ip>

  <time_start>20191023192235</time_start>

  <time_expire>20191023193735</time_expire>

 <notify_url>http://api-test.insuresmart.com.cn/v2/gateway/insureWechat.wechat.unifiedOrder.payNotify/v1</notify_url>

  <trade_type>JSAPI</trade_type>

  <combine_openid>os_Dg0uIp8hx0x3qNTfpPYmfaZ7w</combine_openid>  <sub_order_list><![CDATA[{"order_num":3,"order_list":[{"appid":"wxceac96733a5f0c77","attach":"药费","body":"药费","fee_type":"CNY","mch_id":"1552398041","out_trade_no":"46216def-0a88-4b80-963d-a69b5ba1","total_fee":1},{"appid":"wxceac96733a5f0c77","attach":"服务费","body":"服务费","fee_type":"CNY","mch_id":"1544564361","out_trade_no":"f490fcb3-6236-4ea7-9e68-64cf8a8f","total_fee":1},{"appid":"wxceac96733a5f0c77","attach":"保费","body":"保险费","fee_type":"CNY","mch_id":"1437788202","out_trade_no":"6aa45636-4cc7-4065-a05a-01ba3a7c","total_fee":1}]}]></sub_order_list>

</xml>

【响应数据】:<xml><return_code><![CDATA[FAIL]]></return_code>

<return_msg><![CDATA[System Error]]></return_msg>

<err_code><![CDATA[XML_FORMAT_ERROR]]></err_code>

<err_code_des><![CDATA[xml format error.]]></err_code_des>

</xml>




最后一次编辑于  2019-10-24
回答关注问题邀请回答
收藏

3 个回答

  • ............
    ............
    2020-01-14

    请问一下,子单商户号是哪来的

    2020-01-14
    有用
    回复
  • Guo
    Guo
    2019-10-24

    问题已解决,官方文档中的示例有点儿误导,下面标红的部分去掉:


    实测请求示例:

    【请求地址】:https://api.mch.weixin.qq.com/pay/combinedorder

    【请求数据】:<xml>

      <sign>2AF353E7E01C76BE1C9BC2EA86F8074318D57FF43DAE1A83647DB66526D448C0</sign>

      <sign_type>HMAC-SHA256</sign_type>

      <combine_appid>wxceac96733a5f0c77</combine_appid>

      <combine_mch_id>1544564361</combine_mch_id>

      <device_info>test</device_info>

      <nonce_str>1571898116725</nonce_str>

      <combine_out_trade_no>2d86dcd6-3b52-4960-a444-6db59ae8</combine_out_trade_no>

      <spbill_create_ip>192.168.10.107</spbill_create_ip>

      <time_start>20191024142156</time_start>

      <time_expire>20191024143656</time_expire>

      <notify_url>http://api-test.insuresmart.com.cn/v2/gateway/insureWechat.wechat.unifiedOrder.payNotify/v1</notify_url>

      <trade_type>JSAPI</trade_type>

      <combine_openid>os_Dg0uIp8hx0x3qNTfpPYmfaZ7w</combine_openid>

      <sub_order_list>{"order_num":3,"order_list":[{"appid":"wxceac96733a5f0c77","attach":"药费","body":"药费","fee_type":"CNY","mch_id":"1552398041","out_trade_no":"700ff2dc-5cdd-4c53-a45a-c1aa6bf9","total_fee":1},{"appid":"wxceac96733a5f0c77","attach":"服务费","body":"服务费","fee_type":"CNY","mch_id":"1544564361","out_trade_no":"9ac3307a-61ed-4937-b0cd-83a56b33","total_fee":1},{"appid":"wxceac96733a5f0c77","attach":"保费","body":"保险费","fee_type":"CNY","mch_id":"1437788202","out_trade_no":"41032654-d13b-4fc2-a321-a07835ab","total_fee":1}]}</sub_order_list>

    </xml>

    【响应数据】:<xml><return_code><![CDATA[SUCCESS]]></return_code>

    <return_msg><![CDATA[OK]]></return_msg>

    <combine_appid><![CDATA[wxceac96733a5f0c77]]></combine_appid>

    <combine_mch_id><![CDATA[1544564361]]></combine_mch_id>

    <device_info><![CDATA[test]]></device_info>

    <nonce_str><![CDATA[OtHaqBY9pZ8OFdr7]]></nonce_str>

    <sign><![CDATA[DA8FC68712EAD6907EC20086D5B02774E9CC8DFC4AD6F99682A6AEAFE80BE8D1]]></sign>

    <result_code><![CDATA[SUCCESS]]></result_code>

    <prepay_id><![CDATA[up_wx241422221871815680a93f551807071900]]></prepay_id>

    <trade_type><![CDATA[JSAPI]]></trade_type>

    </xml>





    2019-10-24
    有用
    回复
  • 微信支付技术助手1
    微信支付技术助手1
    2019-10-24

    some params type maybe misused  参数类型不正确,请检查参数类型设定是否和文档一致。

    2019-10-24
    有用
    回复 1
    • Guo
      Guo
      2019-10-24
      每个参数类型都核对过了的  只有order_list参数内容中的order_num和total_fee是int类型,其他参数都是String
      2019-10-24
      回复
登录 后发表内容
问题标签