flutter_conekta_2 1.0.7+2 copy "flutter_conekta_2: ^1.0.7+2" to clipboard
flutter_conekta_2: ^1.0.7+2 copied to clipboard

outdated

Flutter plugin for Conekta, enabling Android and iOS card tokenization with WKWebView.

flutter_conekta_2 #

A flutter plugin to tokenize cards using Conekta with WKWebView

pub package

Installation #

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

flutter_conekta: ^1.0.7+2

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 #

  • Tokenize card using Conekta.

Demo App #

Demo

Example #

See example app.

1
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Flutter plugin for Conekta, enabling Android and iOS card tokenization with WKWebView.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_conekta_2