public function getCodeUrl() { if ($this->isSuccessful() && $this->request->getTradeType() == 'NATIVE') { $data = $this->getData(); return $data['code_url']; } else { return null; } }