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