- What is 3neti/merchant and what problem does it solve in a Laravel app?
- 3neti/merchant is a Laravel package that provides a merchant and payment abstraction layer on top of multiple payment providers. Instead of scattering gateway-specific code through your controllers and models, you talk to one expressive API for charges, refunds, and transaction status. Because drivers share a consistent contract, you can swap or add a provider without rewriting your payment business logic. It follows Laravel conventions such as configuration files, service container bindings, facades, and events.
- How do I install 3neti/merchant?
- Install it with Composer using composer require 3neti/merchant from your Laravel project root. After installation you will typically publish the package configuration so you can register your gateway credentials and default driver, then set the matching values in your .env file. Because the package is configuration driven, no manual service provider wiring should be needed beyond Laravel's package discovery. Check the repository README for the exact publish command and config key names for your version.
- Which payment gateways does 3neti/merchant support?
- The package is built around pluggable gateway drivers that implement a shared contract, so the supported list depends on which drivers ship with the version you install. Rather than hard-coding one provider, it aims to let you select a driver through configuration and keep the same method calls across providers. Verify the currently bundled drivers in the repository README before committing to it, and note that anything not shipped can usually be added as a custom driver.
- How do I configure merchant credentials for different environments?
- Configuration is environment-aware: credentials and the active driver are read from the package config file, which in turn should reference environment variables. That lets you point staging at sandbox credentials and production at live keys without changing code. Keep secrets out of version control and use Laravel's config caching in production. Confirm the exact config keys and driver names in the package's config file after publishing.
- How do I process a charge with the fluent API?
- Charges are made through a fluent, gateway-agnostic interface, so you describe the amount, currency, and customer or payment details in one chain and the selected driver translates that into the provider's API call. Because the response is normalized, your controller can branch on a consistent status rather than provider-specific payloads. Wrap the call in a try/catch or a transaction boundary so failures are handled cleanly. Refer to the README for the precise method names available in your installed version.
- How do I issue a refund or check a transaction status?
- Refunds and status lookups use the same abstraction as charges, so you reference the original transaction through the package's transaction handling and request a full or partial refund. Status queries return a normalized result, which makes it practical to reconcile orders or display payment state in your UI. Storing the package's transaction identifier alongside your own order record is strongly recommended so refunds and lookups remain reliable. Exact method signatures are documented in the repository README.
- Does 3neti/merchant fire events I can listen to during the payment lifecycle?
- Yes, the package is designed to emit Laravel events around the payment lifecycle so you can hook in listeners for logging, notifications, or order state changes. That keeps side effects out of your controllers and lets you queue work such as receipts or webhook follow-ups. Register listeners in your EventServiceProvider or via event discovery as usual. Check the README for the specific event classes and the payload they carry.
- Can I add my own custom merchant or payment gateway driver?
- The architecture is explicitly extensible, so you can implement the package's gateway contract for a provider that is not bundled and register it as a driver in configuration. Your implementation is responsible for translating the fluent charge, refund, and status calls into that provider's HTTP requests and mapping responses back to the normalized result. Keeping the driver thin and pushing business rules into your application services makes it easier to test. The README should describe the contract and registration point for your version.
- Which Laravel and PHP versions does 3neti/merchant support, and how should I test it?
- Laravel and PHP version constraints live in the package's composer.json, so check that file or the README before installing on an older or newer framework release. For testing, point the configuration at sandbox credentials and, where available, use your gateway's test keys so no real money moves. Because drivers sit behind a contract, you can also bind a fake or stub driver in your test suite to assert charge and refund calls without network access. Verify the exact supported matrix, since the repository details are not published in this overview.
- How does 3neti/merchant compare to Laravel Cashier or Omnipay, and is it actively maintained?
- Cashier is tightly coupled to specific billing providers and subscription models, while Omnipay is a framework-agnostic gateway library rather than a Laravel-native abstraction. 3neti/merchant positions itself in between: a Laravel-first merchant layer with config-driven drivers, facades, and events. Maintenance activity is not documented in this overview, so review the repository's commit history, release tags, and open issues before adopting it for a production system, and pin a version in composer.json.