Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Psp

Laravel Psp Laravel Package

jeroennoten/laravel-psp

A Laravel package that provides a unified payment service provider layer, letting you integrate and switch between payment gateways through a consistent API for creating, handling, and tracking payments in your application.

View on GitHub
Deep Wiki
Context7

jeroennoten/laravel-psp provides a clean Laravel abstraction for integrating Payment Service Providers (PSPs). It offers a consistent API for creating payments, checking statuses, and handling refunds while keeping provider-specific logic behind configurable drivers.

  • Driver-based PSP integration
  • Unified payment and refund API
  • Laravel configuration and service provider support
  • Extensible contracts for custom providers
  • Simple status handling for payment flows
Frequently asked questions about Laravel Psp
What is jeroennoten/laravel-psp and what problem does it solve?
Laravel PSP is a Laravel Package Service Provider that autoloads the dependencies of packages you are developing locally. Instead of manually wiring path repositories or editing Composer autoload rules every time you add a work-in-progress package, you install the package and let its service provider handle the discovery and loading. It keeps PSP-specific logic out of your application code and out of your own service providers.
How do I install jeroennoten/laravel-psp?
Install it with Composer using composer require jeroennoten/laravel-psp. On a standard Laravel 9, 10, or 11 application, package auto-discovery registers the service provider automatically, so no manual edits to config/app.php are required. If you publish a config file, run the vendor:publish command for the package tag documented in the README.
Which Laravel and PHP versions does laravel-psp support?
The package targets a modern Laravel stack, typically PHP 8.1 or newer with Laravel 9, 10, or 11 and Composer 2. Always check the composer.json constraints in the repository before committing, since version support can change between major releases. Pin to ^2.0.2 or later so you get the zero-package fix.
Do I need to register the Laravel PSP service provider manually?
No, Laravel package auto-discovery should register it for you once the package is installed via Composer. Manually adding it to the providers array as well would duplicate the registration, so verify auto-discovery is enabled first. Only add it manually if you have explicitly disabled discovery in your application's composer.json.
How does laravel-psp handle the case where there are zero packages?
Version 2.0.2 added support for having zero packages, which fixes an edge case where the package previously assumed a non-empty package set. This matters for fresh Laravel skeletons, minimal CI containers, and apps that intentionally ship without third-party packages. Treat the observed zero-package output as your internal contract when building dashboards or reports on top of it.
Should I use laravel-psp in production or only during development?
The package is designed for development, where autoloading dependencies of local packages is genuinely useful. In production your dependencies should already be resolved by Composer's optimized autoloader, so the extra indirection is unnecessary. Keep it in require-dev unless your deployment pipeline specifically relies on its behavior.
How do I configure which packages or dependencies laravel-psp autoloads?
Configuration is typically handled through a publishable config file, where you point the package at the local packages or paths it should register. Publish the config with vendor:publish, then review the defaults before changing anything, since the schema may already match your layout. Re-publish only when the schema changes between versions, because the 2.0.2 release note does not indicate a config change.
How do I test that laravel-psp works with an empty package set?
Install ^2.0.2 into a scratch Laravel app with no additional packages and run the primary artisan command or API path end to end. Then repeat in an application with a realistic package set to confirm there is no regression in the normal path. Run this in a minimal CI container as well, since cold-start behavior is where the empty-state bug used to surface.
What are the alternatives to laravel-psp for local package development?
The common alternatives are Composer path repositories, symlinked vendor directories, or manual service provider registration in your application. Those approaches work but require ongoing maintenance whenever you add or remove a local package. Laravel PSP packages that workflow into a single installable dependency with a consistent service provider.
Is jeroennoten/laravel-psp actively maintained and safe to adopt?
The 2.0.2 release is a small patch-level change, which suggests maintenance is focused on edge-case correctness rather than new features. Technical risk is low because the change is additive and does not alter the architecture, but confirm whether tests explicitly cover the zero-package case. Adopt ^2.0.2, avoid pinning to 2.0.0 or 2.0.1, and validate the empty-state path before promoting to shared staging.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource