sumup_flutter 0.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 67

sumup_flutter #

Bridge with native Sumup SDK, supporting Air, Air Lite or PIN+ Terminal

Currently still testing and developing full implementation of the SDK. A light well-tested version of this SDK will be provided soon. Optional things like tips, receipts, additionnal infos... are not the priority and will be integrated in future versions.

Feel free to add your contribution to this project by submitting pull request or opening issues

Getting Started #

First of all you'll need an API key from SumUp. You can ask for one there: SumUp Dashboard. This will let you customize screens too, with your product name and logo.

You'll need to provide Application IDs in order to get an API key. Don't forget to provide the Android and iOS one as they are different most of the time.

Usage #

Authentication #

First of all you'll need to authenticate with your API key provided the step before. No verifications are made here, so paste the good key in order to prevent login errors from appearing. To authenticate, just call the following at application launch:


Show login window #

You'll then need your user to login with its personnal account if it isn't already the case. To check if the user is already logged in, call:

await SumupFlutter.isLoggedIn();

If true, then the user is already logged in, then no need to show the login window. if false then consider to show login screen with the following:


One improvement that will be made in the future is to handle the answer of the login view. Currently, I recommend making a call before calling checkout just to ensure user is connected.

Launch Checkout Process #

The checkout process is currently very simple, and fits in a SumupCheckoutRequest object that needs:

  • amount (String)
  • title (String)
  • currencyCode (String - ISO 4217:2015)

Just create a new SumupCheckoutRequest on the fly while calling the checkout method, e.g:

SumupFlutter.checkout(new SumupCheckoutRequest(amount: "12.0", title: "My Sumup Payment", currencyCode: "EUR")

That's it !

Currently a lot of tests are being done on my side to ensure everything works well.

0.0.1 #

  • Trivial implementation of native SDK for SumUp Payment
  • Login view
  • Simple Checkout Process (Amount, Title and Currency Code only)

0.0.2 #

  • Fix Cocoapods integration


sumup_flutter_example #

Demonstrates how to use the sumup_flutter 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:

  sumup_flutter: ^0.0.3

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:sumup_flutter/sumup_flutter.dart';
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]
Learn more about scoring.

We analyzed this package on Jan 21, 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

Health issues and suggestions

Document public APIs. (-1 points)

15 out of 15 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/sumup_flutter.dart. (-0.50 points)

Analysis of lib/sumup_flutter.dart reported 1 hint:

line 10 col 43: Name non-constant identifiers using lowerCamelCase.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


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.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies