Bridge with native Sumup SDK, supporting Air, Air Lite or PIN+ Terminal
/!\ WORK IN PROGRESS /!\
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
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.
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:
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:
true, then the user is already logged in, then no need to show the login window. if
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.
The checkout process is currently very simple, and fits in a
SumupCheckoutRequest object that needs:
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.
Demonstrates how to use the sumup_flutter plugin.
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.
Add this to your package's pubspec.yaml file:
dependencies: sumup_flutter: ^0.0.1
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.
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 Aug 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
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.
lib/sumup_flutter.dart. (-0.50 points)
lib/sumup_flutter.dart reported 1 hint:
line 10 col 43: Name non-constant identifiers using lowerCamelCase.
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.