scan($trade); $codeUrl = null; if ($code) { $codeUrl = $this->url->get( ['for' => 'home.qrcode'], ['text' => urlencode($code)] ); } return $codeUrl ?: false; } public function status($tradeNo) { $wxpayService = new WxpayService(); return $wxpayService->status($tradeNo); } }