cyberpaysdkflutter 0.0.1 copy "cyberpaysdkflutter: ^0.0.1" to clipboard
cyberpaysdkflutter: ^0.0.1 copied to clipboard

discontinued
outdated

A Cyber Pay Flutter Payment SDK. 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 [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:cyberpaysdkflutter/cyberpaysdkflutter.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  static const platform = const MethodChannel('cyberpayflutter_plugin');

  @override
  void initState() {
    super.initState();
    initCyberPayState();

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

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initCyberPayState() async {
    try {
      await CyberpayflutterPlugin.makePayment(
          integrationKey: "d5355204f9cf495f853c8f8d26ada19b",
          customerEmail: "shaba@gmail.com",
          amount: 2000,
          liveMode: false);
    } on PlatformException {}
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: \n'),
        ),
      ),
    );
  }
}
0
likes
30
points
7
downloads

Publisher

unverified uploader

Weekly Downloads

A Cyber Pay Flutter Payment SDK. 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.

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on cyberpaysdkflutter

Packages that implement cyberpaysdkflutter