cyberpayflutter 1.0.1 copy "cyberpayflutter: ^1.0.1" to clipboard
cyberpayflutter: ^1.0.1 copied to clipboard

outdated

The Cyberpay Flutter SDK will serve as an easy to use the library to quickly integrate payment to your mobile application.

Cyberpay #

pub package

Introduction #

Cyberpay provides you with the most convenient and fastest process of making and collecting payments from your customers within Nigeria

About the SDK #

The mobile SDK will serve as an easy to use library to quickly integrate Cyberpay to your mobile application.

The will serve as a wrapper on the existing Cyberpay web services and create a mobile entry point for making both Card and Bank transactions.

The SDK will provide custom views/layouts for checkout, pin, otp, sucured3d as well as handles all business logics taking the bulk of the job and exposing just three call backs representing the status of the transaction.

Requirements #

The Cyberpay Flutter SDK is compatible with iOS Apps supporting iOS 11 and above.

Getting Started #

Installing #

  1. Add the cyberpay package to the dependencies section of your pubspec.yaml file. The code below makes the Dart API of the cyberpayflutter plugin available in your application

    dependencies:
     cyberpayflutter: ^1.0.1
    
  2. Run the following command in your terminal after navigating to your project directory, to download the package

    flutter pub get
    

Using the Cyberpay SDK #

Step 1: Import the cyberpay sdk

    import 'package:cyberpayflutter/cyberpayflutter.dart';

Step 2: Complete integration with Our Drop-In UI

    try {
      var result = await Cyberpayflutter.makePayment(
          integrationKey: "MERCHANT_INTEGRATION_KEY",
          amount: "PAYMENT_AMOUNT_IN_KOBO",
          customerEmail: "CUSTOMER_EMAIL",
          liveMode: false);
        if (result.isPaymentSuccessFul) {
        print("Payment is Successfult, Your Payment Reference: ${result.paymentReference}");
        } 
        else {
            print(result.errorMessage);
      }
    } on PlatformException catch (e) {
        var error = "Cyberpay Error: '${e.message}'.";
        print(error);
    }

Cyberpay Intergration, when Transaction has been set in the server) #

Step 1: Import the cyberpay sdk

    import 'package:cyberpayflutter/cyberpayflutter.dart';

Step 2: Complete integration with Our Server Drop-In UI

    try {
      var result = await Cyberpayflutter.makePaymentWithReference(
          integrationKey: "MERCHANT_INTEGRATION_KEY",
          reference: "TRANSACTION_REFERENCE_FROM_SERVER",
          liveMode: false);
      if (result.isPaymentSuccessFul) {
        print(
            "Payment is Successfult, Your Payment Reference: ${result.paymentReference}");
      } else {
        print(result.errorMessage);
      }
    } on PlatformException catch (e) {
      var error = "Cyberpay Error: '${e.message}'.";
      print(error);
    }

Note : Ensure when going live, you change liveMode to true, and also change the integration key. This key can be gotten from the merchant dashboard on the cyberpay merchant portal

Example #

To run the example project, clone the repo, and run the following command in your terminal:

flutter run

License #

cyberpaysdk is available under the MIT license. See the LICENSE file for more info.

6
likes
0
pub points
26%
popularity

Publisher

verified publishercyberspace.net.ng

The Cyberpay Flutter SDK will serve as an easy to use the library to quickly integrate payment to your mobile application.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on cyberpayflutter