PHPackages                             aiarmada/commerce-support - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. aiarmada/commerce-support

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aiarmada/commerce-support
=========================

Core helper methods and foundation code for all AIArmada Commerce packages.

v0.1.34(2mo ago)03.4k20MITPHPPHP ^8.4

Since May 21Pushed 2w agoCompare

[ Source](https://github.com/AIArmada/commerce-support)[ Packagist](https://packagist.org/packages/aiarmada/commerce-support)[ Docs](https://github.com/aiarmada/commerce)[ RSS](/packages/aiarmada-commerce-support/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (209)Versions (69)Used By (20)

AIArmada Commerce Support
=========================

[](#aiarmada-commerce-support)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6a704897c34a70df17df3fbe1e167acc5fc34c4cf5aaab1c4552beb27ff1ade4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616961726d6164612f636f6d6d657263652d737570706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aiarmada/commerce-support)[![Total Downloads](https://camo.githubusercontent.com/fd2ce5c27f5d0ab9949c27003c3fe21858e3e67f314246b7a2d9a27460daf39c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616961726d6164612f636f6d6d657263652d737570706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aiarmada/commerce-support)

Core utilities, contracts, exceptions, and foundation code for all AIArmada Commerce packages.

Purpose
-------

[](#purpose)

This package provides shared utilities, traits, and standardized patterns used across all AIArmada Commerce packages. It eliminates code duplication and ensures consistency across the ecosystem.

Requirements
------------

[](#requirements)

RequirementVersionPHP8.4+Laravel13.0+akaunting/laravel-money6.0+spatie/laravel-package-tools1.92+Installation
------------

[](#installation)

This package is automatically required by all AIArmada Commerce packages. You don't need to install it directly unless building custom extensions:

```
composer require aiarmada/commerce-support
```

Features
--------

[](#features)

- **Exception Hierarchy** - Standardized exceptions for consistent error handling
- **Payment Contracts** - Universal interfaces for payment gateway integrations
- **Configuration Traits** - Runtime configuration validation helpers
- **Helper Functions** - JSONB column type resolver for PostgreSQL support
- **Setup Command** - Interactive wizard for configuring Commerce packages

Documentation
-------------

[](#documentation)

See the [docs](docs/) folder for detailed documentation:

- [Overview](docs/01-overview.md) - Package capabilities and architecture
- [Configuration](docs/03-configuration.md) - Config keys and defaults
- [Usage](docs/04-usage.md) - Choose the right support primitive or foundation guide by task
- [Multi-tenancy](docs/04-multi-tenancy.md) - Owner scoping model and safety rules
- [Traits &amp; Utilities](docs/10-traits-utilities.md) - Shared traits and helper utilities
- [Isolation Primitives](docs/11-isolation-primitives.md) - Owner-scoped cache/filesystem/job helpers
- [Troubleshooting](docs/99-troubleshooting.md) - Common owner-scoping, webhook, and helper issues

Quick Start
-----------

[](#quick-start)

### Exception Handling

[](#exception-handling)

```
use AIArmada\CommerceSupport\Exceptions\CommerceException;

throw new CommerceException(
    message: 'Operation failed',
    errorCode: 'operation_failed',
    errorData: ['context' => 'value']
);
```

### Payment Gateway

[](#payment-gateway)

```
use AIArmada\CommerceSupport\Contracts\Payment\PaymentGatewayInterface;

class MyGateway implements PaymentGatewayInterface
{
    public function createPayment(
        CheckoutableInterface $checkoutable,
        ?CustomerInterface $customer = null,
        array $options = []
    ): PaymentIntentInterface;
}
```

### Configuration Validation

[](#configuration-validation)

```
use AIArmada\CommerceSupport\Traits\ValidatesConfiguration;

class MyServiceProvider extends PackageServiceProvider
{
    use ValidatesConfiguration;

    public function boot(): void
    {
        $this->validateConfiguration('mypackage', ['api_key']);
    }
}
```

Package Structure
-----------------

[](#package-structure)

```
commerce-support/
├── composer.json
├── LICENSE
├── README.md
├── docs/
│   ├── 01-overview.md
│   ├── 03-configuration.md
│   ├── 04-multi-tenancy.md
│   ├── 10-traits-utilities.md
│   └── 11-isolation-primitives.md
└── src/
    ├── SupportServiceProvider.php
    ├── helpers.php
    ├── Commands/
    ├── Contracts/
    ├── Exceptions/
    ├── Middleware/
    ├── Support/
    ├── Targeting/
    ├── Testing/
    ├── Traits/
    └── Webhooks/

```

License
-------

[](#license)

The MIT License (MIT). See [LICENSE](LICENSE) for details.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance91

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

68

Last Release

79d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1634949?v=4)[Saiffil Fariz](/maintainers/sairiz)[@sairiz](https://github.com/sairiz)

### Embed Badge

![Health badge](/badges/aiarmada-commerce-support/health.svg)

```
[![Health](https://phpackages.com/badges/aiarmada-commerce-support/health.svg)](https://phpackages.com/packages/aiarmada-commerce-support)
```

###  Alternatives

[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)[spatie/laravel-health

Monitor the health of a Laravel application

88212.7M189](/packages/spatie-laravel-health)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5226.7k](/packages/simplestats-io-laravel-client)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[nativephp/mobile

NativePHP for Mobile

1.1k102.1k152](/packages/nativephp-mobile)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
