paywithpayazaflutter 0.2.4 copy "paywithpayazaflutter: ^0.2.4" to clipboard
paywithpayazaflutter: ^0.2.4 copied to clipboard

The flutter SDK for payaza checkout

Need to integrate a payment checkout engine for you flutter app? This package is the easiest way to do it

Features #

Pay with transfer. Pay with card and pay with bank coming soon

Getting started #

In order to use this package for your app, you will need to use the onGenerateRoute system for routing, this is because you will have to pass both your checkout page name route and your callback page name route.

Upon payment successful, you will receieve a string json as a returned value on your callback page

Usage #

class RouteGenerator{
  static Route<dynamic> generateRoute(RouteSettings settings){
    final args = settings.arguments;

    switch(settings.name){
      case '/':
        return MaterialPageRoute(builder: (_) => Checkout());
      case '/checkout':
        return MaterialPageRoute(builder: (_) => Checkout());
      case '/callback':
        if(args is String){
          return MaterialPageRoute(
              builder: (_) => CallbackPage(response: args)
          );
        }

        return _errorRoute();
      default:
        return _errorRoute();
    }
  }

  static Route<dynamic> _errorRoute(){
    return MaterialPageRoute(builder: (_){
      return Scaffold(
        body: Center(
          child: Text('Error'),
        ),
      );
    });
  }
}

Additional information #

1
likes
50
points
69
downloads

Publisher

unverified uploader

Weekly Downloads

The flutter SDK for payaza checkout

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

clipboard, flutter, http, socket_io_client, web_socket_channel

More

Packages that depend on paywithpayazaflutter