Looking to hire Laravel developers? Try LaraJobs

laravel-checkout maintained by itmosoft

Description
A reusable Laravel checkout orchestration package with address snapshots, cart validation, shipping selection, and checkout state management. Supports Laravel 12 and 13.
Last update
2026/11/04 15:53 (dev-main)
License
Links
Downloads
1

Comments
comments powered by Disqus

ITMOSOFT Laravel Checkout

Checkout orchestration for Laravel 12 and 13 / PHP 8.3+.

Features

  • Persistent checkout sessions linked to an existing cart
  • Cart line snapshots
  • Billing and shipping address snapshots
  • Shipping method and amount selection
  • Discount, tax, shipping, and grand-total composition
  • Required-field validation before completion
  • Transactional completion with row-level locking
  • Configurable table prefix and session model

Install

composer require itmosoft/laravel-checkout
php artisan vendor:publish --tag=itmosoft-checkout-config
php artisan migrate

Requires itmosoft/laravel-cart.

Start checkout

$checkout = app(\\ItmoSoft\\Checkout\\Services\\CheckoutManager::class)
    ->start($cart, auth()->id());

Set addresses and totals

$manager->setAddresses($checkout, $billingAddress, $shippingAddress);
$manager->selectShipping($checkout, 'standard', 5.00);
$manager->setTotals($checkout, discount: 10, tax: 13.50);
$errors = $manager->validate($checkout);
if ($errors === []) $manager->complete($checkout);

Checkout snapshots are not a substitute for final server-side price, promotion, tax, stock, and shipping validation. This package does not create orders, reserve inventory, or process payments. Never trust client-submitted totals.

Testing

composer install
vendor/bin/phpunit

License

MIT.