Download the PHP package koh/sylius-mpp without Composer
On this page you can find all versions of the php package koh/sylius-mpp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package sylius-mpp
koh/sylius-mpp
MPP payment discovery for Sylius: an OpenAPI 3.1 document at /openapi.json
that lists the shop's agent endpoints and marks the ones with an MPP offer with
x-payment-info, per
draft-payment-discovery-01.
- One document for agents — every endpoint the other
kohbundles register (ACP feed, MCP, llms.txt, …) appears as a path, without listing them by hand. - Prices from the same source as enforcement — payable operations come from
PayableOperationProviderInterface, whichkoh/sylius-x402also reads to charge. A route cannot advertise a price it does not charge. - MPP offers only — an
x402price is a different protocol, not an MPP payment method, and is left out;koh/sylius-x402announces it in its own- With no MPP offer at all the document carries no
x-payment-infoand nox-service-info.
- With no MPP offer at all the document carries no
- Conflicts fail loudly — two providers pricing the same operation with the
same intent, method and currency differently raise an error instead of
publishing whichever was wired last; a malformed offer is refused too.
Different methods, intents or currencies are alternatives and are published
side by side in
offers. - Independent of API Platform — API Platform keeps its own document at
/docs.jsonopenapi; this one answers at/openapi.json, where MPP discovery looks.
Requires PHP 8.3 or later and Sylius 2.2 or 2.3.
Install
Register the bundle and the shared contracts bundle it builds on:
Import the route:
Clear the cache and check the document:
If public/openapi.json exists, delete it: the web server answers from disk
before Symfony is asked.
Configure
One optional setting, the service categories announced in x-service-info
(published only next to at least one MPP offer):
Declaring a payable operation
Implement the contract and tag the service koh_agent.payable_operation.
payMethod is an MPP payment method identifier (lowercase letters, such as
tempo or stripe); the x402 rail of koh/sylius-x402 is not one and does
not appear here:
Output
GET /openapi.json with the ACP feed installed and an MPP offer on it:
Every payable operation also gets a 402 response, so a client can plan for
payment instead of treating it as an error. The document is registered in
/.well-known/api-catalog as the origin's service description.
Decommission
Remove the composer require, the config/bundles.php entry, the route import
and config/packages/koh_mpp.yaml. No database table, no cache pool.
Security
Report vulnerabilities privately — see SECURITY.md. Advisories are published as CSAF 2.0 at https://ole-hartwig.eu/.well-known/csaf/.
The family threat model, covering this package, is at https://github.com/ohartwig/sylius-agent-ready/blob/main/docs/threat-model.md.
Licence
MIT — see LICENSE.
All versions of sylius-mpp with dependencies
php Version ^8.3
sylius/sylius Version ^2.2.9 || ^2.3.0
symfony/config Version ^7.4 || ^8.0
symfony/dependency-injection Version ^7.4 || ^8.0
symfony/http-foundation Version ^7.4 || ^8.0
symfony/http-kernel Version ^7.4 || ^8.0
symfony/routing Version ^7.4 || ^8.0