Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass an accesscode #159

Open
iamevaristus opened this issue Apr 20, 2023 · 1 comment
Open

Pass an accesscode #159

iamevaristus opened this issue Apr 20, 2023 · 1 comment

Comments

@iamevaristus
Copy link

iamevaristus commented Apr 20, 2023

I am trying to use the plugin but I get the "Pass an accesscode" error. I am sure that accessCode is mainly when you want to initialize from the backend else you can pass the reference. And I passed the reference but still yet.

`
static void subscribe(BuildContext context, PaymentModel model) async {

     try {
          final charge = Charge()
          ..plan = model.plan
           ..amount = 3000 * 100
          ..email = model.user.emailAddress
            ..subAccount
               ..reference = getReference()
               ..transactionCharge
               final response = await paystack.checkout(context, charge: charge);
               debugShow(response);
           } catch (e) {
              debugShow(e.toString());
           }
        }

`

@Wilburt

I need a quick response on this issue, please.

@Leekogram
Copy link

I think you need to specify the checkout method from your code above it seems you didn't. So it's default to Checkout Method.selectable which requires access Code and you aren't providing that. Only card payment doesn't require access code read the plugin Doc again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants