Skip to content

faithomotoso/flutter_paystack_webview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flutter_paystack_webview

A Flutter plugin for payments with Paystack using a WebView.

=========================================

Note: This package is experimental

=========================================

Installation

To use this package, add in pubspec.yaml

flutter_paystack_webview:
    git: https://github.com/faithomotoso/flutter_paystack_webview.git

Usage

You can use this plugin either as a full page or embedded with your own page

As embedded

...
PaystackWebView(
          usingEmbedded: true,
          secretKey: "your_secret_key",
          customerEmail: "customer@email.com",
          amountInNaira: 100,
          callbackURL: "https://www.paystack.com",
          onTransactionInitialized: (PaystackInitialize paystackInitialize) {
            print(paystackInitialize.toString());
          },
          onTransactionVerified: (verifiedMap, status, reference) async {
            print("Transaction verified: $verifiedMap");
          },)
...

As full page

Navigator.push(context, builder: (_) => PaystackWebView(
                                    secretKey: "your_secret_key",
                                    customerEmail: "customer@email.com",
                                    amountInNaira: 100,
                                    callbackURL: "https://www.paystack.com",
                                    onTransactionInitialized: (PaystackInitialize paystackInitialize) {
                                    print(paystackInitialize.toString());
                                    },
                                    onTransactionVerified: (verifiedMap, status, reference) async {
                                    print("Transaction verified: $verifiedMap");
                                    },));

Please report bugs and suggest features

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages