WxPayRefundQuery()退款查询函数 * * * * * ~~~ /** * 微信支付-退款查询 * @param $parment_id * @return array|成功时返回,其他抛异常 * @throws WxPayException */ function WxPayRefundQuery($parment_id) { $model = new \app\common\model\Payment(); if (!$payment = $model->getPaymentByFind(['payment_id' => $parment_id])) { return ['errCode' => -1, 'errMsg' => '交易单号不存在']; } if (setWxpayConfig($payment['mpid'])) { $input = new \WxPayRefundQuery(); $input->SetOut_trade_no($payment['order_number']); return \WxPayApi::refundQuery($input); } return ['errCode' => -1, 'errMsg' => '没有公众号配置信息']; } ~~~