omnitrade / shopify
Omnitrade Shopify: a sale paid on the shop's invoice page (draft orders), the shop's orders and its webhooks, over the Admin GraphQL API.
Requires
- php: >=8.2
- glitchr/omnitrade: ^1.0@dev
- psr/log: ^1.1|^2.0|^3.0
- 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-02 01:58:27 UTC
README
Shopify for glitchr/omnitrade: a sale paid on the shop's invoice page (a draft order with your prices), the shop's orders, and its webhooks - over the Admin GraphQL API, its cost bucket respected.
omnitrade: gateways: shopify: factory: shopify options: shop_domain: '%env(SHOPIFY_SHOP_DOMAIN)%' # example.myshopify.com admin_token: '%env(SHOPIFY_ADMIN_TOKEN)%' # shpat_..., a custom app's Admin API token webhook_secret: '%env(SHOPIFY_WEBHOOK_SECRET)%' # the app's API secret, for notify() draft_order_tags: [omnitrade]
purchase() creates a draft order and answers PENDING with its invoice URL; Shopify never
redirects back, so fetch() (the draft completed into a paid order, or deleted) and notify()
(orders/paid, orders/cancelled, refunds/create, HMAC and shop checked) finish the sale.
fetchOrder() reads any order of the shop. A line whose reference is a variant gid names
the variant, so Shopify counts its stock; any other line is a custom one at the price given.
No authorizations, captures nor refunds from here: Shopify's admin does those on its orders.
Credentials: a custom app in the shop's admin (Settings → Apps → Develop apps) with the
write_draft_orders, read_orders scopes, its Admin API access token, and the app's API
secret for the webhooks (orders/paid, orders/cancelled, refunds/create to your endpoint).
License: LGPL-3.0-or-later.