/** * Envia mensajes al usuario una vez que ha sido creada la consulta * con los datos de pago que ha enviado. * * @param string $summary * @param string $description * @param int $projectId * @param int $specialistId * @param string $payName * @param string $payPrice * @param string $payTax * @param string $payTotalAmount */ public function sendEmail($summary, $description, $projectId, $specialistId, $payName, $payPrice, $payTax, $payTotalAmount) { try { // se obtiene el nombre de la especialidad $project = $this->getProject($projectId); // se obtiene el nombre del médico $specialist = getValue('label_specialists'); if ($specialistId != null) { $specialist = $this->getUserById($specialistId); $specialist = $specialist->realname; } // se obtienen las configuraciones generales de Joomla $config = JFactory::getConfig(); // se obtienen los datos del usuario $user = JFactory::getUser(); // se crean los campos principales del mensaje $from = $config->get('mailfrom'); $fromName = $config->get('fromname'); $recipient = $user->email; $subject = getValueIn('email_titleCreateConsult'); // se crea el cuerpo del mensaje $body = getValueIn('email_bodyCreateConsult') . "<br>"; $body .= getValueIn('label_user') . ': ' . $user->username . "<br>"; $body .= getValueIn('label_service') . ': ' . $payName . "<br>"; $body .= getValueIn('label_speciality') . ': ' . $project->name . "<br>"; $body .= getValueIn('label_specialist') . ': ' . $specialist . "<br>"; $body .= getValueIn('label_summary') . ': ' . $summary . "<br>"; $body .= getValueIn('label_price') . ': ' . $payPrice . "<br>"; $body .= getValueIn('label_tax') . ': ' . $payTax . "<br>"; $body .= getValueIn('label_total_amount') . ': ' . $payTotalAmount . "<br><br>"; $body .= getValueIn('email_bodyFooter'); // se envía el mensaje JFactory::getMailer()->sendMail($from, $fromName, $recipient, $subject, $body); } catch (Exception $e) { } }
/** * Establece la configuración de las variables de pago en dependencia * del proyecto seleccionado. Los dos tipos de pagos configurados son * Paypal y TPV. * @param String $paymentType */ function setProjectPaypalConfiguration($paymentType = MN_PAY_PAYPAL) { if ($paymentType == MN_PAY_PAYPAL) { switch ($_SESSION['projectId']) { case PROJECT_SECOND_OPINION: $GLOBALS['PAY_PRICE'] = PAYPAL_PRICE_SECOND_OPINION; $GLOBALS['PAY_SHIPPING'] = PAYPAL_SHIPPING_SECOND_OPINION; $GLOBALS['PAY_TAX'] = PAYPAL_TAX_SECOND_OPINION; $GLOBALS['PAY_TOTAL_AMOUNT'] = PAYPAL_TOTAL_AMOUNT_SECOND_OPINION; $GLOBALS['PAY_NAME'] = getValueIn('label_project_second_opinion_title'); $GLOBALS['PAY_DESCRIPTION'] = getValueIn('label_project_second_opinion_description'); break; case PROJECT_VIRTUAL_CONSULTATION: $GLOBALS['PAY_PRICE'] = PAYPAL_PRICE_VIRTUAL_CONSULTATION; $GLOBALS['PAY_SHIPPING'] = PAYPAL_SHIPPING_VIRTUAL_CONSULTATION; $GLOBALS['PAY_TAX'] = PAYPAL_TAX_VIRTUAL_CONSULTATION; $GLOBALS['PAY_TOTAL_AMOUNT'] = PAYPAL_TOTAL_AMOUNT_VIRTUAL_CONSULTATION; $GLOBALS['PAY_NAME'] = getValueIn('label_project_virtual_consultation_title'); $GLOBALS['PAY_DESCRIPTION'] = getValueIn('label_project_virtual_consultation_description'); break; case PROJECT_RAPID_CONSULTATION: $GLOBALS['PAY_PRICE'] = PAYPAL_PRICE_RAPID_CONSULTATION; $GLOBALS['PAY_SHIPPING'] = PAYPAL_SHIPPING_RAPID_CONSULTATION; $GLOBALS['PAY_TAX'] = PAYPAL_TAX_RAPID_CONSULTATION; $GLOBALS['PAY_TOTAL_AMOUNT'] = PAYPAL_TOTAL_AMOUNT_RAPID_CONSULTATION; $GLOBALS['PAY_NAME'] = getValueIn('label_project_rapid_consultation_title'); $GLOBALS['PAY_DESCRIPTION'] = getValueIn('label_project_rapid_consultation_description'); break; case PROJECT_HEALTH_PROGRAM: $GLOBALS['PAY_PRICE'] = PAYPAL_PRICE_HEALTH_PROGRAM; $GLOBALS['PAY_SHIPPING'] = PAYPAL_SHIPPING_HEALTH_PROGRAM; $GLOBALS['PAY_TAX'] = PAYPAL_TAX_HEALTH_PROGRAM; $GLOBALS['PAY_TOTAL_AMOUNT'] = PAYPAL_TOTAL_AMOUNT_HEALTH_PROGRAM; $GLOBALS['PAY_NAME'] = getValueIn('label_project_health_program_title'); $GLOBALS['PAY_DESCRIPTION'] = getValueIn('label_project_health_program_description'); break; } } else { if ($paymentType == MN_PAY_TPV) { switch ($_SESSION['projectId']) { case PROJECT_SECOND_OPINION: $GLOBALS['PAY_PRICE'] = TPV_PRICE_SECOND_OPINION; $GLOBALS['PAY_NAME'] = getValueIn('label_project_second_opinion_title'); $GLOBALS['PAY_DESCRIPTION'] = getValueIn('label_project_second_opinion_description'); break; case PROJECT_VIRTUAL_CONSULTATION: $GLOBALS['PAY_PRICE'] = TPV_PRICE_VIRTUAL_CONSULTATION; $GLOBALS['PAY_NAME'] = getValueIn('label_project_virtual_consultation_title'); $GLOBALS['PAY_DESCRIPTION'] = getValueIn('label_project_virtual_consultation_description'); break; case PROJECT_RAPID_CONSULTATION: $GLOBALS['PAY_PRICE'] = TPV_PRICE_RAPID_CONSULTATION; $GLOBALS['PAY_NAME'] = getValueIn('label_project_rapid_consultation_title'); $GLOBALS['PAY_DESCRIPTION'] = getValueIn('label_project_rapid_consultation_description'); break; case PROJECT_HEALTH_PROGRAM: $GLOBALS['PAY_PRICE'] = TPV_PRICE_HEALTH_PROGRAM; $GLOBALS['PAY_NAME'] = getValueIn('label_project_health_program_title'); $GLOBALS['PAY_DESCRIPTION'] = getValueIn('label_project_health_program_description'); break; } } } }
# Medicnexus es un programa para la realización de consultas # en línea con médicos especializados. El sitio cuenta con noticias # y artículos que podrán mantener actualizados al cliente con los # últimos acontecimientos existentes en el área. Cuenta con un sistema # de respuesta rápida a partir de las consultas realizadas por el cliente. # Todos los derechos reservados /** * Establece la configuración para que los mensajes puedan ser mostrados * en la interfaz principal. * * @author Manuel Morejón * @copyright 2013 - 2014 * @access public */ if (isset($_SESSION['msg'])) { switch ($_SESSION['msg']) { case 'msg_info_consult_inserted': JFactory::getApplication()->enqueueMessage(getValueIn('msg_info_consult_inserted'), getValueIn('msg_info')); break; case 'msg_error_consult_inserted': JFactory::getApplication()->enqueueMessage(getValueIn('msg_error_consult_inserted'), getValueIn('msg_error')); break; case 'msg_info_upload_inserted': JFactory::getApplication()->enqueueMessage(getValueIn('msg_info_upload_inserted'), getValueIn('msg_info')); break; case 'msg_error_upload_size': JFactory::getApplication()->enqueueMessage(getValueIn('msg_error_upload_size'), getValueIn('msg_error')); break; } unset($_SESSION['msg']); }