- What is bramdevries/omnipay-paymill and what does it do?
- It is a Paymill gateway driver for the Omnipay payment library, which gives PHP applications a single, consistent API for many payment providers. Instead of talking to the Paymill HTTP API directly, you instantiate the gateway through Omnipay and call methods such as purchase, authorize, capture and refund. In a Laravel app it is typically paired with an Omnipay-to-Laravel bridge package so the gateway can be resolved from the container or a facade.
- How do I install bramdevries/omnipay-paymill with Composer?
- Install it with Composer alongside the core Omnipay package, for example composer require bramdevries/omnipay-paymill omnipay/common. Omnipay 3 split each gateway into its own package, so the driver will not work without omnipay/common being present. If you plan to use the Laravel facade or dependency injection bridge, add that package too and then run composer dump-autoload if you are not using classmap authorative autoloading.
- How do I use the Paymill driver inside a Laravel application?
- Resolve the gateway either directly with Omnipay\Omnipay::create('Paymill') or through your Laravel Omnipay bridge, depending on which integration package you installed. Pass your Paymill keys into the gateway configuration, then build a request with purchase() or authorize() and send it. Keep the gateway creation inside a service class or a dedicated payment service so controllers stay thin and the driver is easy to mock in tests.
- How do I configure the Paymill gateway with my API keys?
- Configuration is normally passed as an array to the gateway constructor or set with setPublicKey() and setPrivateKey(), using the keys from your Paymill dashboard. The public key is used for client-side tokenisation and the private key for server-side API calls, so never expose the private key in Blade templates or JavaScript. Store both in your .env file and read them through config/services.php or a dedicated payment config file rather than hard-coding them.
- Which operations does the Paymill driver support, such as purchase, authorize, capture and refund?
- The driver follows the standard Omnipay request set, so you can expect the usual purchase and authorize flows plus capture and refund where Paymill supports them. Because the driver must map Omnipay's generic request and response objects onto Paymill's transaction and preauthorization endpoints, always check the gateway's source for the exact request classes it ships before designing your checkout flow. Test each operation you rely on, including refunds and partial captures, against Paymill's test keys.
- Does this package support Laravel 10, 11 or 12, and which PHP versions work?
- The package is a framework-agnostic Omnipay driver, so Laravel compatibility mostly depends on whether your PHP version and Omnipay version meet its composer.json constraints. It does not register service providers or publish config, which means there is no Laravel-version lock-in, but older releases may still declare PHP 7 constraints. Run composer require and check the resolved constraints, or inspect the require block in composer.json, before assuming it is compatible with a current Laravel and PHP 8.x stack.
- How can I test Paymill payments in Laravel without hitting the live API?
- Use Paymill test API keys in your testing and staging environments so transactions are processed against the sandbox rather than real money. In PHPUnit, mock or swap the Omnipay gateway so your feature tests assert the request object and the response handling instead of making network calls. Also cover failure paths such as declined cards and invalid tokens, because those branches are where most integration bugs surface. Avoid committing real keys to your repository and never run live transactions from a test suite.
- How should I handle and store Paymill transaction responses safely?
- Call send() on the request, then check $response->isSuccessful() before treating a payment as complete, and use $response->getMessage() for the human-readable failure reason. Persist the transaction or preauthorization reference returned by Paymill against your order so you can capture, refund or reconcile it later. Treat card data as out of scope, since tokenisation should happen client-side with the public key and only the token should reach your server. Log the reference and status rather than full response payloads to avoid leaking sensitive data.
- What are the alternatives to bramdevries/omnipay-paymill for Laravel?
- You can either integrate Paymill through the official Paymill PHP SDK, or stick with Omnipay and select a different bridge such as the league/omnipay package family for other providers. If you want a Laravel-native abstraction across multiple gateways, packages like laravel/cashier are popular but target Stripe and similar providers rather than Paymill. The Omnipay approach is worth choosing when you want one request API across several payment providers and the ability to swap gateways later.
- Is bramdevries/omnipay-paymill actively maintained and safe for production use?
- This is a small, single-gateway driver, so maintenance activity tends to follow Paymill's own API and Omnipay's major releases rather than a frequent feature roadmap. Before adopting it, check the package on Packagist for the latest release date and its compatibility with Omnipay 3, and review the repository for open issues. If it lags behind, you can fork it and update the request classes yourself, which is usually a small amount of work for a driver of this size. Pin the version in composer.json and cover the flows you depend on with your own integration tests.