Download the PHP package launchsol/launchsol-oms without Composer
On this page you can find all versions of the php package launchsol/launchsol-oms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download launchsol/launchsol-oms
More information about launchsol/launchsol-oms
Files in launchsol/launchsol-oms
Package launchsol-oms
Short Description Pairs a Magento store with LaunchOMS, pushes newly placed orders to LaunchOMS, and exposes a small token-authenticated API LaunchOMS uses to discover store views and push inventory back.
License MIT
Informations about the package launchsol-oms
Launchsol_LaunchOMS
A Magento 2 module that pairs a Magento store with a LaunchOMS account and keeps them in sync in both directions:
- Inbound: pushes every newly placed order to LaunchOMS's webhook
endpoint (
POST /api/webhooks/magento/<channelId>/orders-create). - Outbound: exposes a small token-authenticated API
(
GET/POST /rest/V1/launchoms/*) that LaunchOMS calls to discover store views and push inventory quantities back -- seesrc/lib/channels/magento.real.tson the LaunchOMS side.
The only manual step is pasting a one-time connection token from LaunchOMS into this module's config and saving -- from there, store discovery, per-store webhook URL/secret, and inventory sync are all provisioned automatically. No Magento Integration/admin token is ever needed.
What it does
- Observes
checkout_submit_all_after-- fires exactly once per successfully placed order (not on every order save, unlikesales_order_save_after). - Builds a JSON payload shaped like Magento's own REST Sales Order API
(
entity_id,increment_id,grand_total,items[],extension_attributes.shipping_assignments[0].shipping.address) -- seeObserver/PushOrderObserver.php::buildPayload(). - POSTs it to this store's configured Webhook URL with a shared secret in
the
X-Magento-Webhook-Secretheader. Never blocks or fails checkout: every failure (network error, timeout, non-2xx response, malformed order) is caught and logged tovar/log/launchsol_launchoms.log, never rethrown. The LaunchOMS webhook is idempotent perincrement_id, so replaying a failed push is always safe. - Exposes
GET /V1/launchoms/stores,POST /V1/launchoms/channel-map, andPOST /V1/launchoms/inventory(seeApi/LaunchOMSInterface.php/Model/LaunchOMSApi.php), each authenticated by comparing the sharedconnectionSecretfrom pairing against anX-LaunchOMS-Secretheader (Model/ConnectionSecretValidator.php) rather than Magento's own admin/OAuth auth, since the caller is LaunchOMS, not a Magento user.
Install
Via Composer (once published on Packagist -- see "Publishing" below):
Or manually, from your Magento root:
Publishing (for maintainers)
The package name in composer.json (launchsol/launchsol-oms) matches
this GitHub repo (launchsol/launchsol-oms), which is public, so
composer require launchsol/launchsol-oms works from any Magento
project with no extra repositories config, once the package is
registered on Packagist (one-time,
requires a Packagist account linked to this GitHub org -- Packagist then
auto-updates on every push via its GitHub webhook). Until then, a
consumer needs a vcs repository entry pointing at this repo's URL
instead.
Cut a release by tagging a commit (git tag v1.1.0 && git push --tags) --
Packagist and Composer resolve installable versions from tags, not
branches.
Connect
- In LaunchOMS: Marketplace > Magento > Connect a Magento store. This shows your LaunchOMS URL and a one-time connection token (valid 15 minutes).
- In the Magento admin: Stores > Configuration > Service > LaunchOMS
Order Push.
- LaunchOMS URL: paste the URL shown in LaunchOMS.
- Connection Token: paste the token shown in LaunchOMS.
- Click Save Config. On success you'll see a "Connected to LaunchOMS"
message, and the token field clears itself (it's single-use). Behind
the scenes, this store's full list of store views was sent to LaunchOMS
and a long-lived secret was stored here for the two API directions
above -- see
Observer/ConnectObserver.php. - Back in LaunchOMS: the connected instance now appears under Marketplace > Magento with its store views listed. Check the ones you want to sync, give each a channel name, and Save. LaunchOMS creates one Channel per enabled store and pushes each one's webhook URL/secret back into this module automatically -- Enabled, Webhook URL, and Webhook Secret in Magento's config will already be filled in per store, nothing left to copy by hand.
- Place a test order in an enabled store and check
/channel-healthon the LaunchOMS side, or tailvar/log/launchsol_launchoms.loghere, to confirm the push succeeded.
If a store view is added in Magento later, use "Refresh stores" next to the connection in LaunchOMS's Marketplace to pick it up without re-pairing.
Legacy manual setup
The old fully-manual path (LaunchOMS's scripts/configure-magento.ts +
hand-pasted Webhook URL/Secret/access token) still works for existing
installs and isn't required to change -- it's just no longer how a new
connection gets set up.
Keeping the payload shape in sync
If src/lib/validation/magento.schema.ts on the LaunchOMS side ever
changes, update PushOrderObserver::buildPayload() to match -- there's a
comment at each end pointing at the other. Likewise, LaunchOMS's webapi
framework converts Data Interface fields to snake_case on the wire
(getWebsiteCode() -> website_code); the LaunchOMS-side callers already
account for this (see comments in src/lib/channels/magentoConnect.ts and
the connections/[id] API routes) -- keep both ends in sync if a field is
renamed on either side.
All versions of launchsol-oms with dependencies
magento/framework Version *
magento/module-sales Version *
magento/module-checkout Version *
magento/module-config Version *
magento/module-store Version *
magento/module-webapi Version *
magento/module-inventory-api Version *