A flutter plugin to tokenize cards using Conekta
First, add flutter_conekta as a dependency in your pubspec.yaml file.
<application> to your app's
AndroidManifest.xml file. This is required due to Conekta using its remote API to tokenize the card.
For tokenizing the card information correctly, you need to add some keys to your iOS app's Info.plist file, located in
UIBackgroundModes with the fetch and remote-notifications keys - Required. Describe why your app needs to access background taks, suck talking to an external API (to tokenize the card). This is called Required background modes, with the keys App download content from network and App downloads content in response to push notifications respectively in the visual editor (since both methods aren't actually overriden, not adding this property/keys may only display a warning, but shouldn't prevent its correct usage).
<key>UIBackgroundModes</key> <array> <string>fetch</string> <string>remote-notification</string> </array>
NSAppTransportSecurity - Required since Conekta makes arbitrary loads from its API. Describe why your app needs permission to allow arbitrary loads. This is called App Transport Security Settings in the visual editor.
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
There is only one method that should be used with this package:
Will let you tokenize a card. This receives six required parameters: the
publicKey to specify your Conekta public key, the
expiryMonth and the
expiryYear. Returns a
String with the token representing the card.
Currently supported features #
- [x] Tokenize card using Conekta.
Demo App #
See example app.
- Solved Issue #1
- Updated gradle.properties to support AndroidX
- Updated gradle-wrapper.properties to support AndroidX
- Use Volley to make request to tokenize cards in Android module
- Migrated Android example to AndroidX
- Migration to AndroidX
- Added MIT license
- Fixed version typo in README file
- Updates README file
- Version 1.0 release.
- Initial relase.
- Allows tokenization of cards, always specifying the public key.
Demonstrates how to use the flutter_conekta plugin.
Getting Started #
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: flutter_conekta: ^1.0.7+1
2. Install it
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Jan 16, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.0
- pana: 0.13.4
- Flutter: 1.12.13+hotfix.5