cyberpaysdkflutter 1.0.0+24 copy "cyberpaysdkflutter: ^1.0.0+24" to clipboard
cyberpaysdkflutter: ^1.0.0+24 copied to clipboard

discontinued
outdated

The Android SDK to integrate to the cyberpay payment gateway The Cyberpay SDK makes it quick and easy to build seamless payment into your android app. The SDK contains custom views, and helps in manag [...]

Cyber Pay Flutter Plugin #

A Flutter package allows you to easily implement the Cyber Pay Credit Card's UI easily with the Card detection.

Codacy Badge

Installing #

  1. Add dependency to pubspec.yaml

    Get the latest version in the 'Installing' tab on pub.dartlang.org

dependencies:
    cyberpaysdkflutter: ^1.0.0+24
  1. Import the package
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:cyberpayflutter_plugin/cyberpayflutter_plugin.dart';


3.1 Adding TransactionObject

With required parameters


    await CyberpayflutterPlugin.makePayment(integrationKey: "INTEGRATION_KEY", customerEmail: "shaba@gmail.com", amount: AMOUNT IN KOBO, liveMode: true );
     

3.2 Call Cyberpay SDK in a Payment Button


 FlatButton(
         onPressed: () async {
           try {
             await CyberpayflutterPlugin.makePayment(integrationKey: "INTEGRATION_KEY", customerEmail: "shaba@gmail.com", amount: 200000, liveMode: true );

           } on PlatformException catch (e) {
             response = "Failed to Invoke: '${e.message}'.";
           }
         },

  1. Get Response Back from InitState

 @override
   void initState() {
     super.initState(); 
     
     platform.setMethodCallHandler((call) {
       final String argument = call.arguments;
       switch (call.method) {
         case "onSuccess":
           
          print("SUCCESS $argument");
 
           break;
       }
       return;

     });
   }

How to use #

Check out the example app in the example directory or the 'Example' tab on pub.dartlang.org for a more complete example.

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

0
likes
0
points
7
downloads

Publisher

unverified uploader

Weekly Downloads

The Android SDK to integrate to the cyberpay payment gateway The Cyberpay SDK makes it quick and easy to build seamless payment into your android app. The SDK contains custom views, and helps in managing the Cyberspace API.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on cyberpaysdkflutter

Packages that implement cyberpaysdkflutter