omnitrade / woocommerce
Omnitrade WooCommerce: a sale paid on the shop's checkout (orders created unpaid), the shop's orders and their payment state, refunds, the catalogue (products, variations, stock) and webhooks, over the REST API v3.
Requires
- php: >=8.2
- glitchr/omnitrade: ^1.0@dev
- symfony/http-client-contracts: ^3.0
Requires (Dev)
- phpunit/phpunit: ^11.0
- symfony/http-client: ^6.4|^7.0|^8.0
Suggests
- symfony/http-client: The HTTP client the gateway talks through
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-03 22:52:17 UTC
README
WooCommerce for glitchr/omnitrade: a sale paid on the shop's own checkout (an order created unpaid, with its payment URL), the shop's orders and their payment state, refunds, the payment gateways switched on, the catalogue, and webhooks - the REST API v3.
omnitrade: gateways: woo: factory: woocommerce options: url: '%env(WOOCOMMERCE_URL)%' # https://shop.example consumer_key: '%env(WOOCOMMERCE_KEY)%' # ck_... consumer_secret: '%env(WOOCOMMERCE_SECRET)%' # cs_... webhook_secret: '%env(WOOCOMMERCE_WEBHOOK_SECRET)%' # for notify() currency: EUR # the store's, for the catalogue
purchase() creates a pending order and answers PENDING with its payment URL; the shop's own
gateways take the money there, and fetch() or the order.updated webhook say when they did
(processing/completed is PAID, failed REFUSED, cancelled CANCELLED). refund() refunds through
the shop's gateway; fetchOrder() reads any order; paymentMethods() lists the gateways enabled.
Catalogue
fetchProducts() pages through /products (modified_after, search), a variable product's
variations as its variants; fetchProduct() finds one by id, slug or page URL;
fetchInventory() reads stock_quantity of products and variations; notify() reads
product.created|updated|deleted into a Notification carrying the Product. Brands (9.6+, or
a Brand attribute), categories, tags, the attributes (the variations' ones as options), images,
regular and sale prices are mapped: see docs/catalogue.md.
Credentials: a REST API key with Read/Write (WooCommerce → Settings → Advanced → REST API) over
HTTPS, and a webhook (same screen → Webhooks) for order.updated with a secret of your own.
License: LGPL-3.0-or-later.