Package: commerce
Generated from api/packages/commerce
Source: api/packages/commerce. The sections after the README are extracted from the code on every docs build.
README
Section titled “README”One interface between the LMS and whatever sells courses (ADR 0049). The LMS owns entitlements: a provider mirrors a sellable as a product, starts a checkout and reports verified order events; it never decides who has access.
What it does
Section titled “What it does”Ulams\Commerce\Contracts\CommerceProvider:key(),syncProduct(SellableRef, Price, active),createCheckout(User, ProductRef, returnUrl),handleOrderEvent(Request).WellmsCartProvider(default): creates or updates a single-productable cartProductthroughProductServiceContract, keeps the mapping incommerce_product_links, sends buyers to the cart, and returns no order events (the cart and payments packages grant access themselves).CommerceManagerresolves the provider named bycommerce.provider(COMMERCE_PROVIDER); another adapter registers withCommerceManager::extend($key, fn).
The Course Builder uses it to create an inactive product when a paid course is applied and to activate it when the course is published.
Installing
Section titled “Installing”- Registered in
config/app.php;php artisan migratecreatescommerce_product_links. - Settings:
COMMERCE_PROVIDER(defaultwellms),COMMERCE_FRONT_URL(defaultFRONTEND_URL). - The cart sells in the currency set by
PAYMENTS_DEFAULT_CURRENCY; a price in another currency is refused.
Endpoints
Section titled “Endpoints”None. The package is a library for other packages.
API endpoints
Section titled “API endpoints”None.
Permissions
Section titled “Permissions”None.
Settings
Section titled “Settings”Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).
None.
Events
Section titled “Events”None.
Artisan commands
Section titled “Artisan commands”None.
Scheduled jobs
Section titled “Scheduled jobs”None.
Environment variables read
Section titled “Environment variables read”COMMERCE_FRONT_URL, COMMERCE_PROVIDER