Git Product home page Git Product logo

iugu's Introduction

iugu

Client Flutter/Dart de acesso aos principais recursos da Api da IUGU

Configuração

  • Em algum StartUp de seu projeto, é necessário adicionar a apiKey encontrada no seu painel administrativo da IUGU, em Administração > Configuração de Contas. Nesta tela você encontra seu ID da Conta
IuguClient(
        properties: IuguProperties(
          apiKey: "SUA_APP_KEY_DA_IUGU",
          urlApi: "https://api.iugu.com/v1/",
        ),
      );

Documentação completa da API

A referência completa da Api pode ser encontrada em IUGU Api

Exemplo (outros exemplos)

  • Lista Clientes
var meuIuguClient = IuguClient(
        properties: IuguProperties(
          apiKey: "SUA_APP_KEY_DA_IUGU",
          urlApi: "https://api.iugu.com/v1/",
        ),
      );

 var apiClient = Customer(meuIuguClient);

      myCustomer = await apiClient.create(
          request: CustomerRequestMessage(
              email: "[email protected]",
              name: "Bwolf Teste 2 Flutter/Dart",
              notes: "teste da api em Flutter/Dart",
              customVariables: custom));

Informações Adicionais

  • Este projeto foi todo feito com base nas APIs da Iugu e no projeto com o mesmo proposito desenvolvido em .NET

iugu's People

Contributors

bwolfs2 avatar jacobaraujo7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

iugu's Issues

CORS error

Ao tentar criar o PaymentToken para o cartão de crédito, estou recebendo um erro de CORS, seria isso um problema em minha aplicação? ou no plugin do flutter da iugu? ou é um problema na API da iugu?

Segue o código:

Future<void> iuguTest() async {
    var paymentRequest = PaymentTokenRequest(
        accountId: "{ACCOUNT-ID}",
        method: PaymentMethod.CREDIT_CARD,
        test: true,
        paymentData: PaymentInfoModel(
            firstName: "Rodrigo",
            lastName: "Couto",
            month: "01",
            year: "2028",
            number: "4111111111111111",
            verificationValue: "123"));

    PaymentTokenResponse paymentTokenResponse;
    var apiClient = PaymentToken(IuguClientData.createClient);
    paymentTokenResponse = await apiClient.create(paymentRequest);

    print(paymentTokenResponse);
  }
class IuguClientData {
  static IuguClient get createClient => IuguClient(
        properties: IuguProperties(
          apiKey: "{API-KEY}",
          urlApi: "https://api.iugu.com/v1/",
        ),
      );
}

Desde já, agradeço.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.