<?php namespace app\admin\controller; use app\common\service\pay\PayService; class IndexController extends BaseAdminController { /** * @notes 查询订单支付状态 */ public function wechatQuery() { $order_no = $this->request->get('order_no'); $order = [ 'out_trade_no' => $order_no, ]; $app = new PayService(0); try { $res = $app->wechat->query($order); return $this->success('查询成功', $res->toArray()); } catch (\Exception $e) { return $this->fail($e->extra['message']); } } }