flutter_checkout_payment 0.1.0+2

Flutter Android iOS

This plugin is for Checkout online payment. It's implemented the native SDKs to work on Flutter environment.

Flutter Checkout Payment #

pub.dev Donate Paypal GitHub Follow

Explain #

This plugin is for Checkout online payment. It's implemented the native SDKs to work on Flutter environment.

Getting Started #

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_checkout_payment: ^0.1.0+2

Android #

You have to edit AndroidManifest.xml file with following.

<manifest ...
    xmlns:tools="http://schemas.android.com/tools" 
    ... />
    ...
    <application
        ...
        tools:replace="android:label" 
        ... >
    ...
    </appliaction>
</manifest>

iOS #

The SDK build for >= iOS 10.0, so you need to set the platform version in the Podfile to iOS 10 or above.

platform: :ios, '10.0'

Usage #

You just have to import the package with

import 'package:flutter_checkout_payment/flutter_checkout_payment.dart';

Then, you need to initialize the API with you public key. Your public key is found on Checkout dashboard.

await FlutterCheckoutPayment.init(key: "YOUR_PUBLIC_KEY");

And when you are ready for production you have to set the environment to Live.

await FlutterCheckoutPayment.init(key: "YOUR_PUBLIC_KEY", environment: Environment.LIVE);

Now, you can generate the Token which you will use to proceed the payment.

String token = await FlutterCheckoutPayment.generateToken(number: "4242424242424242", name: "name", expiryMonth: "05", expiryYear: "21", cvv: "100");

Public Static Methods Summary #

ReturnDescription
Future<bool>init(@required String key, Environment environment default Environment.SANDBOX})
Initialize the Checkout API with key and environment. Return a bool of the successful status.
Future<String>generateToken({@required String number, @required String name, @required String expiryMonth, @required String expiryYear, @required String cvv, BillingModel billingModel})
Generate the token which it will be used to make the payment, return the String value.
Future<bool>isCardValid({@required String number})
Check whether the card number is valid or not, return a bool with the result.

The rest of methods are under development.

Objects #

class BillingModel {
  final String addressLine1;
  final String addressLine2;
  final String postcode;
  final String country;
  final String city;
  final String state;
  final PhoneModel phoneModel;
}

class PhoneModel {
  final String countryCode;
  final String number;
}

Checkout Android SDK: https://github.com/checkout/frames-android

Checkout iOS SDK: https://github.com/checkout/frames-ios

This plugin is mainly developed for GRANDTK company.

Issues or Contributions #

This is a beta version of plugin, so I am very appreciated for any issues or contribution you can help me with.

License #

MIT: http://mit-license.org.

Copyright (c) 2019 Shady Boshra. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Find me on Stackoverflow #

profile for Shady Boshra at Stack Overflow, Q&A for professional and enthusiast programmers

6
likes
95
pub points
65%
popularity

This plugin is for Checkout online payment. It's implemented the native SDKs to work on Flutter environment.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

shadyboshra2011@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_checkout_payment