Omnipay is a framework agnostic, multi-gateway payment processing library for PHP that provides a unified API for integrating with different payment processors.
The library solves the problem of payment gateway fragmentation by offering a consistent interface across multiple payment processors. Rather than learning and implementing each gateway's proprietary API, developers work with a single abstraction layer. Omnipay avoids direct dependencies on official gateway packages, instead communicating with payment processors through their HTTP APIs using the PHP-HTTP library with a Guzzle adapter by default.
Omnipay suits projects that need to support multiple payment gateways or anticipate switching between them without rewriting payment logic. It is particularly valuable for shopping cart implementations and applications where payment flexibility matters. The library's appeal lies in its consistent API design and the ability to swap gateways with minimal code changes. Developers should be aware that new gateways can be created by extending the existing package structure, and community-contributed gateways should use the contributor's own vendor prefix rather than the omnipay namespace to distinguish them from officially supported implementations.
The project maintains a modular architecture where all gateways depend on a common package that defines the consistent interface. Gateway implementations are organized as separate packages, allowing developers to install only the gateways they need. The codebase is fully unit tested and includes example applications to help developers get started. The project has undergone a major version transition that changed the primary package name and requires gateway implementations to be updated accordingly, with an upgrade guide provided for this migration path.