a11rew / medusa-payment-paystack

Paystack payment provider for Medusa
https://storefront-production-ae6c.up.railway.app/
MIT License
51 stars 11 forks source link

Replace out of date `paystack-api` package #21

Closed a11rew closed 1 year ago

a11rew commented 1 year ago

We currently depend on version ^2.0.6 of the paystack-api package, it's used internally for making calls to the Paystack API.

The package hasn't been updated in 2 years though and depends on a number of deprecated packages, triggering NPM deprecated package warnings when this plugin is installed.

Screenshot 2023-08-06 at 3 26 39 PM

We need to either replace this package with another maintained wrapper of the Paystack API or handle making the calls manually.

agamswaroop619 commented 1 year ago

Can you please guide me through this issue? I am new to open source and would like to contribute.

a11rew commented 1 year ago

Hi @agamswaroop619, welcome!

This would involve replacing all calls made with the current Paystack SDK in this file https://github.com/a11rew/medusa-payment-paystack/blob/main/packages/plugin/src/services/paystack-provider.js. It could be with another Paystack library or manually making the calls to the API. This wrapper maintained by the Paystack team would be a good choice https://github.com/PaystackOSS/paystack-node

You could use this demo repo https://github.com/a11rew/medusa-paystack-demo along with the linking instructions here to test your changes locally.

Happy to answer any other questions you have

agamswaroop619 commented 1 year ago

Thanks @a11rew for such quick response!

Paystack account is currently not available for my country, I just wanted to ask if it was needed?

a11rew commented 1 year ago

Ah that would be a blocker @agamswaroop619. A Paystack account is be needed to get setup locally and verify changes work as expected.

agamswaroop619 commented 1 year ago

Sorry for troubling you, @a11rew. If anything else comes up that I can help please feel free to ask me! I will try my best to support in any way or form as I can!

a11rew commented 1 year ago

Sure thing, definitely not a bother @agamswaroop619