Closed 858864436 closed 1 year ago
$data = [ 'sub_mchid' => array_get($wxPayConf, 'mch_id'), 'sp_appid' => array_get($wxPayConf, 'appid'), 'transaction_id' => 'xxxxx', 'out_trade_no' => 'xxxxxx', 'out_refund_no' => 'TEST_REFUND' . time(), 'amount' => [ 'refund' => 1, 'total' => 5, 'currency' => 'CNY', ], ]; $wechat = \WePayV3\Refund::instance($wxPayConf); $result = $wechat->create($data);
报错 Array ( [code] => PARAM_ERROR [message] => 普通商户不允许传sub_mch_id )
H5微信支付申请退款官方文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_3_9.shtml 请求URL:https://api.mch.weixin.qq.com/v3/refund/domestic/refunds
你们请求URL: https://api.mch.weixin.qq.com/v3/ecommerce/refunds/apply
我将请求地址换成 https://api.mch.weixin.qq.com/v3/refund/domestic/refunds 参数按照官方文档要求, 退款成功。
麻烦作者帮我看看, 谢谢。
估计作者不维护这个项目了吧,好几个地方有问题
普通商户应该没有问题才对,目前不支持服务商,主要是因为没有此类测试账号进行调试。
已完善直连商户接口
$data = [ 'sub_mchid' => array_get($wxPayConf, 'mch_id'), 'sp_appid' => array_get($wxPayConf, 'appid'), 'transaction_id' => 'xxxxx', 'out_trade_no' => 'xxxxxx', 'out_refund_no' => 'TEST_REFUND' . time(), 'amount' => [ 'refund' => 1, 'total' => 5, 'currency' => 'CNY', ], ]; $wechat = \WePayV3\Refund::instance($wxPayConf); $result = $wechat->create($data);
报错 Array ( [code] => PARAM_ERROR [message] => 普通商户不允许传sub_mch_id )
H5微信支付申请退款官方文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_3_9.shtml 请求URL:https://api.mch.weixin.qq.com/v3/refund/domestic/refunds
你们请求URL: https://api.mch.weixin.qq.com/v3/ecommerce/refunds/apply
我将请求地址换成 https://api.mch.weixin.qq.com/v3/refund/domestic/refunds 参数按照官方文档要求, 退款成功。
麻烦作者帮我看看, 谢谢。