/** * Cabeçalho do relatórios * * @throws Exception */ public function Header() { $this->SetCreator(utf8_decode('Sistema: EcidadeOnline2 - DBSeller Sistemas Integrados')); $sLogotipoPrefeitura = APPLICATION_PATH . '/../public/global/img/brasao.jpg'; if (file_exists($sLogotipoPrefeitura)) { $this->Image($sLogotipoPrefeitura, $this->rMargin, $this->tMargin, 20); } $sNomePrefeitura = utf8_decode($this->oDadosPrefeitura->getNome()); $sRua = utf8_decode(trim($this->oDadosPrefeitura->getEndereco())); $sNumero = utf8_decode(trim($this->oDadosPrefeitura->getNumero())); $sMunicipio = utf8_decode(trim($this->oDadosPrefeitura->getMunicipio())); $sEstado = utf8_decode(trim($this->oDadosPrefeitura->getUf())); $sTelefone = utf8_decode(trim($this->oDadosPrefeitura->getTelefone())); $sTelefone = DBSeller_Helper_Number_Format::maskPhoneNumber($sTelefone); $sCnpj = utf8_decode(trim($this->oDadosPrefeitura->getCnpj())); $sCnpj = DBSeller_Helper_Number_Format::maskCPF_CNPJ($sCnpj); $sUrl = utf8_decode(trim($this->oDadosPrefeitura->getUrl())); $sEmail = utf8_decode(trim($this->oDadosPrefeitura->getEmail())); if (strlen($sNomePrefeitura) > 42) { $iTamanhoFonte = 8; } else { $iTamanhoFonte = 9; } $this->SetFont('Arial', 'BI', $iTamanhoFonte); $this->Text($this->rMargin + 22, $this->tMargin + 5, $sNomePrefeitura); $this->SetFont('Arial', 'I', 8); $sComplento = ''; if ($this->oDadosPrefeitura->getComplemento()) { $sComplento = ', ' . substr(trim($this->oDadosPrefeitura->getComplemento()), 0, 20); } $this->Text($this->rMargin + 22, $this->tMargin + 8, "{$sRua}, {$sNumero} {$sComplento}"); $this->Text($this->rMargin + 22, $this->tMargin + 11, "{$sMunicipio} - {$sEstado}"); $this->Text($this->rMargin + 22, $this->tMargin + 14, "{$sTelefone} - CNPJ : {$sCnpj}"); $this->Text($this->rMargin + 22, $this->tMargin + 17, $sEmail); $this->Text($this->rMargin + 22, $this->tMargin + 20, $sUrl); $this->SetFont('Arial', '', 7); $iComprimento = $this->w - $this->rMargin - $this->lMargin; if ($this->CurOrientation == 'L') { $iTamanhoRetangulo = $iComprimento - 200; $iRMargemRetangulo = $this->rMargin + 200; $iComprimento = $iComprimento - 6; } else { $iTamanhoRetangulo = $iComprimento - 120; $iRMargemRetangulo = $this->rMargin + 120; } $this->line($this->rMargin, $this->tMargin + 25, $iComprimento + $this->rMargin, $this->tMargin + 25); $this->setfillcolor(255); if (!empty($this->oCabecalho)) { if (count($this->oCabecalho->aLinhas) > 7) { throw new Exception('Número de Registro do Header é maior que o permitido.'); } foreach ($this->oCabecalho->aLinhas as $iLinha => $sHeader) { $this->SetXY($iComprimento - 60, $this->tMargin + 2 + $iLinha * 3); $this->Cell(70, 3, utf8_decode($sHeader), 0, 1, 'J', TRUE); } } $this->Rect($iRMargemRetangulo, $this->tMargin, $iTamanhoRetangulo, 25); $this->setY(35); $this->ln(5); }
/** * @param object $participation * @return void * @throws \Exception */ public function sendEmail($participation) { $email = $participation->getEmail(); $emailDomain = trim(strtolower(preg_replace('/^[^@]+@/', '', $email))); $participation->setEmailDomain($emailDomain); $participation->save(); $confirmationLink = $this->createConfirmationLink($participation->getConfirmationCode()); $parameters = array('confirmationLink' => $confirmationLink, 'participationId' => $participation->getId()); $emailDocumentPath = Plugin::getConfig()->get('emailDocumentPath'); $emailDocument = DocumentModel::getByPath($emailDocumentPath); if (!$emailDocument instanceof EmailDocument) { throw new \Exception("Error: emailDocumentPath [{$emailDocumentPath}] " . "is not a valid email document."); } $mail = new Mail(); $mail->addTo($email); if ($this->getSubject()) { $mail->setSubject($this->getSubject()); } $mail->setDocument($emailDocumentPath); $mail->setParams($parameters); $mail->send(); $note = new Note(); $note->setElement($participation); $note->setDate(time()); $note->setType("confirmation"); $note->setTitle("Email sent"); $note->addData("email", "text", $email); $note->setUser(0); $note->save(); }
/** * Set identity in session * * @param object $user */ private function setIdentity($user) { $st_identity = array('id' => $user->getId(), 'email' => $user->getEmail(), 'name' => $user->getName()); if ($user->profile) { $st_identity['profile_picture'] = $user->profile->getPicture(); } $this->session->set('auth-identity', $st_identity); }
/** * Store the parsed message in database * @access public * @param object $msg {@link xhelpParsedMsg} object Message to add * @param object $user {@link xoopsUser} object User that submitted message * @param object $mbox {@link xhelpDepartmentMailBox} object. Originating Mailbox for message * @return mixed Returns {@link xhelpTicket} object if new ticket, {@link xhelpResponses} object if a response, and false if unable to save. */ function &storeMsg(&$msg, &$user, &$mbox, &$errors) { //Remove any previous error messages $this->clearErrors(); $type = $msg->getMsgType(); switch ($type) { case _XHELP_MSGTYPE_TICKET: $obj =& $this->_hTicket->create(); $obj->setVar('uid', $user->getVar('uid')); $obj->setVar('subject', $msg->getSubject()); $obj->setVar('description', $msg->getMsg()); $obj->setVar('department', $mbox->getVar('departmentid')); $obj->setVar('priority', $mbox->getVar('priority')); $obj->setVar('posted', time()); $obj->setVar('serverid', $mbox->getVar('id')); $obj->setVar('userIP', 'via Email'); $obj->setVar('email', $user->getVar('email')); if (!($status = xhelpGetMeta("default_status"))) { xhelpSetMeta("default_status", "1"); $status = 1; } $obj->setVar('status', $status); $obj->createEmailHash($msg->getEmail()); if ($this->_hTicket->insert($obj)) { $obj->addSubmitter($user->getVar('email'), $user->getVar('uid')); $this->_saveAttachments($msg, $obj->getVar('id')); $errors = $this->_getErrors(); return array($obj); } break; case _XHELP_MSGTYPE_RESPONSE: if (!($ticket = $this->_hTicket->getTicketByHash($msg->getHash()))) { $this->_setError(_XHELP_RESPONSE_NO_TICKET); return false; } if ($msg->getEmail() != $ticket->getVar('email')) { $this->_setError(sprintf(_XHELP_MISMATCH_EMAIL, $msg->getEmail(), $ticket->getVar('email'))); return false; } $obj = $this->_hResponse->create(); $obj->setVar('ticketid', $ticket->getVar('id')); $obj->setVar('uid', $user->getVar('uid')); $obj->setVar('message', $msg->getMsg()); $obj->setVar('updateTime', time()); $obj->setVar('userIP', 'via Email'); if ($this->_hResponse->insert($obj)) { $this->_saveAttachments($msg, $ticket->getVar('id'), $obj->getVar('id')); $ticket->setVar('lastUpdated', time()); $this->_hTicket->insert($ticket); $errors = $this->_getErrors(); return array($ticket, $obj); } break; default: //Sanity Check, should never get here } return false; }
/** * Normalizes an object into a set of arrays/scalars. * * @param object $object object to normalize * @param string $format format the normalization result will be encoded as * @param array $context Context options for the normalizer * * @return array|string|bool|int|float|null */ public function normalize($object, $format = null, array $context = array()) { /** @var Payer $object */ $hasComments = true; $comments = $object->getComments(); if (is_null($comments) || $comments->getSize() == 0) { $hasComments = false; } else { $comments = $comments->getComments(); } return array_filter(array('@type' => $object->getType(), '@ref' => $object->getRef(), 'title' => $object->getTitle(), 'firstname' => $object->getFirstName(), 'surname' => $object->getSurname(), 'company' => $object->getCompany(), 'address' => $object->getAddress(), 'phonenumbers' => $object->getPhoneNumbers(), 'email' => $object->getEmail(), 'comments' => $hasComments ? array('comment' => $comments) : array()), array(NormaliserHelper::GetClassName(), "filter_data")); }
/** * Save the teammate * @param object $teammate * @return object */ public function save($teammate) { $teammateData = array('firstname' => $teammate->getFirstname(), 'lastname' => $teammate->getLastname(), 'email' => $teammate->getEmail(), 'phone' => $teammate->getPhone(), 'image' => $teammate->getImage()); if ($teammate->getId()) { $this->db->update('teammate', $teammateData, array('id' => $teammate->getId())); } else { $this->db->insert('teammate', $teammateData); // Get the id of the newly created artist and set it on the entity. $id = $this->db->lastInsertId(); $teammate->setId($id); } return $teammate; }
/** * Tests that mails for contact messages are correctly sent. */ function testSendPersonalContactMessage() { $this->drupalLogin($this->web_user); $message = $this->submitPersonalContact($this->contact_user); $mails = $this->drupalGetMails(); $this->assertEqual(1, count($mails)); $mail = $mails[0]; $this->assertEqual($mail['to'], $this->contact_user->getEmail()); $this->assertEqual($mail['from'], \Drupal::config('system.site')->get('mail')); $this->assertEqual($mail['reply-to'], $this->web_user->getEmail()); $this->assertEqual($mail['key'], 'user_mail'); $variables = array('!site-name' => \Drupal::config('system.site')->get('name'), '!subject' => $message['subject[0][value]'], '!recipient-name' => $this->contact_user->getUsername()); $this->assertEqual($mail['subject'], t('[!site-name] !subject', $variables), 'Subject is in sent message.'); $this->assertTrue(strpos($mail['body'], t('Hello !recipient-name,', $variables)) !== FALSE, 'Recipient name is in sent message.'); $this->assertTrue(strpos($mail['body'], $this->web_user->getUsername()) !== FALSE, 'Sender name is in sent message.'); $this->assertTrue(strpos($mail['body'], $message['message[0][value]']) !== FALSE, 'Message body is in sent message.'); // Check there was no problems raised during sending. $this->drupalLogout(); $this->drupalLogin($this->admin_user); // Verify that the correct watchdog message has been logged. $this->drupalGet('/admin/reports/dblog'); $placeholders = array('@sender_name' => $this->web_user->username, '@sender_email' => $this->web_user->getEmail(), '@recipient_name' => $this->contact_user->getUsername()); $this->assertText(String::format('@sender_name (@sender_email) sent @recipient_name an email.', $placeholders)); }
/** * Runs when new ticket is created * @param object $ticket * @param object $customer [optional] * @return */ public function ticketNew($ticket, $customer = null) { // If email notifications are not disabled, notify admin $department = $ticket->getDepartment(); /*parse content for send into mail*/ $originalContent = $ticket->getContent(); $parsedContent = $this->_parseContent($ticket); $ticket->setContent(nl2br($parsedContent)); $ticket->setContent($this->_processContent($ticket->getContent(), array('ticket' => $ticket, 'department' => $department))); if ($department->getEnabled() && $department->getNotify()) { // Notify admin/department $tpl = $department->getToAdminNewEmail(); $sender = array('name' => $customer->getName(), 'email' => $customer->getEmail()); $recipientEmail = $department->getContact(); $recipientName = $department->getName(); $mailTemplate = $this->_getMailTemplate($ticket, $department); if (!is_null($mailTemplate)) { $this->log('Sending mail about new ticket ' . $ticket->getUid() . ' to department ' . $recipientName . '<' . $recipientEmail . '>'); $mailTemplate->setDesignConfig(array('area' => 'backend', 'store' => $ticket->getStoreId()))->sendTransactional($tpl, $sender, $recipientEmail, $recipientName, array('ticket' => $ticket, 'department' => $department), $ticket->getStoreId()); } } if ($customer) { $recipientEmail = is_string($customer) ? $customer : $customer->getEmail(); $recipientName = is_string($customer) ? $customer : $customer->getName(); } else { $recipientEmail = $ticket->getCustomerEmail(); $recipientName = $ticket->getCustomerName(); } if ($recipientEmail) { if ($ticket->getCreatedBy() == 'admin') { $tpl = $department->getNewFromAdminToCustomer(); } else { $tpl = $department->getToCustomerNewEmail(); } $sender = $department->getSender(); $mailTemplate = $this->_getMailTemplate($ticket, $department); if (isset($mailTemplate) && !is_null($mailTemplate)) { $this->log('Sending mail about new ticket ' . $ticket->getUid() . ' to customer ' . $recipientName . '<' . $recipientEmail . '>'); $mailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => $ticket->getStoreId()))->sendTransactional($tpl, $sender, $recipientEmail, $recipientName, array('ticket' => $ticket, 'department' => $department), $ticket->getStoreId()); } } $ticket->setContent($originalContent); }
/** * Filters a new comment post and sends email replies to previous posters * @param object $comment the comment * @param object $owner the element commented upon. */ function emailReply($comment, $owner) { $gallery = new Gallery(); if ($comment->getInModeration() || $comment->getPrivate()) { return $comment; // we are not going to e-mail unless the comment has passed. } $oldcomments = $owner->comments; $emails = array(); foreach ($oldcomments as $oldcomment) { $name = $oldcomment['name']; $emails[$name] = $oldcomment['email']; } $emails = array_unique($emails); switch ($comment->getType()) { case "albums": $url = "album=" . urlencode($owner->name); $action = sprintf(gettext('A reply has been posted on album "%1$s".'), $owner->name); break; case "news": $url = "p=" . ZENPAGE_NEWS . "&title=" . urlencode($owner->getTitlelink()); $action = sprintf(gettext('A reply has been posted on article "%1$s".'), $owner->getTitlelink()); break; case "pages": $url = "p=" . ZENPAGE_PAGES . "&title=" . urlencode($owner->getTitlelink()); $action = sprintf(gettext('A reply has been posted on page "%1$s".'), $owner->getTitlelink()); break; default: // all image types $url = "album=" . urlencode($owner->album->name) . "&image=" . urlencode($owner->filename); $action = sprintf(gettext('A reply has been posted on "%1$s" the album "%2$s".'), $owner->getTitle(), $owner->getAlbumName()); } if ($comment->getAnon()) { $email = $name = '<' . gettext("Anonymous") . '>'; } else { $name = $comment->getname(); $email = $comment->getEmail(); } $message = $action . "\n\n" . sprintf(gettext('Author: %1$s' . "\n" . 'Email: %2$s' . "\n" . 'Website: %3$s' . "\n" . 'Comment:' . "\n\n" . '%4$s'), $name, $email, $comment->getWebsite(), $comment->getComment()) . "\n\n" . sprintf(gettext('You can view all comments about this item here:' . "\n" . '%1$s'), 'http://' . $_SERVER['SERVER_NAME'] . WEBPATH . '/index.php?' . $url) . "\n\n"; $on = gettext('Reply posted'); zp_mail("[" . $gallery->getTitle() . "] {$on}", $message, $emails); return $comment; }
/** * Return Merge Fields mapped to Magento attributes * * @param object $customer * @param bool $includeEmail * @param integer $websiteId * @return array */ public function getMergeVars($customer, $includeEmail = FALSE, $websiteId = NULL) { $merge_vars = array(); $maps = $this->getMergeMaps($customer->getStoreId()); if (!$maps) { return; } $request = Mage::app()->getRequest(); //Add Customer data to Subscriber if is Newsletter_Subscriber is Customer if (!$customer->getDefaultShipping() && $customer->getEntityId()) { $customer->addData(Mage::getModel('customer/customer')->load($customer->getEntityId())->setStoreId($customer->getStoreId())->toArray()); } foreach ($maps as $map) { $customAtt = $map['magento']; $chimpTag = $map['mailchimp']; if ($chimpTag && $customAtt) { $key = strtoupper($chimpTag); switch ($customAtt) { case 'gender': $val = (int) $customer->getData(strtolower($customAtt)); if ($val == 1) { $merge_vars[$key] = 'Male'; } elseif ($val == 2) { $merge_vars[$key] = 'Female'; } break; case 'dob': $dob = (string) $customer->getData(strtolower($customAtt)); if ($dob) { $merge_vars[$key] = substr($dob, 5, 2) . '/' . substr($dob, 8, 2); } break; case 'billing_address': case 'shipping_address': $addr = explode('_', $customAtt); $address = $customer->{'getPrimary' . ucfirst($addr[0]) . 'Address'}(); if ($address) { $merge_vars[$key] = array('addr1' => $address->getStreet(1), 'addr2' => $address->getStreet(2), 'city' => $address->getCity(), 'state' => !$address->getRegion() ? $address->getCity() : $address->getRegion(), 'zip' => $address->getPostcode(), 'country' => $address->getCountryId()); $telephone = $address->getTelephone(); if ($telephone) { $merge_vars['TELEPHONE'] = $telephone; } $company = $address->getCompany(); if ($company) { $merge_vars['COMPANY'] = $company; } } break; case 'date_of_purchase': $last_order = Mage::getResourceModel('sales/order_collection')->addFieldToFilter('customer_email', $customer->getEmail())->addFieldToFilter('state', array('in' => Mage::getSingleton('sales/order_config')->getVisibleOnFrontStates()))->setOrder('created_at', 'desc')->getFirstItem(); if ($last_order->getId()) { $merge_vars[$key] = Mage::helper('core')->formatDate($last_order->getCreatedAt()); } break; case 'ee_customer_balance': $merge_vars[$key] = ''; if ($this->isEnterprise() && $customer->getId()) { $_customer = Mage::getModel('customer/customer')->load($customer->getId()); if ($_customer->getId()) { if (Mage::app()->getStore()->isAdmin()) { $websiteId = is_null($websiteId) ? Mage::app()->getStore()->getWebsiteId() : $websiteId; } $balance = Mage::getModel('enterprise_customerbalance/balance')->setWebsiteId($websiteId)->setCustomerId($_customer->getId())->loadByCustomer(); $merge_vars[$key] = $balance->getAmount(); } } break; case 'group_id': $group_id = (int) $customer->getData(strtolower($customAtt)); $customerGroup = Mage::helper('customer')->getGroups()->toOptionHash(); if ($group_id == 0) { $merge_vars[$key] = 'NOT LOGGED IN'; } else { $merge_vars[$key] = $customerGroup[$group_id]; } break; default: if ($value = (string) $customer->getData(strtolower($customAtt)) or $value = (string) $request->getPost(strtolower($customAtt))) { $merge_vars[$key] = $value; } break; } } } //GUEST if (!$customer->getId() && (!$request->getPost('firstname') || !$request->getPost('lastname'))) { $guestFirstName = $this->config('guest_name', $customer->getStoreId()); $guestLastName = $this->config('guest_lastname', $customer->getStoreId()); if ($guestFirstName) { $merge_vars['FNAME'] = $guestFirstName; } if ($guestLastName) { $merge_vars['LNAME'] = $guestLastName; } } //GUEST if ($includeEmail) { $merge_vars['EMAIL'] = $customer->getEmail(); } $groups = $customer->getListGroups(); $groupings = array(); if (is_array($groups) && count($groups)) { foreach ($groups as $groupId => $grupoptions) { $groupings[] = array('id' => $groupId, 'groups' => is_array($grupoptions) ? implode(', ', $grupoptions) : $grupoptions); } } $merge_vars['GROUPINGS'] = $groupings; //magemonkey_mergevars_after $blank = new Varien_Object(); Mage::dispatchEvent('magemonkey_mergevars_after', array('vars' => $merge_vars, 'customer' => $customer, 'newvars' => $blank)); if ($blank->hasData()) { $merge_vars = array_merge($merge_vars, $blank->toArray()); } //magemonkey_mergevars_after return $merge_vars; }
/** * apply uses this. Password reset also uses it in the case of a user who * was never verified to begin with. * @param object $profile */ protected function sendVerificationMail($profile) { $this->mail(array('subject' => 'Spreadly -Zugang zu bestätigen / account to be confirmed', 'fullname' => $profile->getFullname(), 'email' => $profile->getEmail(), 'parameters' => array('fullname' => $profile->getFullname(), 'validate' => $profile->getValidate()), 'text' => 'sfApply/sendValidateNewText')); }
/** * @param object $object * @return array */ protected function getRecipient($object) { $recipient = []; if ($object instanceof BillingAddress || $object instanceof Participant) { $recipient = [$object->getEmail() => $object->getName()]; } elseif ($object instanceof Registration) { $recipient = $this->getRecipient($object->getBillingAddress()); } elseif (is_array($object) && isset($object['registration'])) { return $this->getRecipient($object['registration']); } return $recipient; }
/** * Method to get the details of a user * * @author KnowledgeTree Team * @access private * @param object $oUser The user object * @return array $results The user details in an array */ private function _get_user_details($oUser) { $results['user_id'] = $oUser->getId(); $results['username'] = $oUser->getUsername(); $results['name'] = $oUser->getName(); $results['email'] = $oUser->getEmail(); return $results; }
/** * Authorize and Prosses order using the AuthnetAIM.class.php class. * Fill object of the class ($payment), then send to process order, * this order then gives a echo for the payment error or recieved. * Tutorial: http://www.johnconde.net/blog/tutorial-integrating-the-authorizenet-aim-api-with-php/ * @param object $ccInfo Object containing info for the Authorize.NET API. * @return void */ function wc_AuthorizeCard($ccInfo) { require 'AuthnetAIM.class.php'; $payment = new AuthnetAIM("52H4eeYq", "7RD64g4h993VE6rp", true); $payment->setTransaction($ccInfo->getCreditCard(), $ccInfo->getExpiration(), $ccInfo->getTotal()); $payment->setParameter("x_description", $ccInfo->getProduct()); $payment->setParameter("x_email", $ccInfo->getEmail()); $payment->setParameter("x_first_name", $ccInfo->getName()); $payment->process(); if ($payment->isApproved()) { echo "Payment Received/Approved"; } if ($payment->isError()) { $error_number = $payment->getResponseSubcode(); $error_message = $payment->getResponseText(); echo $payment->getResponseMessage(); } }
/** * Returns Ticket details from object * * @param object $_ticketObject * * @return array $_ticket */ public function getTicketDetailsByObject($_ticketObject) { $_ticket = array(); $_ticket['ticketid'] = $_ticketObject->getId(); $_ticket['displayticketid'] = $_ticketObject->getDisplayId(); $_ticket['departmentid'] = $_ticketObject->getDepartmentId(); $_ticket['department'] = $_ticketObject->getDepartment()->getTitle(); $_ticket['ticketstatusid'] = $_ticketObject->getStatusId(); $_ticket['status'] = $_ticketObject->getStatus()->getTitle(); $_ticket['statusbgcolor'] = $_ticketObject->getStatus()->getStatusBackgroundColor(); $_ticket['priorityid'] = $_ticketObject->getPriorityId(); $_ticket['priority'] = $_ticketObject->getPriority()->getTitle(); $_ticket['prioritybgcolor'] = $_ticketObject->getPriority()->getBackgroundColor(); $_ticket['userid'] = $_ticketObject->getUserId(); $_ticket['tickettypeid'] = $_ticketObject->getTypeId(); $_ticket['type'] = $_ticketObject->getType()->getTitle(); $_ticket['userid'] = $_ticketObject->getUserId(); $_ticket['fullname'] = $_ticketObject->getFullName(); $_ticket['email'] = $_ticketObject->getEmail(); $_ticket['ownerstaffid'] = $_ticketObject->getOwnerStaffId(); $_ticket['lastreplier'] = $_ticketObject->getLastReplier(); $_ticket['subject'] = $_ticketObject->getSubject(); $_ticket['dateline'] = $_ticketObject->getCreationTime(); $_ticket['lastactivity'] = $_ticketObject->getLastActivity(); return $_ticket; }
/** * Build an xtcommerce address Array from a KlarnaAddr object. * * @param object $address KlarnaAddr object * * @return array xtcommerce address */ public function klarnaAddrToXtcAddr($address) { global $order; return array('firstname' => KiTT_String::decode($address->getFirstName()), 'lastname' => KiTT_String::decode($address->getLastName()), 'street_address' => KiTT_String::decode($address->getStreet() . ' ' . $address->getHouseNumber() . ' ' . $address->getHouseExt()), 'postcode' => KiTT_String::decode($address->getZipCode()), 'city' => KiTT_String::decode($address->getCity()), 'telephone' => KiTT_String::decode($address->getTelNo()), 'email_address' => KiTT_String::decode($address->getEmail()), 'company' => KiTT_String::decode($address->getCompanyName()), 'state' => $order->delivery['state'], 'zone_id' => $order->delivery['zone_id'], 'country_id' => $order->delivery['country_id'], 'country' => array('id' => $order->delivery['country']['id'], 'title' => $order->delivery['country']['title'], 'iso_code_2' => $order->delivery['country']['iso_code_2'], 'iso_code_3' => $order->delivery['country']['iso_code_3'])); }