收藏
回答

查询订单退款接口

沙箱环境支付,查询,退款都返回正常的数据,只是调用退款查询时返回ORDERNOTEXIST,请问是什么原因。

支付请求接口地址:https://api.mch.weixin.qq.com/sandboxnew/pay/micropay

请求数据参数:<xml><appid><![CDATA[wx75e97af611a2b16e]]></appid><attach>1086</attach><auth_code>134732310739309040</auth_code><body><![CDATA[沈阳分公司******]]></body><detail><![CDATA[{"cost_price":502,"goods_detail":{"goods_id":"1086","goods_name":"沈阳分公司******","quantity":1,"price":502}}]]></detail><device_info>1086</device_info><goods_tag><![CDATA[test]]></goods_tag><mch_id>1438317602</mch_id><nonce_str><![CDATA[cwxdsamgp2tnb84m5x5luyuu11yazncf]]></nonce_str><out_trade_no><![CDATA[8bb12bf2ce182302bdd2ddaafa7cfa7c]]></out_trade_no><spbill_create_ip><![CDATA[127.0.0.1]]></spbill_create_ip><sub_mch_id>1546002931</sub_mch_id><time_expire>20190904102417</time_expire><time_start>20190904101417</time_start><total_fee>502</total_fee><sign><![CDATA[AE7FE5598D73006A24C51C64CF03F2FE]]></sign></xml>

返回数据:

[appid] => wx75e97af611a2b16e

    [attach] => 1086

    [bank_type] => CMC

    [cash_fee] => 501

    [cash_fee_type] => CNY

    [coupon_batch_id_0] => 12345

    [coupon_count] => 1

    [coupon_fee] => 1

    [coupon_fee_0] => 1

    [coupon_id_0] => 10000

    [coupon_type_0] => CASH

    [device_info] => 1086

    [err_code] => SUCCESS

    [err_code_des] => ok

    [fee_type] => CNY

    [is_subscribe] => Y

    [mch_id] => 1438317602

    [nonce_str] => cwxdsamgp2tnb84m5x5luyuu11yazncf

    [openid] => 085e9858e9914da9a0da5522a

    [out_trade_no] => 8bb12bf2ce182302bdd2ddaafa7cfa7c

    [result_code] => SUCCESS

    [return_code] => SUCCESS

    [return_msg] => OK

    [settlement_total_fee] => 501

    [sign] => 6FDEB205C4E4A40C672804483B6DFB9A

    [time_end] => 20190904101419

    [total_fee] => 502

    [trade_type] => MICROPAY

    [transaction_id] => 4243717388620190904101419496874

订单查询请求接口地址:https://api.mch.weixin.qq.com/sandboxnew/pay/orderquery

请求参数:<xml><appid><![CDATA[wx75e97af611a2b16e]]></appid><mch_id>1438317602</mch_id><nonce_str><![CDATA[n6z54eqv2vhc7ra08mnacae1h6m1gpms]]></nonce_str><out_trade_no><![CDATA[8bb12bf2ce182302bdd2ddaafa7cfa7c]]></out_trade_no><sub_mch_id>1546002931</sub_mch_id><sign><![CDATA[1835D78D6B373D9CE8D993B4EE75E62B]]></sign></xml>

返回数据:

[appid] => wx75e97af611a2b16e

    [attach] => sandbox_attach

    [bank_type] => CMC

    [cash_fee] => 501

    [cash_fee_type] => CNY

    [coupon_batch_id_0] => 12345

    [coupon_count] => 1

    [coupon_fee] => 1

    [coupon_fee_0] => 1

    [coupon_id_0] => 10000

    [coupon_type_0] => NO_CASH

    [device_info] => sandbox

    [err_code] => SUCCESS

    [err_code_des] => SUCCESS

    [fee_type] => CNY

    [is_subscribe] => Y

    [mch_id] => 1438317602

    [nonce_str] => n6z54eqv2vhc7ra08mnacae1h6m1gpms

    [openid] => wxd930ea5d5a258f4f

    [out_trade_no] => 8bb12bf2ce182302bdd2ddaafa7cfa7c

    [result_code] => SUCCESS

    [return_code] => SUCCESS

    [return_msg] => OK

    [settlement_total_fee] => 501

    [sign] => A03387A267E7B8C5DF326634C73F1D41

    [sub_mch_id] => 1546002931

    [time_end] => 20190904101726

    [total_fee] => 502

    [trade_state] => SUCCESS

    [trade_state_desc] => ok

    [trade_type] => APP

    [transaction_id] => 4460894749920190904101726391500


退款接口地址:https://api.mch.weixin.qq.com/sandboxnew/pay/refund

请求数据:<xml><appid><![CDATA[wx75e97af611a2b16e]]></appid><mch_id>1438317602</mch_id><nonce_str><![CDATA[qrv4gfgtvk2pbtc7tq7wi7l15dh3inov]]></nonce_str><op_user_id>1438317602</op_user_id><out_refund_no>1567563875</out_refund_no><out_trade_no><![CDATA[8bb12bf2ce182302bdd2ddaafa7cfa7c]]></out_trade_no><refund_fee>502</refund_fee><sub_mch_id>1546002931</sub_mch_id><total_fee>502</total_fee><sign><![CDATA[357CCCFB4A6CC88C2FC98764CFE499DF]]></sign></xml>

返回数据:

[appid] => wx75e97af611a2b16e

    [bank_type] => CMC

    [cash_fee] => 501

    [cash_fee_type] => CNY

    [cash_refund_fee] => 501

    [cash_refund_fee_type] => CNY

    [coupon_refund_count] => 1

    [coupon_refund_fee] => 1

    [coupon_refund_fee_0] => 1

    [coupon_refund_id_0] => 12345

    [coupon_type_0] => NO_CASH

    [device_info] => sandbox

    [err_code] => SUCCESS

    [err_msg] => SUCCESS

    [fee_type] => CNY

    [mch_id] => 1438317602

    [nonce_str] => qrv4gfgtvk2pbtc7tq7wi7l15dh3inov

    [openid] => wxd930ea5d5a258f4f

    [out_refund_no] => 1567563875

    [out_trade_no] => 8bb12bf2ce182302bdd2ddaafa7cfa7c

    [refund_fee] => 502

    [refund_fee_type] => CNY

    [refund_id] => 4266893025120190904102437784

    [result_code] => SUCCESS

    [return_code] => SUCCESS

    [return_msg] => OK

    [settlement_refund_fee] => 501

    [settlement_total_fee] => 501

    [sign] => B2D7B0BE6A4B399BE953462D764EB9EB

    [total_fee] => 502

    [trade_type] => MICROPAY

    [transaction_id] => 4266893025120190904102437784527


退款查询地址:https://api.mch.weixin.qq.com/sandboxnew/pay/refundquery

请求数据:<xml><appid><![CDATA[wx75e97af611a2b16e]]></appid><mch_id>1438317602</mch_id><nonce_str><![CDATA[zfzzk470y0cxofxn8qivvn6lqc57jgk1]]></nonce_str><out_trade_no><![CDATA[8bb12bf2ce182302bdd2ddaafa7cfa7c]]></out_trade_no><sign><![CDATA[AE7DBBD1E4E2A2A3231C7C8BBB645C7E]]></sign></xml>


返回数据:

[appid] => wx75e97af611a2b16e

    [device_info] => sandbox

    [err_code] => ORDERNOTEXIST

    [err_code_des] => ORDERNOTEXIST

    [mch_id] => 1438317602

    [nonce_str] => zfzzk470y0cxofxn8qivvn6lqc57jgk1

    [result_code] => FAIL

    [return_code] => SUCCESS

    [return_msg] => OK

    [sign] => 4F40FEED470E2DA2DB8074CBDED302EE


每次退款查询都是返回订单不存在ORDERNOTEXIST,请问是什么原因造成了。需要如何修改?


谢谢!


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

2 个回答

  • 天路
    天路
    发表于移动端
    2020-12-01
    退款,支付宝账号是13155428538发错了,能退款吗
    2020-12-01
    有用
    回复
  • 微信支付技术助手1
    微信支付技术助手1
    2019-09-05

    确认支付成功的情况下,需要确认单号是否正确

    2019-09-05
    有用
    回复 2
    • 璟
      2019-09-05
      已解决,谢谢。
      2019-09-05
      回复
    • CJ
      CJ
      2019-09-30回复
      请问怎么解决的?
      2019-09-30
      回复
登录 后发表内容
问题标签