getRestParams(); $routingNumber = array_shift($params); if (($field = array_shift($params)) && !in_array($field, $this->getConfigArray('allowedFields'))) { $this->_displayJson(['status' => 'error', 'message' => 'Invalid request']); } if (($bank = $this->_getDataObj()->search($routingNumber))) { if ($field) { $this->_displayJson(['status' => 'success', $field => $bank[$field]]); } $this->_displayJson(['status' => 'success', 'bank' => $bank]); } $this->_displayJson(['status' => 'error', 'message' => 'Bank not found']); } }