aiarmada / checkout
Unified checkout flow orchestrating cart, orders, payments, and fulfillment for the AIArmada Commerce ecosystem
v1.0.0
2026-03-20 14:42 UTC
Requires
- php: ^8.4
- aiarmada/cart: v1.0.0
- aiarmada/commerce-support: v1.0.0
- aiarmada/customers: v1.0.0
- aiarmada/docs: v1.0.0
- aiarmada/orders: v1.0.0
- aiarmada/pricing: v1.0.0
- aiarmada/products: v1.0.0
- aiarmada/shipping: v1.0.0
- illuminate/contracts: ^12.0|^13.0
- illuminate/support: ^12.0|^13.0
- spatie/laravel-data: ^4.0
- spatie/laravel-package-tools: ^1.92
Suggests
- aiarmada/cashier: For unified multi-gateway payment processing (recommended)
- aiarmada/cashier-chip: For Cashier-style CHIP payment integration
- aiarmada/chip: For direct CHIP payment gateway integration
- aiarmada/inventory: For stock validation and reservation during checkout
- aiarmada/jnt: For J&T Express shipping integration (integrates via shipping adapter)
- aiarmada/promotions: For automatic promotion application during checkout
- aiarmada/tax: For tax calculation during checkout
- aiarmada/vouchers: For voucher/coupon redemption during checkout
README
Unified checkout flow for the AIArmada Commerce ecosystem, integrating cart management, order creation, payment processing, and fulfillment.
Installation
composer require aiarmada/checkout
Quick Start
use AIArmada\Checkout\Facades\Checkout; // Start checkout from a cart $session = Checkout::startCheckout($cartId); // Process the entire flow $result = Checkout::processCheckout($session); if ($result->success) { return redirect()->route('orders.show', $result->orderId); } if ($result->requiresRedirect()) { return redirect($result->redirectUrl); } return back()->withErrors($result->errors);
Publishing Views
If you opt to use the built-in views (response_mode => 'view'), you can publish them for customization:
php artisan vendor:publish --tag=checkout-views
Features
- Unified Checkout Flow: Orchestrates cart → order → payment → fulfillment
- Step-Based Architecture: Modular, pluggable steps with dependency resolution
- Flexible Response Modes: Choose between 'redirect' or built-in 'view' response modes for payment callbacks.
- Built-in Views: Optional, customizable Tailwind CSS Blade views for success, failure, and cancellation pages.
- Multiple Payment Gateways: Chip, Cashier-Chip, Cashier processors
- Multi-tenancy Support: Full owner-scoping via
HasOwnertrait - Inventory Integration: Optional stock reservation during checkout
- Tax & Discount Integration: Automatic calculations
- Session Management: Resume interrupted checkouts
- Event-Driven: Comprehensive event dispatching
Requirements
- PHP 8.4+
- Laravel 11.0+
- At least one payment gateway package (
chip,cashier-chip, orcashier)
Documentation
See the docs/ directory for comprehensive documentation:
License
MIT License. See LICENSE for details.