cielo_flutter 0.0.1 cielo_flutter: ^0.0.1 copied to clipboard
Cielo/Braspag SDK for Flutter
Cielo SDK for Flutter #
An unofficial Flutter SDK for Cielo/Braspag.
Disclaimer #
This SDK is created for personal use and the functionality is limited to the needs of my projects. You are more than welcome to contribute the code you need as soon as it follows the same code style. Fortunately, this is a very simple SDK, so it should be easy to understand and extend.
Getting Started #
Installation #
flutter pub add cielo_flutter
Configuration #
import 'package:cielo_flutter/cielo_flutter.dart';
// Init core
const options = CieloOptions(
environment: CieloEnvironment.sandbox,
provider: CieloProvider.braspag,
language: CieloLanguage.pt,
);
Cielo.init(options);
// Initialize Silent Order Post
const sop = CieloSOPOptions(enableTokenize: true);
Cielo.initSOP(sop);
Usage #
Silent Order Post #
Learn More:
import 'package:cielo_flutter/cielo_flutter.dart';
String accessToken = "<SOP access token generated by your backend>";
CieloCard card = CieloCard(
cardNumber: '0000000000000001',
holder: 'John Doe',
expirationDate: '12/2021',
securityCode: '123',
);
await Cielo.sop.sendCard(card, accessToken: accessToken);
License #
Licensed under the MIT license, see LICENSE
.