/** * Handle Errors occurred * * @return void */ protected function _handleErrors() { parent::_handleErrors(); //handle errors if (isset($this->_response['errors']['su'])) { if (!isset($this->_response['errors']['su']['errors']['error'][0])) { $tmp = $this->_response['errors']['su']['errors']['error']; unset($this->_response['errors']['su']['errors']['error']); $this->_response['errors']['su']['errors']['error'][0] = $tmp; } foreach ($this->_response['errors']['su']['errors']['error'] as $error) { $this->errors['su'][] = $this->_getErrorBlock($error); } } //handle warnings if (isset($this->_response['new_transaction']['warnings']['su'])) { if (!isset($this->_response['new_transaction']['warnings']['su']['warnings']['warning'][0])) { $tmp = $this->_response['new_transaction']['warnings']['su']['warnings']['warning']; unset($this->_response['new_transaction']['warnings']['su']['warnings']['warning']); $this->_response['new_transaction']['warnings']['su']['warnings']['warning'][0] = $tmp; } foreach ($this->_response['new_transaction']['warnings']['su']['warnings']['warning'] as $warning) { $this->warnings['su'][] = $this->_getErrorBlock($warning); } } }