cielo_zero_auth 1.0.4
cielo_zero_auth: ^1.0.4

Flutter Android iOS web

A Flutter package that helps to use Cielo's Zero Auth.

cielo_zero_auth #

A Flutter package that helps to use Cielo's Zero Auth.

Usage #

These operations must be performed using its specific key (Client Id, Client Secret and Merchand Id) in the respective environment endpoints.

var zeroAuth = CieloZeroAuth(
  clientId: "YOUR-CLIENT-ID",
  clientSecret: "YOUR-CLIENT-SECRET",
  merchantId: "YOUR-MERCHANT-ID",
  environment: Environment.SANDBOX,
);

var result = await zeroAuth.validate(ZeroAuthRequest(
  cardNumber: "1234123412341234",
  cardType: CardType.CreditCard,
  holder: "Maurici Ferreira Junior",
  expirationDate: "01/2030",
  securityCode: "123",
  saveCard: false,
  brand: "Visa",
  cardOnFile: CardOnFile(
    usage: Usage.Used,
    reason: Reason.Recurring,
  ),
));

print(result.statusCode);

if (result.zeroAuthErrorResponse != null) {
  result.zeroAuthErrorResponse.forEach((e) {
    print("ErrorCode: ${e.code}");
    print("ErrorMessage: ${e.message}");
  });
}

if (result.zeroAuthResponse != null) {
  print(result.zeroAuthResponse.valid);
  print(result.zeroAuthResponse.returnCode);
  print(result.zeroAuthResponse.returnCode);
  print(result.zeroAuthResponse.issuerTransactionId);
}
0
likes
80
pub points
0%
popularity

A Flutter package that helps to use Cielo's Zero Auth.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

braspag.sdk@gmail.com

License

MIT (LICENSE)

Dependencies

cielo_oauth, flutter, http, json_annotation

More

Packages that depend on cielo_zero_auth