|
1 | | -[![Latest Version on Packagist][ico-version]][link-packagist] |
2 | | -[![Software License][ico-license]](LICENSE) |
3 | | -[![Total Downloads][ico-downloads]][link-downloads] |
4 | | - |
5 | | -## Paystack Magento 2 Module |
6 | | - |
7 | | -Paystack payment gateway Magento2 extension |
8 | | - |
9 | | -**Version:** 3.0.0 (Paystack v2 Inline.js API) |
10 | | - |
11 | | -## Requirements |
12 | | - |
13 | | -- Magento 2.4.x |
14 | | -- PHP 8.2+ |
15 | | - |
16 | | -## Installation |
17 | | - |
18 | | -### Composer (Recommended) |
19 | | - |
20 | | -Go to your Magento2 root folder and run: |
21 | | - |
22 | | -```bash |
23 | | -composer require pstk/paystack-magento2-module |
24 | | -php bin/magento module:enable Pstk_Paystack |
25 | | -php bin/magento setup:upgrade |
26 | | -php bin/magento setup:di:compile |
27 | | -php bin/magento cache:flush |
28 | | -``` |
29 | | - |
30 | | -### Manual Installation |
31 | | - |
32 | | -Copy all files to `app/code/Pstk/Paystack/` in your Magento installation, then run: |
33 | | - |
34 | | -```bash |
35 | | -php bin/magento module:enable Pstk_Paystack |
36 | | -php bin/magento setup:upgrade |
37 | | -php bin/magento setup:di:compile |
38 | | -php bin/magento cache:flush |
39 | | -``` |
40 | | - |
41 | | -## Configuration |
42 | | - |
43 | | -To configure the plugin in *Magento Admin*: |
44 | | -1. Go to **Stores > Configuration > Sales > Payment Methods**. |
45 | | -2. Find **Paystack** and configure: |
46 | | - - **Enabled**: Yes/No |
47 | | - - **Title**: What customers see at checkout |
48 | | - - **Integration Type**: Inline (Popup) or Redirect |
49 | | - - **Test Mode**: Enable for sandbox testing |
50 | | - - **Test/Live Secret Key**: Get from your [Paystack dashboard](https://dashboard.paystack.com/#/settings/developer) |
51 | | - - **Test/Live Public Key**: Get from your [Paystack dashboard](https://dashboard.paystack.com/#/settings/developer) |
52 | | -3. Click **Save Config**. |
53 | | - |
54 | | -### Webhook Setup |
55 | | - |
56 | | -For reliable payment confirmation (especially for the redirect flow), set up a webhook in your Paystack dashboard: |
57 | | - |
58 | | -1. Go to **Settings > API Keys & Webhooks** on your [Paystack dashboard](https://dashboard.paystack.com/#/settings/developer) |
59 | | -2. Set the Webhook URL to: `https://yourdomain.com/paystack/payment/webhook` |
60 | | -3. The module handles `charge.success` events and automatically updates order status |
61 | | - |
62 | | -## Development Environment |
63 | | - |
64 | | -A Docker-based development environment is included in the `dev/` directory for contributors and testing. |
65 | | - |
66 | | -### Prerequisites |
67 | | - |
68 | | -- [Docker](https://www.docker.com/) (or [Rancher Desktop](https://rancherdesktop.io/) with `dockerd` runtime) |
69 | | -- A [Paystack test account](https://dashboard.paystack.com/#/signup) |
70 | | - |
71 | | -### Quick Start |
72 | | - |
73 | | -```bash |
74 | | -cd dev |
75 | | -cp .env.example .env # Add your Paystack test keys |
76 | | -docker compose up -d # First run builds the image (~5 min) and installs Magento (~3 min) |
77 | | -bash setup.sh # Enables module, creates test products, configures everything |
78 | | -``` |
79 | | - |
80 | | -Once complete you'll see: |
81 | | - |
82 | | -``` |
83 | | -============================================ |
84 | | - Setup complete! |
85 | | -
|
86 | | - Storefront: http://localhost:8080 |
87 | | - Admin panel: http://localhost:8080/admin |
88 | | - Admin login: admin / Admin12345! |
89 | | -
|
90 | | - Test card: 4084 0840 8408 4081 |
91 | | - Expiry: 12/30 |
92 | | - CVV: 408 |
93 | | - PIN: 0000 |
94 | | - OTP: 123456 |
95 | | -============================================ |
96 | | -``` |
97 | | - |
98 | | -### What's Included |
99 | | - |
100 | | -- **Magento 2.4.8-p3** via [Mage-OS](https://mage-os.org/) public mirror (no Adobe marketplace auth needed) |
101 | | -- **OpenSearch 2.19.1** + **MariaDB 10.6** |
102 | | -- **5 test products** with images and a configured homepage |
103 | | -- **Paystack payment** pre-configured in test mode (inline popup) |
104 | | -- Container names: `paystack-magento`, `paystack-db`, `paystack-search` |
105 | | - |
106 | | -### Tear Down |
107 | | - |
108 | | -```bash |
109 | | -cd dev |
110 | | -docker compose down # Stop containers (preserves data) |
111 | | -docker compose down -v # Stop containers and delete all data |
112 | | -``` |
113 | | - |
114 | | -## Documentation |
115 | | - |
116 | | -* [Paystack Documentation](https://developers.paystack.co/v2.0/docs/) |
117 | | -* [Paystack Helpdesk](https://paystack.com/help) |
118 | | - |
119 | | -## Support |
120 | | - |
121 | | -For bug reports and feature requests directly related to this plugin, please use the [issue tracker](https://github.com/PaystackHQ/plugin-magento-2/issues). |
122 | | - |
123 | | -For general support or questions about your Paystack account, you can reach out by sending a message from [our website](https://paystack.com/contact). |
124 | | - |
125 | | -## Community |
126 | | - |
127 | | -If you are a developer, please join our Developer Community on [Slack](https://slack.paystack.com). |
128 | | - |
129 | | -## Contributing to the Magento 2 plugin |
130 | | - |
131 | | -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](https://github.com/PaystackHQ/plugin-magento-2/blob/master/CONTRIBUTING.md) for more information how you can do this. |
132 | | - |
133 | | -[ico-version]: https://img.shields.io/packagist/v/pstk/paystack-magento2-module.svg?style=flat-square |
134 | | -[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square |
135 | | -[ico-downloads]: https://img.shields.io/packagist/dt/pstk/paystack-magento2-module.svg?style=flat-square |
136 | | - |
137 | | -[link-packagist]: https://packagist.org/packages/pstk/paystack-magento2-module |
138 | | -[link-downloads]: https://packagist.org/packages/pstk/paystack-magento2-module |
| 1 | +[![Latest Version on Packagist][ico-version]][link-packagist] |
| 2 | +[![Software License][ico-license]](LICENSE) |
| 3 | +[![Total Downloads][ico-downloads]][link-downloads] |
| 4 | + |
| 5 | +## Paystack Magento 2 Module |
| 6 | + |
| 7 | +Paystack payment gateway Magento2 extension |
| 8 | + |
| 9 | +**Version:** 3.0.2 (Paystack v2 Inline.js API) |
| 10 | + |
| 11 | +## Requirements |
| 12 | + |
| 13 | +- Magento 2.4.x |
| 14 | +- PHP 8.2+ |
| 15 | + |
| 16 | +## Installation |
| 17 | + |
| 18 | +### Composer (Recommended) |
| 19 | + |
| 20 | +Go to your Magento2 root folder and run: |
| 21 | + |
| 22 | +```bash |
| 23 | +composer require pstk/paystack-magento2-module |
| 24 | +php bin/magento module:enable Pstk_Paystack |
| 25 | +php bin/magento setup:upgrade |
| 26 | +php bin/magento setup:di:compile |
| 27 | +php bin/magento cache:flush |
| 28 | +``` |
| 29 | + |
| 30 | +### Manual Installation |
| 31 | + |
| 32 | +Copy all files to `app/code/Pstk/Paystack/` in your Magento installation, then run: |
| 33 | + |
| 34 | +```bash |
| 35 | +php bin/magento module:enable Pstk_Paystack |
| 36 | +php bin/magento setup:upgrade |
| 37 | +php bin/magento setup:di:compile |
| 38 | +php bin/magento cache:flush |
| 39 | +``` |
| 40 | + |
| 41 | +## Configuration |
| 42 | + |
| 43 | +To configure the plugin in *Magento Admin*: |
| 44 | +1. Go to **Stores > Configuration > Sales > Payment Methods**. |
| 45 | +2. Find **Paystack** and configure: |
| 46 | + - **Enabled**: Yes/No |
| 47 | + - **Title**: What customers see at checkout |
| 48 | + - **Integration Type**: Inline (Popup) or Redirect |
| 49 | + - **Test Mode**: Enable for sandbox testing |
| 50 | + - **Test/Live Secret Key**: Get from your [Paystack dashboard](https://dashboard.paystack.com/#/settings/developer) |
| 51 | + - **Test/Live Public Key**: Get from your [Paystack dashboard](https://dashboard.paystack.com/#/settings/developer) |
| 52 | +3. Click **Save Config**. |
| 53 | + |
| 54 | +### Webhook Setup |
| 55 | + |
| 56 | +For reliable payment confirmation (especially for the redirect flow), set up a webhook in your Paystack dashboard: |
| 57 | + |
| 58 | +1. Go to **Settings > API Keys & Webhooks** on your [Paystack dashboard](https://dashboard.paystack.com/#/settings/developer) |
| 59 | +2. Set the Webhook URL to: `https://yourdomain.com/paystack/payment/webhook` |
| 60 | +3. The module handles `charge.success` events and automatically updates order status |
| 61 | + |
| 62 | +## Development Environment |
| 63 | + |
| 64 | +A Docker-based development environment is included in the `dev/` directory for contributors and testing. |
| 65 | + |
| 66 | +### Prerequisites |
| 67 | + |
| 68 | +- [Docker](https://www.docker.com/) (or [Rancher Desktop](https://rancherdesktop.io/) with `dockerd` runtime) |
| 69 | +- A [Paystack test account](https://dashboard.paystack.com/#/signup) |
| 70 | + |
| 71 | +### Quick Start |
| 72 | + |
| 73 | +```bash |
| 74 | +cd dev |
| 75 | +cp .env.example .env # Add your Paystack test keys |
| 76 | +docker compose up -d # First run builds the image (~5 min) and installs Magento (~3 min) |
| 77 | +bash setup.sh # Enables module, creates test products, configures everything |
| 78 | +``` |
| 79 | + |
| 80 | +Once complete you'll see: |
| 81 | + |
| 82 | +``` |
| 83 | +============================================ |
| 84 | + Setup complete! |
| 85 | +
|
| 86 | + Storefront: http://localhost:8080 |
| 87 | + Admin panel: http://localhost:8080/admin |
| 88 | + Admin login: admin / Admin12345! |
| 89 | +
|
| 90 | + Test card: 4084 0840 8408 4081 |
| 91 | + Expiry: 12/30 |
| 92 | + CVV: 408 |
| 93 | + PIN: 0000 |
| 94 | + OTP: 123456 |
| 95 | +============================================ |
| 96 | +``` |
| 97 | + |
| 98 | +### What's Included |
| 99 | + |
| 100 | +- **Magento 2.4.8-p3** via [Mage-OS](https://mage-os.org/) public mirror (no Adobe marketplace auth needed) |
| 101 | +- **OpenSearch 2.19.1** + **MariaDB 10.6** |
| 102 | +- **5 test products** with images and a configured homepage |
| 103 | +- **Paystack payment** pre-configured in test mode (inline popup) |
| 104 | +- Container names: `paystack-magento`, `paystack-db`, `paystack-search` |
| 105 | + |
| 106 | +### Tear Down |
| 107 | + |
| 108 | +```bash |
| 109 | +cd dev |
| 110 | +docker compose down # Stop containers (preserves data) |
| 111 | +docker compose down -v # Stop containers and delete all data |
| 112 | +``` |
| 113 | + |
| 114 | +## Documentation |
| 115 | + |
| 116 | +* [Paystack Documentation](https://developers.paystack.co/v2.0/docs/) |
| 117 | +* [Paystack Helpdesk](https://paystack.com/help) |
| 118 | + |
| 119 | +## Support |
| 120 | + |
| 121 | +For bug reports and feature requests directly related to this plugin, please use the [issue tracker](https://github.com/PaystackHQ/plugin-magento-2/issues). |
| 122 | + |
| 123 | +For general support or questions about your Paystack account, you can reach out by sending a message from [our website](https://paystack.com/contact). |
| 124 | + |
| 125 | +## Community |
| 126 | + |
| 127 | +If you are a developer, please join our Developer Community on [Slack](https://slack.paystack.com). |
| 128 | + |
| 129 | +## Contributing to the Magento 2 plugin |
| 130 | + |
| 131 | +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](https://github.com/PaystackHQ/plugin-magento-2/blob/master/CONTRIBUTING.md) for more information how you can do this. |
| 132 | + |
| 133 | +[ico-version]: https://img.shields.io/packagist/v/pstk/paystack-magento2-module.svg?style=flat-square |
| 134 | +[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square |
| 135 | +[ico-downloads]: https://img.shields.io/packagist/dt/pstk/paystack-magento2-module.svg?style=flat-square |
| 136 | + |
| 137 | +[link-packagist]: https://packagist.org/packages/pstk/paystack-magento2-module |
| 138 | +[link-downloads]: https://packagist.org/packages/pstk/paystack-magento2-module |
0 commit comments