cyberpaysdkflutter 1.0.0+23 copy "cyberpaysdkflutter: ^1.0.0+23" to clipboard
cyberpaysdkflutter: ^1.0.0+23 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 [...]

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
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