gerencia_net_plus 0.0.4 copy "gerencia_net_plus: ^0.0.4" to clipboard
gerencia_net_plus: ^0.0.4 copied to clipboard

A Dart plugin that allows a better way to connect to Gerencianet - Efí Api.

example/gerencia_net_plus_example.dart

// ignore_for_file: unused_local_variable

import 'dart:io';

import 'package:gerencia_net_plus/gerencia_net_plus.dart';
import 'package:gerencia_net_plus/src/pix/models/additional_info.dart';

Future<void> main(List<String> args) async {
  final certificateBytes =
      File('certificates/certificate.crt.pem').readAsBytesSync();

  final privateKeyBytes =
      File('certificates/private_key.key.pem').readAsBytesSync();

  final gerenciaNetPlus = GerenciaNetPlus(
    credentials: GerenciaNetCredentials(
      clientId: 'Client_Id',
      clientSecret: 'Client_Secret',
      certificateBytes: certificateBytes,
      privateKeyBytes: privateKeyBytes,
      pixKey: 'pixKey',
    ),
  );

  final newCharge = await gerenciaNetPlus.pix.immediateCharge.createCharge(
    value: 100,
    additionalInfo: const [
      AdditionalInfo(
        name: 'Local de Venda',
        value: 'Rua ABCD, Nº 20',
      )
    ],
  );

  final recievedPix = await gerenciaNetPlus.pix.transactions.listRecievedPix(
    start: DateTime(2023),
    end: DateTime(2024),
    cpf: '12345678909',
  );
}
1
likes
150
pub points
0%
popularity

Publisher

unverified uploader

A Dart plugin that allows a better way to connect to Gerencianet - Efí Api.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

dio, dio_http2_adapter, equatable, intl, pretty_dio_logger

More

Packages that depend on gerencia_net_plus