Giter Site home page Giter Site logo

gerencianet / gn-api-sdk-flutter-examples Goto Github PK

View Code? Open in Web Editor NEW
6.0 4.0 2.0 177 KB

SDK em Flutter integrado a API Gerencianet. Este SDK está preparado para integração à API Pix e API Boletos da Gerencianet, que permite realizar o gerenciamento de cobranças Pix com QR Code e Pix Copia e Cola, boleto / Bolix, carnê, cartão de crédito e muito mais.

Home Page: https://dev.gerencianet.com.br/docs/instalacao-da-api

License: MIT License

Kotlin 0.03% Swift 0.09% Objective-C 0.01% Dart 99.88%
flutter dart marketplace split subscription assinatura qrcode pix pix-copia-e-cola card

gn-api-sdk-flutter-examples's Introduction

SDK Gerencianet for Dart

gn-api-sdk-flutter-examples

SDK for Gerencianet Pagamentos' API. For more informations about parameters and values, please refer to Gerencianet documentation.

Getting started

Add the PIX certificate and its key in assets/certs.

certs

After adding, run the flutter pub get command.

The credentials of your application (client_id and client_secret) must be informed in the credentials.dart file

credentials

dynamic CREDENTIALS = {
  'client_id': '',        # Enter your client id
  'client_secret': '',    # Enter your client secret
  'sandbox': false,       # Enable or disable sandbox mode
  'pix_cert': 'assets/certs/cert.crt.pem',         # Enter the certificate directory 
  'pix_private_key': 'assets/certs/cert.key.pem'   # Enter the certificate key directory 
};

To generate your certificate: Access the menu API (1)-> Meus Certificados (2) and choose the environment you want the certificate: Produção or Homologação -> click in Novo Certificado (3). To generate your certificate

Create a new application to use the Pix API: Access the menu API (1)-> Minhas Aplicações -> Nova Aplicação(2) -> Ative API Pix (3) and choose the scopes you want to release in Produção e/ou Homologação (remembering that these can be changed later). -> click in Criar Nova aplicação(4). Create a new application to use the Pix API

Change an existing application to use the Pix API: Access the menu API (1)-> Minhas Aplicações e escolha a sua aplicação (2) -> Editar(Botão laranja) -> Ative API Pix (3) and choose the scopes you want to release in Produção e/ou Homologação. -> click in Atualizar aplicação (4). Change an existing application to use the Pix API

For use in Dart, the certificate must be converted to .pem. Below you will find example using the OpenSSL command for conversion.

Command OpenSSL

// Gerar certificado e chave separadas
openssl pkcs12 -in path.p12 -out newfile.crt.pem -clcerts -nokeys //certificado
openssl pkcs12 -in path.p12 -out newfile.key.pem -nocerts -nodes //chave privada

To register your Pix keys

The registration of Pix keys can be done through the application. If you don't already have our app installed, click on Android or iOS, according to your smartphone's operating system, to download it.

To register your Pix keys through the application:

  1. Access your account through app Gerencianet.
  2. In the side menu, touch Pix to start your registration.
  3. Read the information that appears on the screen and click Registrar Chave. If this is no longer your first contact, tap Minhas Chaves and then the icon (➕).
  4. Select the data you are going to register as a Pix Key and tap avançar - you must choose at least 1 of the 4 available key options (cell, e-mail, CPF e/ou random key).
  5. After registering the desired Pix keys, click on concluir.
  6. Ready! Your keys are already registered with us.

Additional Documentation

The full documentation with all available endpoints is in https://dev.gerencianet.com.br/.

If you don't have a digital account atnetnet, open yours now!

License

MIT

gn-api-sdk-flutter-examples's People

Contributors

iigorpedroso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.