/** * Getter for refund's errors * * @param int $i (default 0) * @return bool|array */ public function getRefundError($i = 0) { if (isset($this->_response['refunds']) && isset($this->_response['refunds']['refund'])) { if (isset($this->_response['refunds']['refund'][$i]) && isset($this->_response['refunds']['refund'][$i]['errors'])) { $errorBlock = array(); foreach ($this->_response['refunds']['refund'][$i]['errors']['error'] as $error) { $errorBlock[] = $this->_getErrorBlock($error); } return parent::getError('all', array($errorBlock)); } } return false; }