pstk / paystack-magento2-module
Paystack Magento2 Module using \Magento\Payment\Model\Method\AbstractMethod
Installs: 5 583
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 13
Forks: 14
Open Issues: 5
Type:magento2-module
pkg:composer/pstk/paystack-magento2-module
Requires
- yabacon/paystack-php: 2.*
- dev-master
- 2.5.0
- 2.4.1
- 2.3.5
- v2.0.0
- v1.0.2
- 1.0.0
- 0.9.17
- 0.9.16
- 0.9.15
- 0.9.13.x-dev
- 0.9.13
- 0.9.12
- 0.9.11
- 0.9.10
- 0.9.9
- 0.9.8
- 0.9.7-beta
- 0.9.6-beta
- 0.9.4-beta
- dev-patch/magento-2
- dev-chore/SECUR-163/create-codeql-workflow
- dev-chore/update-readme-with-config
- dev-dev
- dev-task/INFRA-279-create-dockerfile
- dev-revert-47-revert-46-master
- dev-revert-46-master
This package is auto-updated.
Last update: 2025-11-26 12:04:52 UTC
README
Paystack Magento 2 Module
Paystack payment gateway Magento2 extension
Version: 2.5.0 (Paystack v2 Inline.js API)
Requirements
- Magento 2.x
- PHP 8.3+
- yabacon/paystack-php v2.2.0 or newer
Installation
Composer (Recommended)
Go to your Magento2 root folder and run:
composer require pstk/paystack-magento2-module:^2.5.0 php bin/magento module:enable Pstk_Paystack php bin/magento setup:upgrade php bin/magento cache:flush
Manual Installation (Custom Source)
Copy all files from your source folder (plugin-magento-2) to app/code/Pstk/Paystack/ in your Magento installation.
Then run:
php bin/magento module:enable Pstk_Paystack php bin/magento setup:upgrade php bin/magento cache:flush
Install
-
Go to Magento2 root folder
-
Enter following command to install module:
composer require pstk/paystack-magento2-module
-
Wait while dependencies are updated.
-
Enter following commands to enable module:
php bin/magento module:enable Pstk_Paystack --clear-static-content php bin/magento setup:upgrade php bin/magento setup:di:compile
Configuration
To configure the plugin in Magento Admin:
- Go to Stores > Configuration > Sales > Payment Methods.
- Find Paystack and configure:
- Enabled: Yes/No
- Title: What customers see at checkout
- Integration Type: Inline (Popup) or Redirect
- Test Mode: Enable for sandbox testing
- Test/Live Secret Key: Get from your Paystack dashboard
- Test/Live Public Key: Get from your Paystack dashboard
- Click Save Config.
Note: Inline (Popup) uses Paystack v2 Inline.js API. Make sure your CSP whitelist and RequireJS config are updated as shown in the migration guide.
Known Errors
Sometimes after receiving payment for an order you get an error like: Class Yabacon\Paystack not found and magento doesn't redirect to the success page.
Fix:
Run:
composer require yabacon/paystack-php
Enable and configure Paystack in Magento Admin under Stores/Configuration/Sales/Payment Methods
Fail to redirect to success page after payment
Ensure you are using Paystack v2 Inline.js and your CSP/RequireJS configs are correct.
Running the magento2 on docker
Contained within this repo is a Dockerfile and a docker-compose file to quickly spin up Magento 2 and MySQL containers with the Paystack plugin installed.
Prerequisites
- Install Docker
Quick Steps
- Create a
.envfile from.env.samplein the root directory. Fill in your values. - Run
docker-compose upfrom the root directory to build and start the containers. - Visit
localhost:8000for the Magento store. For admin, visitlocalhost:8000/<MAGENTO_BACKEND_FRONTNAME>(set in.env). - Run
docker-compose downto stop the containers.
Documentation
Support
For bug reports and feature requests directly related to this plugin, please use the issue tracker.
For general support or questions about your Paystack account, you can reach out by sending a message from our website.
Community
If you are a developer, please join our Developer Community on Slack.
Contributing to the Magento 2 plugin
If you have a patch or have stumbled upon an issue with the Magento 2 plugin, you can contribute this back to the code. Please read our contributor guidelines for more information how you can do this.