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