msp3YooKassa
msp3YooKassa connects YooKassa to MiniShop3 on MODX 3: REST API, redirect checkout, incoming webhooks, and optional 54-FZ receipt data in the same createPayment call.
The extra targets MiniShop3 (payment classes, msp3yookassa settings namespace, HTTP notification URL …/assets/components/msp3yookassa/webhook.php).
Start here: Quick start.
Features
- One-stage payment — funds are captured immediately (
capture: true). - Two-stage payment — funds are held until you capture or cancel in the YooKassa dashboard / via API.
- Webhook — syncs order status in MODX from YooKassa notifications (
order_hashcheck, idempotent handling). - 54-FZ receipts — receipt payload in the create-payment request when enabled and customer email is available.
- Capture processor — confirm a two-stage payment from code or the manager (see Integration).
Requirements
| Requirement | Version |
|---|---|
| MODX Revolution | 3.0+ |
| PHP | 8.2+ |
| MiniShop3 | current MODX 3 branch |
| pdoTools | 3.x |
Dependencies
- MiniShop3 — orders, payment methods, statuses (
ms3_status_paid,ms3_status_canceled, etc.).
YooKassa signup and API keys
You need a store in the YooKassa merchant profile. Use:
- Shop ID —
msp3yookassa_shop_id. - Secret key —
msp3yookassa_secret_key. Older merchant-API writeups may say “shop password”. YooKassa’s current API uses Shop ID + Secret key (see interaction format).
Requests are made from your server. The extra ships with the official PHP SDK (yoomoney/yookassa-sdk-php), see YooKassa SDKs.
YooKassa describes the same sequence in their quick start. msp3YooKassa matches it. Details: Integration.
Installation
- Install via Package Management.
- Ensure MiniShop3 is installed.
- Under System Settings → namespace
msp3yookassa, set credentials (msp3yookassa_shop_id,msp3yookassa_secret_key). - Clear the site cache.
The install resolver creates two MiniShop3 payment methods (if missing):
| Name | Class | Behaviour |
|---|---|---|
| YooKassa payment | Msp3YooKassa\Payment\YooKassaPayment | one-stage |
| YooKassa payment (two-stage) | Msp3YooKassa\Payment\YooKassaTwoStagePayment | hold, then capture |
Enable the methods under MiniShop3 → Settings → Payments and wire them into your checkout flow.
Webhook quick setup
In the YooKassa dashboard: Settings → HTTP notifications, set the URL to:
https://your-domain.com/assets/components/msp3yookassa/webhook.phpIf the URL is wrong or the server blocks POST, the order in MODX may stay unpaid even after YooKassa shows a successful payment. See Integration.
Documentation sections
- Quick start — install, keys, webhook, payment method, test, receipts.
- System settings —
msp3yookassa_shop_id,msp3yookassa_secret_key, receipts, return URLs,msp3yookassa_debug. - Integration — payment flow, two-stage behaviour, Capture processor, receipt hook, notes.
Building the transport (developers)
From the extra root:
php _build/build.phpDownload the package: open _build/build.php?download=1 in a browser (with the site available in the build environment).
In _build/config.inc.php, the encrypt flag: when true, plugin packaging may use encryption via the modstore.pro API (common for paid extras on ModStore). Keep it false for local builds without modstore.
License: GPL version 2 or later.
