flutter_conekta 1.0.7+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 80

flutter_conekta #

A flutter plugin to tokenize cards using Conekta

pub package

Installation #

First, add flutter_conekta 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:

  • 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>
    

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 #

  • [x] Tokenize card using Conekta.

Demo App #

Demo

Example #

See example app.

1.0.7+1 #

1.0.7 #

  • Updated gradle.properties to support AndroidX

1.0.6 #

  • Updated gradle-wrapper.properties to support AndroidX

1.0.5 #

  • Use Volley to make request to tokenize cards in Android module
  • Migrated Android example to AndroidX

1.0.4 #

  • Migration to AndroidX

1.0.3 #

  • Added MIT license

1.0.2 #

  • Fixed version typo in README file

1.0.1 #

  • Updates README file

1.0.0 #

  • Version 1.0 release.
  • Initial relase.
  • Allows tokenization of cards, always specifying the public key.

example/README.md

flutter_conekta_example #

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:

with Flutter:


$ 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:


import 'package:flutter_conekta/flutter_conekta.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
60
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
80
Learn more about scoring.

We analyzed this package on Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test