alfredoqt / flutter_conekta

Flutter plugin for Conekta, enabling Android and iOS card tokenization.
MIT License
3 stars 8 forks source link

flutter_conekta

A flutter plugin to tokenize cards using Conekta

pub package

Installation

First, add _flutterconekta as a dependency in your pubspec.yaml file.

flutter_conekta: ^1.0.7+1

Android

Add

<uses-permission android:name="android.permission.INTERNET"/>

before <application> to your app's AndroidManifest.xml file. This is required due to Conekta using its remote API to tokenize the card.

iOS

For tokenizing the card information correctly, you need to add some keys to your iOS app's Info.plist file, located in <project root>/ios/Runner/Info.plist:

Usage

There is only one method that should be used with this package:

FlutterConekta.tokenizeCard()

Will let you tokenize a card. This receives six required parameters: the publicKey to specify your Conekta public key, the cardholderName, the cardNumber, the cvv, the expiryMonth and the expiryYear. Returns a String with the token representing the card.

Currently supported features

Demo App

Demo

Example

See example app.