kkiapay_flutter_sdk 1.0.5 copy "kkiapay_flutter_sdk: ^1.0.5" to clipboard
kkiapay_flutter_sdk: ^1.0.5 copied to clipboard

outdated

KkiaPay allows businesses to safely receive payments by mobile money, credit card and bank account.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:kkiapay_flutter_sdk/kkiapayWebview.dart';
import './successScreen.dart';

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

void sucessCallback(response, context) {
  print(response);
  Navigator.pop(context);
  Navigator.push(
    context,
    MaterialPageRoute(
      builder: (context) => SuccessScreen(
        amount: response['amount'],
        transactionId: response['transactionId'],
      ),
    ),
  );
}

final kkiapay = KKiaPay(
  amount: 1,
  phone: '97000000',
  data: 'hello world',
  sandbox: true,
  apikey: 'XXXXXXXXXXXXXXX',
  callback: sucessCallback,
  name: 'JOHN DOE',
  theme: "#E30E25",
);

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Kkiapay Sample'),
          centerTitle: true,
        ),
        body: KkiapaySample(),
      ),
    );
  }
}

class KkiapaySample extends StatelessWidget {
  const KkiapaySample({
    Key key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Center(
      child: ButtonTheme(
        minWidth: 250.0,
        height: 60.0,
        child: TextButton(
          style: ButtonStyle(
            backgroundColor: MaterialStateProperty.all(Color(0xFFE30E25)),
            foregroundColor: MaterialStateProperty.all(Colors.white),
          ),
          child: Text(
            'Pay Now',
            style: TextStyle(color: Colors.white),
          ),
          onPressed: () {
            Navigator.push(
              context,
              MaterialPageRoute(builder: (context) => kkiapay),
            );
          },
        ),
      ),
    );
  }
}
25
likes
0
pub points
86%
popularity

Publisher

unverified uploader

KkiaPay allows businesses to safely receive payments by mobile money, credit card and bank account.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

cupertino_icons, flutter, flutter_webview_plugin, http, webview_flutter

More

Packages that depend on kkiapay_flutter_sdk