You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Go to **Stores > Configuration > Sales > Payment Methods**.
66
45
2. Find **Paystack** and configure:
@@ -72,48 +51,65 @@ To configure the plugin in *Magento Admin*:
72
51
- **Test/Live Public Key**: Get from your [Paystack dashboard](https://dashboard.paystack.com/#/settings/developer)
73
52
3. Click **Save Config**.
74
53
75
-
**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.
For reliable payment confirmation (especially for the redirect flow), set up a webhook in your Paystack dashboard:
80
57
81
-
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.
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
82
61
83
-
**Fix:**
62
+
## Development Environment
84
63
85
-
Run:
86
-
```bash
87
-
composer require yabacon/paystack-php
88
-
```
89
-
Enable and configure Paystack in Magento Admin under Stores/Configuration/Sales/Payment Methods
64
+
A Docker-based development environment is included in the `dev/` directory for contributors and testing.
90
65
91
-
**Fail to redirect to success page after payment**
92
-
93
-
Ensure you are using Paystack v2 Inline.js and your CSP/RequireJS configs are correct.
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
+
```
102
79
103
-
## Running the magento2 on docker
80
+
Once complete you'll see:
104
81
105
-
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.
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
+
```
106
97
107
-
### Prerequisites
108
-
- Install [Docker](https://www.docker.com/)
98
+
### What's Included
109
99
110
-
### Quick Steps
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)
- Create a `.env` file from `.env.sample` in the root directory. Fill in your values.
113
-
- Run `docker-compose up` from the root directory to build and start the containers.
114
-
- Visit `localhost:8000` for the Magento store. For admin, visit `localhost:8000/<MAGENTO_BACKEND_FRONTNAME>` (set in `.env`).
115
-
- Run `docker-compose down` to stop the containers.
106
+
### Tear Down
116
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
+
```
117
113
118
114
## Documentation
119
115
@@ -122,7 +118,7 @@ Contained within this repo is a Dockerfile and a docker-compose file to quickly
122
118
123
119
## Support
124
120
125
-
For bug reports and feature requests directly related to this plugin, please use the [issue tracker](https://github.com/PaystackHQ/plugin-magento-2/issues).
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).
126
122
127
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).
128
124
@@ -134,3 +130,9 @@ If you are a developer, please join our Developer Community on [Slack](https://s
134
130
135
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.
0 commit comments