退款退款
查询退款接口和查询订单接口问题使用的是查询退款接口 https://api.mch.weixin.qq.com/sandboxnew/pay/refundquery 如果是退款订单不存在应该返回的是 REFUNDNOTEXIST ,结果返回的是ORDERNOTEXIST 。 发送的xml如下: <xml> <appid>...</appid> <mch_id>1533174161</mch_id> <nonce_str>jINydcJJ6rmxUhMDeq7YQgPCQYtZX9kD</nonce_str> <offset>1</offset> <refund_id>4835844902820190830082343246</refund_id> <sign>1D6C0E9AD1BFF95BE5BAB2286E458A12</sign> </xml> 返回的xml如下: <xml> <nonce_str><![CDATA[jINydcJJ6rmxUhMDeq7YQgPCQYtZX9kD]]></nonce_str> <return_code><![CDATA[SUCCESS]]></return_code> <err_code_des><![CDATA[ORDERNOTEXIST]]></err_code_des> <sign><![CDATA[8C6192EE5CA4372340B59CC32D10C635]]></sign> <mch_id><![CDATA[1533174161]]></mch_id> <return_msg><![CDATA[OK]]></return_msg> <appid><![CDATA[...]]></appid> <device_info><![CDATA[sandbox]]></device_info> <result_code><![CDATA[FAIL]]></result_code> <err_code><![CDATA[ORDERNOTEXIST]]></err_code> </xml> 2 使用查询订单接口 https://api.mch.weixin.qq.com/sandboxnnew/pay/orderquery 第一次使用商户订单号查询正常返回结果,再使用返回结果中的微信订单号(transaction_id)去查询会提示如下: <xml> <return_code><![CDATA[FAIL]]></return_code> <retmsg><![CDATA[请确认请求参数是否正确param out_trade_no invalid]]></retmsg> <retcode><![CDATA[1]]></retcode> </xml> 并且这个return_msg 怎么变成了retmsg? 商户号:1533174161 商户订单号:2019083000000000115 微信订单号:4200115327120190830082337163137 商户退款单号:2019083000000000115 微信退款单号:4835844902820190830082343246
2020-12-01退款,支付宝账号是13155428538发错了,能退款吗
查询订单退款接口沙箱环境支付,查询,退款都返回正常的数据,只是调用退款查询时返回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,请问是什么原因造成了。需要如何修改? 谢谢!
2020-12-01