contenir / commerce
Commerce domain for Contenir CMS — orders, artworks, GST-inclusive money and Stripe checkout for small-volume gallery sales.
v0.2.1
2026-08-20 12:25 UTC
Requires
- php: ^8.1 || ^8.2 || ^8.3
- contenir/contenir-db-model: ^1.0
- psr/clock: ^1.0
- psr/container: ^1.1 || ^2.0
- stripe/stripe-php: ^17.0
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.0
- squizlabs/php_codesniffer: ^3.10
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.