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

checkout breaks when Paystack is the only payment provider #278

Open
nathaniel1616 opened this issue Feb 22, 2024 · 1 comment
Open

checkout breaks when Paystack is the only payment provider #278

nathaniel1616 opened this issue Feb 22, 2024 · 1 comment

Comments

@nathaniel1616
Copy link

I am using medusa-paystack plugin at medusa.
https://medusajs.com/plugins/medusa-payment-paystack

Checkout page works fine when there are two payment provider.
When I select , paystack only as the only payment provider , I get this error at the backend

error: Error from Paystack API with status code 400: Invalid Email Address Passed
Error: Error from Paystack API with status code 400: Invalid Email Address Passed
at Paystack. (C:\Users\nat\medusa\my-medusa-store\node_modules\medusa-payment-paystack\dist\lib\paystack.js:121:35)
at step (C:\Users\nat\medusa\my-medusa-store\node_modules\medusa-payment-paystack\dist\lib\paystack.js:33:23)

I found a similar issue solved on Stripe on issue here #261

I would like to see an implementation with paystack.

@VariableVic
Copy link
Collaborator

VariableVic commented Feb 22, 2024

I don't know the specifics of your setup, but it looks like you're trying to initiate a Paystack payment when there's no email address available yet.

The solution will be similar to my Stripe example you mentioned.

When you have only one payment provider active, Medusa will select it by default when you check out. Make sure you're not trying to initiate e.g. PaystackPop.setup before the customer email and order amount are available. You might want to add specific conditions to the checkout flow to fit your use case.

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