Example #1
0
        public ActionResult CalculoRetencoes(Faturamento aobjFaturamento)
        {
            PESSOA        l_Cliente   = _db.PESSOA.Find(aobjFaturamento.ClienteID);
            PessoaTomador lobjTomador = new PessoaTomador((enmTipoPessoaTrib)l_Cliente.TIPO_PESSOA_TRIBUTACAO.GetValueOrDefault((int)enmTipoPessoaTrib.eNaoPreenchido), l_Cliente.CIDADE);
            string        lstrTemp;

            aobjFaturamento.Retencoes = FaturamentoRetencoes.getRetencoes(aobjFaturamento.ValorBruto, aobjFaturamento.ValorMaoDeObra, aobjFaturamento.EmpresaEmissao, ref lobjTomador, out lstrTemp);
            return(View(aobjFaturamento));
        }
Example #2
0
        public bool EmissorBoleto(PessoaTomador pessoaTomador)
        {
            bool isSandbox = false;

            EnvironmentConfiguration.ChangeEnvironment(isSandbox);
            BoletoCheckout checkout = new BoletoCheckout();

            checkout.PaymentMode = PaymentMode.DEFAULT;

            checkout.ReceiverEmail = "*****@*****.**";

            checkout.Currency = Currency.Brl;

            checkout.Items.Add(new Item("0001", "Contabilidade Online", 1, 69.90m));

            checkout.Reference = pessoaTomador.Documento;

            checkout.Shipping = new Shipping();
            checkout.Shipping.ShippingType = ShippingType.Sedex;
            checkout.Shipping.Cost         = 0.00m;
            checkout.Shipping.Address      = new Address(
                "BRA",
                "SP",
                "Sao Paulo",
                "Jardim Paulistano",
                "01452002",
                "Av. Brig. Faria Lima",
                "1384",
                "5o andar"
                );
            checkout.Sender = new Sender(
                pessoaTomador.Nome,
                pessoaTomador.Email,
                new Phone("11", pessoaTomador.Telefone)
                );
            checkout.Sender.Hash = pessoaTomador.CodigoHash;
            SenderDocument senderCPF = new SenderDocument(Documents.GetDocumentByType("CPF"), "27952666878");

            checkout.Sender.Documents.Add(senderCPF);

            checkout.NotificationURL = "http://www.lojamodelo.com.br";

            try
            {
                AccountCredentials credentials = PagSeguroConfiguration.Credentials(isSandbox);
                Transaction        result      = TransactionService.CreateCheckout(credentials, checkout);
                return(true);
            }
            catch (PagSeguroServiceException exception)
            {
                return(false);
            }
        }
Example #3
0
 public bool Get(PessoaTomador pessoaTomador)
 {
     return(servico.EmissorBoleto(pessoaTomador));
 }