Paystack Manager

A Flutter plugin for making payments via Paystack Payment Gateway. Fully supports Android and iOS.

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

Usage

To use this package :

dependencies:
    flutter:
      sdk: flutter
    paystack_manager:

Then initialize the package whenever you need it:


    PaystackPayManager(context: context)
        ..setSecretKey("sk_test_7e3a3dbff5d7b8b2ee7e61125b503ecbba8c850f")
        //accepts widget
        ..setCompanyAssetImage(
          Image(
            image: AssetImage("assets/images/logo.png"),
          )
        )
        ..setAmount(152)
        ..setCurrency("GHS")
        ..setEmail("bakoambrose@gmail.com")
        ..setFirstName("Ambrose")
        ..setLastName("Bako")
        ..setMetadata(
          {
            "custom_fields": [
              {
                "value": "snapTask",
                "display_name": "Payment to",
                "variable_name": "payment_to"
              }
            ]
          },
        )
        ..onSuccesful(_onPaymentSuccessful)
        ..onFailed(_onPaymentFailed)
        ..onCancel(_onPaymentCancelled)
        ..initialize();

No other configuration required—the plugin works out of the box.

:helicopter: Testing your implementation

Paystack provides tons of payment cards for testing.

:arrow_forward: Running Example project

For help getting started with Flutter, view the online documentation.

An example project has been provided in this plugin. Clone this repo and navigate to the example folder. Open it with a supported IDE or execute flutter run from that folder in terminal.

:pencil: Contributing, :disappointed: Issues and :bug: Bug Reports

The project is open to public contribution. Please feel very free to contribute. Experienced an issue or want to report a bug? Please, report it here. Remember to be as descriptive as possible.

:trophy: Credits

Thanks to the authors of Paystack Flutter. I leveraged on their work to bring this plugin to fruition.

Libraries

accent_button
api_response
apis
bank_payment_view
card_cvv_text_field
card_expiry_text_field
card_number_text_field
card_payment_view
card_type
card_utils
custom_dialog
input_formatters
loading_Transaction_view
mobile_money_payment_view
payment_address_entry_view
payment_bank_auth_view
payment_birthday_entry_view
payment_card
payment_failed_view
payment_info
payment_option
payment_option_header
payment_option_list_view_item
payment_options
payment_options_list_view
payment_options_selector_view
payment_otp_entry_view
payment_phone_entry
payment_pin_entry_view
paystack_manager
paystack_manager
paystack_payment_api
paystack_payment_checkout_page
secured_by
text_input_field
transaction
transaction_status
ui_color
ui_strings