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

outdated

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

example/lib/main.dart

// import 'successScreen.dart';
// import 'package:example/screens/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);
  print('-============>');
  Navigator.pop(context);
  print('function appelé avec succès');
  Navigator.push(
    context,
    MaterialPageRoute(
        builder: (context) => SuccessScreen(
              
              amount: response['amount'],
              transactionId: response['transactionId']
            )),
  );
}
// KkiapayWebview()
// _SdkData()

final kkiapay = KKiaPay(amount: 1,phone: '97000000',data: 'hello world',sandbox: true,apikey: 'xxxxxxxxxxxxxxx',callback: sucessCallback,);

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: FlatButton(
          color: Color(0xFFE30E25),
          child: Text(
            'Pay Now',
            style: TextStyle(color: Colors.white),
          ),
          onPressed: () {
            Navigator.push(
              context,
              MaterialPageRoute(builder: (context) => kkiapay),
            );
          },
        ),
      ),
    );
  }
}
25
likes
0
pub points
85%
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