pagarme / pagarme-net

Pagar.me .NET library
MIT License
42 stars 49 forks source link

Any Transaction Exception #122

Open leadsoftlucas opened 5 years ago

leadsoftlucas commented 5 years ago

NuGet Pagar.me v2.6.12 WebAPI .net Core 2.2

`public class PagarMeTool : PagarMeService { public PagarMeTool(IConfiguration configuration) : base(configuration["Pagar_Me:Key"], configuration["Pagar_Me:Criptography"], configuration["Pagar_Me:EndPoint"]) { }

    public void CreateCustomer(string aDocumentNumber)
    {
        Customer customer = this.Customers.Find(new Customer() { DocumentNumber = aDocumentNumber });

        if (customer == null)
            CreateCustomer();
    }

    public void CreateCustomer()
    {
        Customer customer = new Customer(this)
        {
            Name = "GuyName",
            Birthday = DateTime.Now.ToString("yyyy-MM-dd"),
            BornAt = DateTime.Now.Date,
            Email = "email@email.com",
            Address = new Address()
            {
                StreetNumber = "10"
            },
            Phone = new Phone()
            {
                Ddi = "55",
                Ddd = "31",
                Number = "987654321"
            },
            Country = "",
            DocumentNumber = "12345678912",
            DocumentType = DocumentType.Cpf,
            ExternalId = "",
            Gender = Gender.Male,
            Type = CustomerType.Individual
        };

        customer.Save();
    }

}`

Any final command throws:

"Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. O sistema não pode encontrar o arquivo especificado."

carloscfcortez commented 5 years ago

The package of the Pagar.me portable not worked! Use the package for .net core made for Eduardo Pires through of fork on repository Pagar.me I created the package Nuget for use. This repository: https://github.com/EduardoPires/pagarme-net

This Package: https://www.nuget.org/packages/PagarMeCore/1.0.0#