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. aiarmada/commerce-support

ActiveLibrary

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

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

v1.4.7(6mo ago)012420MITPHPPHP ^8.4

Since Nov 6Pushed 1mo 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 1mo ago

READMEChangelogDependencies (5)Versions (34)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+Laravel12.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:

- [Exceptions](docs/01-exceptions.md) - Exception hierarchy and usage
- [Payment Contracts](docs/02-payment-contracts.md) - Gateway interfaces
- [Helpers](docs/03-helpers.md) - Helper functions and traits

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-exceptions.md
│   ├── 02-payment-contracts.md
│   └── 03-helpers.md
└── src/
    ├── SupportServiceProvider.php
    ├── helpers.php
    ├── Commands/
    ├── Contracts/
    ├── Exceptions/
    └── Traits/

```

License
-------

[](#license)

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

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance80

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

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 ~4 days

Recently: every ~34 days

Total

33

Last Release

59d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/726da4efcb731bc0ebcdd0b7ce64759e1f8dd63f6f771eab335458f6a2f2d3af?d=identicon)[sairiz](/maintainers/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

[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)

PHPackages © 2026

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