contenir/commerce

Commerce domain for Contenir CMS — orders, artworks, GST-inclusive money and Stripe checkout for small-volume gallery sales.

Maintainers

Package info

github.com/contenir/commerce

pkg:composer/contenir/commerce

Transparency log

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.1 2026-08-20 12:25 UTC

This package is auto-updated.

Last update: 2026-08-20 12:25:40 UTC


README

Commerce domain for Contenir CMS — orders, artworks, GST-inclusive money and Stripe checkout for small-volume gallery sales with in-person pickup.

Install

composer require contenir/commerce

Usage

Prices are GST-inclusive AUD held as integer cents:

use Contenir\Commerce\Money\Money;

$price = Money::fromCents(185000);
$price->gstComponent();   // Money of 16818 cents
$price->format();         // "$1,850.00"

The order lifecycle is enforced by OrderStatus:

use Contenir\Commerce\Order\OrderStatus;

$status = OrderStatus::Pending;
$status = $status->transitionTo(OrderStatus::Paid);
$status->canTransitionTo(OrderStatus::Collected); // false — must await pickup first

Payments go through PaymentGatewayInterface, implemented by StripeGateway (Stripe hosted Checkout). Configure with:

'stripe' => [
    'secret_key' => '...',
],

Entities and repositories (artworks, orders, order items, artist enquiries, email log) build on contenir/contenir-db-model and are registered by the shipped ConfigProvider for Laminas applications.