'Unknown error' ); public function prepareServiceResponse($response) { return (is_array($response) && isset($response['price'])) ? $this->setIsSuccess()->setData(array( 'serviceDetails' => $this->getServiceDetails(), 'rate' => array('total' => $response['price']) )) : $this->setIsSuccess(false)->setData(array( 'errorCode' => self::ERROR_UNKNOWN, 'errorText' => $this->_errorMap[self::ERROR_UNKNOWN] )); } }