Releases: a11rew/medusa-payment-paystack
[email protected]
Major Changes
-
41f0cae: This version comes with support for Medusa version V2.
Breaking changes:
- The plugin now requires Medusa version V2.0.0 or higher.
- How the plugin is configured has changed. The plugin is configured is Medusa as a
PaymentProvider
under thePayment
module. The configuration is now done in themedusa-config.ts
file. Refer to the "Configure the Paystack Plugin" section of the README for more information. - Webhook URLs now MUST be set in the format
<your-medusa-backend-url>/hooks/payment/paystack
. Eg.https://your-medusa-backend.com/hooks/payment/paystack
. Note this is different from the previous<your-medusa-backend-url>/paystack/hooks
format.
Patch Changes
-
3864dad: fix: send amounts in subunits
-
7e73061: Paystack transaction access_code's and authorization_url's are now returned as first class members of the transaction data object (on the same level as the paystackTxRef).
In V2, users of the plugin are encouraged to use either the
paystackTxAccessCode
andpaystackTxAuthorizationUrl
to initiate the Paystack payment flow. Instead of the previous flow that required providing thepaystackTxRef
as well as the amount, email and currency code to continue the payment in the storefront.This is important because, instead of having to provide the same options (amount, email and currency code) to continue the payment in the storefront, which is error prone, users can now use the only one of the
paystackTxAccessCode
andpaystackTxAuthorizationUrl
to initiate the payment flow. This also makes the integration on the storefront side simpler and more flexible.The
paystackTxRef
is still returned for backwards compatibility.To use the new flows, users of the plugin can decide between the following options:
- Use the
paystackTxAccessCode
to "resume" the payment flow. Follow the Paystack documentation to implement the transaction resumption flow. - Use the
paystackTxAuthorizationUrl
to redirect the customer to Paystack's hosted payment page. The Paystack hosted page can either be opened in a new tab, or a child window. After the customer completes the payment, they will be redirected back to the storefront while the payment is confirmed on your Medusa backend using webhooks.
- Use the
[email protected]
[email protected]
Patch Changes
- ac65bde: Fixes initialization errors related to "msw/node" requires
[email protected]
Patch Changes
- c77bb51: Adds support for automatically retrying network and 5xx errors in requests sent to Paystack.
[email protected]
Patch Changes
- cc7407a: Removes hardcoded currency restrictions
Improves logging of Paystack API errors
[email protected]
Minor Changes
- 1524578: Payments are now automatically marked as captured. You do not have to go into the admin dashboard after every order to mark the payment as captured.
[email protected]
[email protected]
Patch Changes
- 47af03f: Upgrade dependencies
Include README in published package
[email protected]
Patch Changes
-
731da1d: Re-adds amount and currency checks
Adds new debug mode for testing
[email protected]
Patch Changes
-
e8cf256: Removes outdated Paystack API wrapper package we were using prior fixing deprecated dependency warnings.
Also changes how we generate references. Transactions are initialized with Paystack and the returned reference used instead of an arbitrary cuid.