Download the PHP package isapp/laravel-cashier-support without Composer
On this page you can find all versions of the php package isapp/laravel-cashier-support. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download isapp/laravel-cashier-support
More information about isapp/laravel-cashier-support
Files in isapp/laravel-cashier-support
Package laravel-cashier-support
Short Description Provider-agnostic Laravel Cashier contracts — drop-in billing interfaces mirroring laravel/cashier-stripe API for seamless provider switching (Revolut, Adyen, Wise)
License MIT
Homepage https://github.com/isap-ou/laravel-cashier-support
Informations about the package laravel-cashier-support
isapp/laravel-cashier-support
Provider-agnostic contracts for Laravel Cashier. This package gives your
application the same developer experience as laravel/cashier-stripe
($user->charge(), newSubscription()->create(), checkout(), ...) while
letting you swap the payment gateway (Revolut, Adyen, Wise, ...) without
touching application code.
It contains only interfaces, DTOs, enums, exceptions, abstract models,
traits and events — zero business logic, zero HTTP calls. Concrete drivers
(e.g. isapp/laravel-cashier-revolut) implement the contracts and are drop-in
replacements for each other.
Status — pre-release. No version is tagged on Packagist yet. Until the first
v1.0.0is published, require it from the VCS repository (add to your app'scomposer.json):
Contents
- Requirements
- Installation
- How it works
- Making a model billable
- Capabilities
- Provider-defined types
- Invoices
- Events
- Localized enum labels
- Keeping in sync with Stripe Cashier
- Extending
- Quality
- Changelog & releases
- License
Requirements
PHP ^8.2 and Laravel 11, 12 or 13 (Laravel 12+ recommended).
Laravel 11 is EOL. It is supported for compatibility, but is past its security-support window — all
11.xreleases are flagged by Composer's advisory audit, so installing on Laravel 11 requires allowing insecure packages. Prefer Laravel 12 or 13 for production.UUID note: the local models use
HasUuids. On Laravel 12+ that yields UUIDv7 primary keys; on Laravel 11 it falls back to ordered UUIDs (v4), which is Laravel 11'sHasUuidsdefault. Both are valid UUIDs — only the version differs.
Installation
Publish the config if you need to customise it:
config/cashier-support.php exposes the default driver, the default
currency, the concrete models bindings, and invoices (view, paper size,
seller details).
The abstract Subscription, SubscriptionItem and Invoice models are
optional local records. If you want to persist them, publish and run the
provider-agnostic migrations (tables cashier_subscriptions,
cashier_subscription_items, cashier_invoices):
How it works
A concrete provider package registers itself as a driver:
Select the default driver in config/cashier-support.php (or via the
CASHIER_DRIVER env var):
Making a model billable
Money is always integer minor units (cents) plus a Currency enum.
Per-model driver
Override cashierDriver() to bill a model through a non-default gateway:
Capabilities
Providers declare which features they support. Concerns check the capability
before delegating; unsupported operations throw UnsupportedOperationException
— there are no local workarounds.
Provider-defined types
Some shapes are provider-specific and are expressed as contracts, so each driver returns its own implementation:
Contracts\PaymentMethodType— a string-backed enum of the provider's payment method types (card,sepa,revolut_pay, ...).DTO\PaymentMethod::$typetype-hints this contract.Contracts\CheckoutSession— a hosted checkout session (redirect URL, widget token, ...) returned bycheckout(). A driver may also implementIlluminate\Contracts\Support\Responsable, so you canreturn $user->checkout(...)straight from a controller.
Invoices
Invoices are generated locally from stored data — a shared feature, not a provider call:
Rendering uses spatie/laravel-pdf; the PDF engine is your application's choice.
Events
WebhookReceived, WebhookHandled, SubscriptionCreated,
SubscriptionUpdated, SubscriptionCanceled, PaymentSucceeded,
PaymentFailed, RefundProcessed. Dispatch them from your driver via
event(...).
Localized enum labels
User-facing enums (PaymentStatus, SubscriptionStatus, RefundReason) use
isap-ou/laravel-enum-helpers for translatable labels:
Translations live under the cashier-support namespace; publish them with
--tag=cashier-support-lang.
Keeping in sync with Stripe Cashier
The track-cashier skill (.claude/skills/track-cashier) detects API changes
in laravel/cashier-stripe since a pinned baseline and maps them onto this
package's contracts, so parity can be maintained on a cadence.
Extending
Custom or overridden driver. Drivers are plain Cashier::extend()
registrations. Your application's service providers boot after the package
ones, so re-registering a name replaces the driver — subclass a concrete
gateway (or implement GatewayProvider from scratch) and register it:
Macros. CashierManager is macroable, so you can attach helpers to the
Cashier facade without subclassing. Non-macro calls still forward to the
default driver:
Methods a custom gateway exposes beyond the GatewayProvider contract are not
visible through the Billable trait — call them via Cashier::provider() (or
Cashier::driver('name')) and narrow the type.
Quality
deptrac enforces the layering (DTO/Contracts/Enums stay free of Models,
Concerns and the Manager) and the "zero HTTP" rule — see deptrac.yaml.
Changelog & releases
See CHANGELOG.md for what changed between versions, and RELEASING.md for the release process. This package follows Semantic Versioning.
License
Released under the MIT License. See LICENSE.
All versions of laravel-cashier-support with dependencies
ext-intl Version *
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/queue Version ^11.0|^12.0|^13.0
illuminate/routing Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
isap-ou/laravel-enum-helpers Version ^1.5
moneyphp/money Version ^4.9
nesbot/carbon Version ^3.0
psr/log Version ^3.0
spatie/laravel-data Version ^4.23
symfony/console Version ^7.0|^8.0
symfony/http-foundation Version ^7.0|^8.0
symfony/http-kernel Version ^7.0|^8.0