public bool ContaAPagar(string email, string conta, String valor, GC_Academia oGC_Academia) { MailMessage message = new MailMessage(); try { String body = "<html><head><style>html{line-height:1.5;font-family:\"Roboto\",sans-serif;font-weight:normal;color:rgba(0, 0, 0, 0.87)}</style></head><body style=\"margin: 0px\"><div style=\"height: 50px; background: black\"><center> <img style=\"height: 40px; margin - top:5px\" src=\"http://app.basicflux.com/img/logo_header.png\" /></center</div><div style=\"height:50px; margin-left:20%; width:60%;\"><h1 style=\"color:purple\">Conta Atrasada</h1><p> Você registrou uma conta ({0}) no TheFlux! E ela vence hoje:</p><div style=\"height:50px; background:purple; color:white\"><center style=\"vertical-align: middle;line-height: 50px;\">{1}</center></div><p> Não se esqueça de marcar a conta como paga.</p><p> Atenciosamente,</p><p> Equipe BasicFlux</p></div></body></html>"; message.From = new MailAddress("*****@*****.**"); message.To.Add(new MailAddress(email)); message.Subject = "THEFLUX - Conta a Vencer"; body = body.Replace("{0}", conta); body = body.Replace("{1}", valor); message.Body = body; message.IsBodyHtml = true; SmtpClient client = new SmtpClient(); client.Send(message); this.Log(message, oGC_Academia); return(true); } catch (Exception ex) { this.Log(message, oGC_Academia, ex); return(false); } }
public bool Post([FromBody] GC_Mensalidade value) { value = (from item in db.GC_Mensalidade where item.Id == value.Id select item).FirstOrDefault(); GC_Usuario oGC_Usuario = (from item in db.GC_Usuario where item.Id == value.GC_UsuarioId select item).FirstOrDefault(); GC_Academia OGC_Academia = (from item in db.GC_Academia where item.Id == value.GC_AcademiaId select item).FirstOrDefault(); GC_PagSeguroPagamento oGC_PagSeguroPagamento = (from item in db.GC_PagSeguroPagamento where item.GC_MensalidadeId == value.Id select item).FirstOrDefault(); if (oGC_Usuario.Telefone == null) { return(false); } String message = "Olá {0}! Seu boleto com vencimento para {1} referente a academia {3} pode ser impresso em {2}"; message = message.Replace("{0}", oGC_Usuario.Nome); message = message.Replace("{1}", value.Vencimento.ToString("dd/MM/yyyy")); message = message.Replace("{2}", "http://basicflux.com/#/eu"); message = message.Replace("{3}", OGC_Academia.Nome); new PapoSms().EnviarMensalidade(oGC_Usuario.Telefone, message); return(true); }
public GC_PagSeguroPagamento Post([FromBody] dynamic value) { Int32 idMensalidade = Convert.ToInt32(value.Id); GC_Mensalidade oMensalidade = new GC_Mensalidade(); oMensalidade = (from item in db.GC_Mensalidade where item.Id == idMensalidade select item).FirstOrDefault(); GC_Academia oGC_Academia = (from item in db.GC_Academia where oMensalidade.GC_AcademiaId == item.Id select item).FirstOrDefault(); GC_Usuario oGC_Usuario = (from item in db.GC_Usuario where item.Id == oMensalidade.GC_UsuarioId select item).FirstOrDefault(); GC_PagSeguroPagamento oPagSeguroPagamento = new Pagseguro().Checkout(oMensalidade, oGC_Usuario, oGC_Academia, value.token.ToString(), value.senderHash.ToString()); oPagSeguroPagamento.GC_MensalidadeId = idMensalidade; db.GC_PagSeguroPagamento.Add(oPagSeguroPagamento); oMensalidade.GC_MensalidadeStatusId = 2; db.SaveChanges(); oPagSeguroPagamento.GC_MensalidadeId = oMensalidade.GC_AcademiaId; return(oPagSeguroPagamento); }
public bool RecuperaSenha(string email, string senha, GC_Academia oGC_Academia) { MailMessage message = new MailMessage(); try { String body = "<html><head><style>html{line-height:1.5;font-family:\"Roboto\",sans-serif;font-weight:normal;color:rgba(0, 0, 0, 0.87)}</style></head><body style=\"margin: 0px\"><div style=\"height: 50px; background: black\"><center> <img style=\"height: 40px; margin - top:5px\" src=\"http://app.basicflux.com/img/logo_header.png\"/></center </div><div style=\"height:50px; margin-left:20%; width:60%;\"><h1 style=\"color:purple\">Nova Senha</h1><p> Você solicitiou uma nova senha no TheFlux! Sua nova senha é:</p><div style=\"height:50px; background:purple; color:white\"><center style=\"vertical-align: middle;line-height: 50px;\">{0}</center></div><p> Você pode trocar sua senha a qualquer momento, selecionando o menu \"Usuário\", então clicando na chave ao lado do seu nome.</p><p> Atenciosamente,</p><p> Equipe BasicFlux</p></div></body></html>"; message.From = new MailAddress("*****@*****.**"); message.To.Add(new MailAddress(email)); message.Subject = "THEFLUX - Troca de Senha"; body = body.Replace("{0}", senha); message.Body = body; message.IsBodyHtml = true; SmtpClient client = new SmtpClient(); client.Send(message); this.Log(message, oGC_Academia); return(true); } catch (Exception ex) { this.Log(message, oGC_Academia, ex); return(false); } }
public async Task <IHttpActionResult> PutGC_Academia(int id, GC_Academia gC_Academia) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != gC_Academia.Id) { return(BadRequest()); } db.Entry(gC_Academia).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GC_AcademiaExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
private void Log(MailMessage oMailMessage, GC_Academia oGC_Academia, Exception erro = null) { GC_Email oGC_Email = new GC_Email(); oGC_Email.Corpo = oMailMessage.Body; oGC_Email.Data = DateTime.Now; oGC_Email.Email = oMailMessage.To[0].Address; oGC_Email.Titulo = oMailMessage.Subject; oGC_Email.GC_AcademiaId = oGC_Academia; if (erro != null) { String err = erro.Message; if (erro.InnerException != null) { err = err + erro.InnerException.Message; } oGC_Email.Erro = err; } oGC_Email.GC_AcademiaId = (from item in db.GC_Academia where item.Id == oGC_Academia.Id select item).FirstOrDefault(); db.GC_Email.Add(oGC_Email); db.SaveChanges(); }
public Boolean ProcessNotification(String code, String port) { string idInstituicao = System.Configuration.ConfigurationManager.AppSettings["pagSeguro_" + port]; GC_Academia oInstituicao = (from item in db.GC_Academia where item.Id.ToString() == idInstituicao select item).FirstOrDefault(); string urlPagSeguro = System.Configuration.ConfigurationManager.AppSettings["pagSeguroURL_NOTIFICATION"]; urlPagSeguro = urlPagSeguro.Replace("#email#", oInstituicao.Email); urlPagSeguro = urlPagSeguro.Replace("#token#", oInstituicao.Token); urlPagSeguro = urlPagSeguro.Replace("#code#", code); using (var client = new HttpClient()) { var values = new Dictionary <string, string>(); var content = new FormUrlEncodedContent(values); var response = client.GetAsync(urlPagSeguro).Result; if (response.IsSuccessStatusCode) { try { var responseContent = response.Content; // by calling .Result you are synchronously reading the result string responseString = responseContent.ReadAsStringAsync().Result; XmlDocument xml = new XmlDocument(); xml.LoadXml(responseString); XmlNodeList nodeList = xml.GetElementsByTagName("status"); String status = nodeList[0].InnerText; nodeList = xml.GetElementsByTagName("code"); String pagseguroCode = nodeList[0].InnerText; GC_PagSeguroPagamento oGC_PagSeguroPagamento = (from item in db.GC_PagSeguroPagamento where item.Code == pagseguroCode select item).FirstOrDefault(); GC_Mensalidade oGC_Mensalidade = (from item in db.GC_Mensalidade where item.Id == oGC_PagSeguroPagamento.GC_MensalidadeId select item).FirstOrDefault(); oGC_Mensalidade.GC_MensalidadeStatusId = Convert.ToInt32(status); db.SaveChanges(); new MensalidadeLogger().Log(oGC_Mensalidade, null, "Pagseguro"); return(true); } catch (Exception) { return(false); } } } return(false); }
public Boolean Post([FromBody] dynamic value) { Int32 GC_AcademiaId = value.GC_AcademiaId; Int32 GC_UsuarioId = value.GC_UsuarioId; GC_Academia oGC_Academia = (from item in this.db.GC_Academia where item.Id == GC_AcademiaId select item).FirstOrDefault(); if (oGC_Academia == null) { return(false); } GC_Usuario oGC_Usuario = (from item in this.db.GC_Usuario where item.Id == GC_UsuarioId select item).FirstOrDefault(); if (oGC_Usuario == null) { return(false); } oGC_Academia.Usuarios = new Collection <GC_Usuario>(); oGC_Academia.Usuarios.Add(oGC_Usuario); db.SaveChangesAsync(); return(true); }
public List <GC_Email> Post([FromBody] GC_Academia oGC_Academia) { return((from item in db.GC_Email where item.GC_AcademiaId.Id == oGC_Academia.Id select item) .ToList() .OrderBy(x => x.Id) .Take(100) .ToList());; }
public async Task <IHttpActionResult> GetGC_Academia(int id) { GC_Academia gC_Academia = await db.GC_Academia.FindAsync(id); if (gC_Academia == null) { return(NotFound()); } return(Ok(gC_Academia)); }
public async Task <IHttpActionResult> PostGC_Academia(GC_Academia gC_Academia) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.GC_Academia.Add(gC_Academia); await db.SaveChangesAsync(); return(CreatedAtRoute("DefaultApi", new { id = gC_Academia.Id }, gC_Academia)); }
public async Task <IHttpActionResult> DeleteGC_Academia(int id) { GC_Academia gC_Academia = await db.GC_Academia.FindAsync(id); if (gC_Academia == null) { return(NotFound()); } db.GC_Academia.Remove(gC_Academia); await db.SaveChangesAsync(); return(Ok(gC_Academia)); }
public bool Post([FromBody] GC_Mensalidade value) { value = (from item in db.GC_Mensalidade where item.Id == value.Id select item).FirstOrDefault(); GC_Usuario oGC_Usuario = (from item in db.GC_Usuario where item.Id == value.GC_UsuarioId select item).FirstOrDefault(); GC_Academia OGC_Academia = (from item in db.GC_Academia where item.Id == value.GC_AcademiaId select item).FirstOrDefault(); GC_PagSeguroPagamento oGC_PagSeguroPagamento = (from item in db.GC_PagSeguroPagamento where item.GC_MensalidadeId == value.Id select item).FirstOrDefault(); return(new Mailer().Boleto(oGC_Usuario.Email, oGC_Usuario.Nome, value.Vencimento.ToString("dd/MM/yyyy"), oGC_PagSeguroPagamento.BarCode, oGC_PagSeguroPagamento.Link, OGC_Academia.Nome, OGC_Academia)); }
public Boolean Post([FromBody] GC_Usuario value) { GC_Usuario oUsu = (from item in db.GC_Usuario where item.CPF == value.CPF select item).FirstOrDefault(); if (oUsu == null) { throw new Exception("U2X_MessageUsuario não encontrado"); } oUsu.Senha = GerarSenha(); db.SaveChanges(); GC_Academia oGC_Academia = new GC_Academia(); oGC_Academia.Id = 1; new Mailer().RecuperaSenha(oUsu.Email, oUsu.Senha, oGC_Academia); return(true); }
public String ObtemSessao(Int32 IdAcademia) { GC_Academia targetGC_Academia = (from item in db.GC_Academia where item.Id == IdAcademia select item).FirstOrDefault(); String oBody = @"{ 'email': '#email#', 'token': '#token#' }"; String sURL = "https://ws.sandbox.pagseguro.uol.com.br/v2/sessions?email=#email#&token=#token#"; oBody = oBody.Replace("#email#", targetGC_Academia.Email); oBody = oBody.Replace("#token#", targetGC_Academia.Token); sURL = sURL.Replace("#email#", targetGC_Academia.Email); sURL = sURL.Replace("#token#", targetGC_Academia.Token); using (var client = new HttpClient()) { var httpContent = new StringContent(oBody, Encoding.UTF8, "application/json"); var response = client.PostAsync(sURL, httpContent).Result; if (response.IsSuccessStatusCode) { var responseContent = response.Content; string responseString = responseContent.ReadAsStringAsync().Result; XmlDocument oDoc = new XmlDocument(); oDoc.LoadXml(responseString); return(oDoc.GetElementsByTagName("id")[0].InnerText); } } return(null); }
public void SendBoletoXDias(Int32 dias) { List <Notification_Response> lstNotification_Response = db.Database.SqlQuery <Notification_Response>("proc_select_boleto " + dias.ToString()).ToList(); lstNotification_Response.ForEach((x) => { try { GC_Academia oGC_Academia = new GC_Academia(); oGC_Academia.Id = x.GC_AcademiaId; DateTime oDt = Convert.ToDateTime(x.Vencimento); new Mailer().PreVencimento(x.email, x.nome, oDt.ToString("dd/MM/yyyy"), x.barcode, x.Link, dias.ToString(), oGC_Academia); } catch { } finally { GC_Mensalidade oGC_Mensalidade = (from item in db.GC_Mensalidade where item.Id == x.Id select item).FirstOrDefault(); if (dias == 5) { oGC_Mensalidade.IsAvisoCinco = true; } if (dias == 3) { oGC_Mensalidade.IsAvisoTres = true; } if (dias == 1) { oGC_Mensalidade.IsAvisoUm = true; } } }); db.SaveChanges(); }
public bool PreVencimento(string email, string nome, string vencimento, string boleto, string url, string dias, GC_Academia oGC_Academia) { MailMessage message = new MailMessage(); try { String body = "<html><head><style>html{line-height: 1.5;font-family: \"Roboto\",sans-serif;font-weight:normal;color:rgba(0, 0, 0, 0.87)}</style></head><body style=\"margin: 0px\"><div style=\"height: 50px; backsground: black\"><div style=\"height:50px; margin-left:20%; width:60%;\"><br/><br/><h1 style=\"color:purple\">Seu Boleto</h1><p> Olá, {0} este é o seu boleto com que vence em {3} dia(s) ({1}),você pode imprimir clicando <a href=\"{4}\">aqui</a>:</p><div style=\"height:50px; background:purple; color:white\"><center style=\"vertical-align: middle;line-height: 50px;\">{2}</center></div><p> Atenciosamente,</p><p> Equipe BasicFlux</p></div></body></html>"; message.From = new MailAddress("*****@*****.**"); message.To.Add(new MailAddress(email)); message.Subject = "BASICFLUX - Aviso de Vencimento " + dias + " dias"; body = body.Replace("{0}", nome); body = body.Replace("{1}", vencimento); body = body.Replace("{2}", boleto); body = body.Replace("{3}", dias); body = body.Replace("{4}", url); message.Body = body; message.IsBodyHtml = true; SmtpClient client = new SmtpClient(); client.Send(message); this.Log(message, oGC_Academia); return(true); } catch (Exception ex) { this.Log(message, oGC_Academia, ex); return(false); } }
public String Post([FromBody] GC_Academia value) { return(new Pagseguro().ObtemSessao(value.Id)); }
public List <GC_Modalidade> Post([FromBody] GC_Academia value) { return((from item in this.db.GC_Modalidade where item.GC_AcademiaId == value.Id select item).ToList()); }
public List <GC_PagSeguroPagamento> GerarBoletos(List <GC_Mensalidade> oGC_Mensalidade) { String url = System.Configuration.ConfigurationManager.AppSettings["pagSeguro_Boleto"]; Int32 idMensalidade = oGC_Mensalidade[0].Id; GC_Mensalidade targetGC_Mensalidade = (from item in db.GC_Mensalidade where item.Id == idMensalidade select item).FirstOrDefault(); GC_Usuario oGC_Usuario = (from item in db.GC_Usuario where item.Id == targetGC_Mensalidade.GC_UsuarioId select item).FirstOrDefault(); GC_Academia oGC_Academia = (from item in db.GC_Academia where item.Id == targetGC_Mensalidade.GC_AcademiaId select item).FirstOrDefault(); String cpf = oGC_Usuario.CPF.Split('.').Aggregate((current, next) => current + "" + next).Split('-').Aggregate((current, next) => current + "" + next); String oBody = sBody.Replace("#Mensalidade_ID#", oGC_Mensalidade[0].Id.ToString()); oBody = oBody.Replace("#FirstDueDate#", targetGC_Mensalidade.Vencimento.ToString("yyyy-MM-dd")); oBody = oBody.Replace("#amount#", (targetGC_Mensalidade.Valor - 1).ToString()); oBody = oBody.Replace("#numberOfPayments#", oGC_Mensalidade.Count.ToString()); oBody = oBody.Replace("#CPF#", cpf); oBody = oBody.Replace("#Name#", oGC_Usuario.Nome); oBody = oBody.Replace("#Email#", "fake_" + oGC_Usuario.Email); oBody = oBody.Replace("#AcademiaNome#", oGC_Academia.Nome); oBody = oBody.Split('\'').Aggregate((current, next) => current + "\"" + next); url = url.Replace("#token#", oGC_Academia.Token); url = url.Replace("#email#", oGC_Academia.Email); using (var client = new HttpClient()) { var httpContent = new StringContent(oBody, Encoding.UTF8, "application/json"); var response = client.PostAsync(url, httpContent).Result; if (response.IsSuccessStatusCode) { var responseContent = response.Content; string responseString = responseContent.ReadAsStringAsync().Result; dynamic myClass = Newtonsoft.Json.JsonConvert.DeserializeObject <dynamic>(responseString); List <dynamic> boletos = myClass.boletos.ToObject <List <dynamic> >(); List <GC_PagSeguroPagamento> lstGC_PagSeguroPagamento = new List <GC_PagSeguroPagamento>(); boletos.ForEach((x) => { GC_PagSeguroPagamento oGC_PagSeguroPagamento = new GC_PagSeguroPagamento(); oGC_PagSeguroPagamento.BarCode = x.barcode; oGC_PagSeguroPagamento.Code = x.code; oGC_PagSeguroPagamento.Link = x.paymentLink; oGC_PagSeguroPagamento.DueDate = x.dueDate; lstGC_PagSeguroPagamento.Add(oGC_PagSeguroPagamento); }); lstGC_PagSeguroPagamento = lstGC_PagSeguroPagamento.OrderBy(x => x.DueDate).ToList(); return(lstGC_PagSeguroPagamento); } else { var responseContent = response.Content; string responseString = responseContent.ReadAsStringAsync().Result; throw new Exception(responseString); } } return(null); //var httpWebRequest = (HttpWebRequest)WebRequest.Create("https://ws.pagseguro.uol.com.br/recurring-payment/[email protected]&token=32728DC4EF0A4615BD716904E82DA4AE"); //httpWebRequest.ContentType = "application/json"; //httpWebRequest.Method = "POST"; //using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream())) //{ // streamWriter.Write(oBody); // streamWriter.Flush(); // streamWriter.Close(); //} //var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse(); //using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) //{ // var result = streamReader.ReadToEnd(); // dynamic myClass = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(result); // List<dynamic> boletos = myClass.boletos.ToObject<List<dynamic>>(); // List<GC_PagSeguroPagamento> lstGC_PagSeguroPagamento = new List<GC_PagSeguroPagamento>(); // boletos.ForEach((x) => // { // GC_PagSeguroPagamento oGC_PagSeguroPagamento = new GC_PagSeguroPagamento(); // oGC_PagSeguroPagamento.BarCode = x.barcode; // oGC_PagSeguroPagamento.Code = x.code; // oGC_PagSeguroPagamento.Link = x.paymentLink; // oGC_PagSeguroPagamento.DueDate = x.dueDate; // lstGC_PagSeguroPagamento.Add(oGC_PagSeguroPagamento); // }); // lstGC_PagSeguroPagamento = lstGC_PagSeguroPagamento.OrderBy(x => x.DueDate).ToList(); // return lstGC_PagSeguroPagamento; //} }
public List <GC_Usuario> Post([FromBody] GC_Academia value) { return((from item in this.db.GC_Usuario where item.Academias.FirstOrDefault((x) => x.Id == value.Id) != null && item.IsActive select item).ToList()); }
public GC_PagSeguroPagamento Checkout(GC_Mensalidade oMensalidade, GC_Usuario oAluno, GC_Academia oInstituicao, String token, String senderHash) { string urlPagSeguro = System.Configuration.ConfigurationManager.AppSettings["pagSeguroURL_CHECKOUT"]; string urlNotification = System.Configuration.ConfigurationManager.AppSettings["notificationURL_" + oInstituicao.Id]; String sXML = @"<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?> <payment> <mode>default</mode> <method>creditCard</method> <sender> <name>#nome#</name> <email>#email#</email> <phone> <areaCode>11</areaCode> <number>30380000</number> </phone> <documents> <document> <type>CPF</type> <value>#cpf#</value> </document> </documents> <hash>#senderHash#</hash> </sender> <notificationURL>#notificationURL#</notificationURL> <currency>BRL</currency> <items> <item> <id>1</id> <description>#descricao#</description> <quantity>1</quantity> <amount>#valor#</amount> </item> </items> <extraAmount>0.00</extraAmount> <reference>R123456</reference> <shipping> <address> <street>Av. capistrano de Abreu</street> <number>486</number> <complement>1 andar</complement> <district>Jaguaribe</district> <city>Osasco</city> <state>SP</state> <country>BRA</country> <postalCode>06065120</postalCode> </address> <type>3</type> <cost>0.00</cost> </shipping> <creditCard> <token>#creditCardToken#</token> <installment> <quantity>1</quantity> <value>#valor#</value> </installment> <holder> <name>Nome No Cartao</name> <documents> <document> <type>CPF</type> <value>#cpf#</value> </document> </documents> <birthDate>20/10/1980</birthDate> <phone> <areaCode>11</areaCode> <number>999991111</number> </phone> </holder> <billingAddress> <street>Av. capistrano de Abreu</street> <number>486</number> <complement>1 andar</complement> <district>Jaguaribe</district> <city>Osasco</city> <state>SP</state> <country>BRA</country> <postalCode>06065120</postalCode> </billingAddress> </creditCard> </payment>"; sXML = sXML.Replace("#descricao#", "Mensalidade (" + oMensalidade.Vencimento.ToString("DD") + "/" + oMensalidade.Vencimento.ToString("YYYY") + ")"); sXML = sXML.Replace("#valor#", Convert.ToInt32(oMensalidade.Valor).ToString("N2")); sXML = sXML.Replace("#valor#", Convert.ToInt32(oMensalidade.Valor).ToString("N2")); sXML = sXML.Replace("#nome#", oAluno.Nome); sXML = sXML.Replace("#email#", oAluno.Email); sXML = sXML.Replace("#cpf#", oAluno.CPF); sXML = sXML.Replace("#cpf#", oAluno.CPF); sXML = sXML.Replace("#reference#", oMensalidade.Id.ToString()); sXML = sXML.Replace("#creditCardToken#", token); sXML = sXML.Replace("#senderHash#", senderHash); sXML = sXML.Replace("#notificationURL#", urlNotification); urlPagSeguro = urlPagSeguro.Replace("#emailInstituicao#", oInstituicao.Email); urlPagSeguro = urlPagSeguro.Replace("#token#", oInstituicao.Token); using (var client = new HttpClient()) { var httpContent = new StringContent(sXML, Encoding.UTF8, "application/xml"); var response = client.PostAsync(urlPagSeguro, httpContent).Result; if (response.IsSuccessStatusCode) { var responseContent = response.Content; // by calling .Result you are synchronously reading the result string responseString = responseContent.ReadAsStringAsync().Result; XmlDocument xml = new XmlDocument(); xml.LoadXml(responseString); GC_PagSeguroPagamento oPagSeguroPagamento = new GC_PagSeguroPagamento(); XmlNodeList nodeList = xml.GetElementsByTagName("code"); oPagSeguroPagamento.Code = nodeList[0].InnerText; nodeList = xml.GetElementsByTagName("date"); oPagSeguroPagamento.DueDate = nodeList[0].InnerText; return(oPagSeguroPagamento); } } return(null); }