# M-PESA Express Gateway
> A highly reliable M-PESA Express (STK Push) payment gateway for WooCommerce.
> Seamlessly accept payments from Kenyan customers via Safaricom.
---
**Contributors:** Tiberius Mairura
**Tags:** mpesa, woocommerce, payments, stk push, kenya, safaricom
**Requires at least:** WordPress 5.8
**Tested up to:** WordPress 6.5
**Requires PHP:** 7.4+
**Stable tag:** 1.0.0
**License:** GPLv2 or later
**License URI:**
gnu.org
---
## 💡 Description
**M-PESA Express Gateway** enables your WooCommerce store to accept Lipa na M-PESA Online (STK Push) payments directly on your site.
> This plugin provides a clean, secure, **query-based integration** — **no callback URLs required**.
### ✅ Why Use This Plugin?
- Works with **Paybill** or **Buy Goods (Till)** numbers
- Real-time polling via Safaricom’s `stkpushquery` endpoint
- Zero need to expose callback URLs publicly
- Logs every transaction attempt and response
- Translation-ready (`.pot` included)
- Smooth checkout with responsive UI
---
## 🚀 Features
- 🔐 STK Push Integration (Daraja API)
- 🔁 Polling-based payment confirmation (via `stkpushquery`)
- 🛠 Admin settings for credentials
- 🧾 WooCommerce-ready integration
- 🧪 Tested with PHP 7.4+ and WP 6.5+
- 🗂 Logs stored in `/logs/mpesa-log.txt`
- 🌍 i18n support via `/languages/mpesa-express-gateway.pot`
---
## 🧩 Installation
1. Upload the plugin to:
```
/wp-content/plugins/mpesa-express-gateway/
```
2. Activate via **Plugins** menu in WordPress.
3. Go to:
`WooCommerce → Settings → Payments → M-PESA Express`
4. Enter your M-PESA credentials:
- Consumer Key
- Consumer Secret
- Shortcode (Paybill or Till)
- Passkey
5. Save and test — you're done.
---
## ❓ FAQ
### Does this work with both Paybill and Buy Goods (Till) numbers?
> Yes. Just enter the correct shortcode in settings.
### Do I need callback URLs?
> No. This plugin uses polling via `stkpushquery`, so **callbacks are not required**.
### Is it co …