Skip to content

The onClosed and onSuccess not being called #25

Open

Description

@casontek

flutter_paystack_plus: ^2.5.0

await FlutterPaystackPlus.openPaystackPopup(
                customerEmail: state.email,
                amount: state.amount,
                reference: reference,
                authorizationUrl: authUrl,
                context: event.context,
                onClosed: () {
                  emit(state.copyWith(
                      status: Status.failed,
                      message: 'Payment failed'
                  ));
                  logger.i('@@@ PayStack Payment closed');
                },
                onSuccess: () async {
                  logger.i('@@@ PayStack Payment successful');
                  emit(state.copyWith(
                      status: Status.success,
                      message: 'Payment failed'
                  ));
                }
            );

target_sdk_version=36

Flutter 3.41.5
Dart 3.11.3

When clicking the close button on the form it does not respond as well.

Activity

  1. Princewil commented on Apr 5, 2026

    @Princewil
    Owner

    Alright...Will look into it

  2. austinevick commented on Jul 2, 2026

    @austinevick

    flutter_paystack_plus: ^2.5.0

    await FlutterPaystackPlus.openPaystackPopup(
                    customerEmail: state.email,
                    amount: state.amount,
                    reference: reference,
                    authorizationUrl: authUrl,
                    context: event.context,
                    onClosed: () {
                      emit(state.copyWith(
                          status: Status.failed,
                          message: 'Payment failed'
                      ));
                      logger.i('@@@ PayStack Payment closed');
                    },
                    onSuccess: () async {
                      logger.i('@@@ PayStack Payment successful');
                      emit(state.copyWith(
                          status: Status.success,
                          message: 'Payment failed'
                      ));
                    }
                );
    

    target_sdk_version=36

    Flutter 3.41.5 Dart 3.11.3

    When clicking the close button on the form it does not respond as well.

    I am having the same issue too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions