payum/omnipay-bridge
Bridge for Payum that lets you use any Omnipay payment gateway through Payum's unified API. Wrap Omnipay gateways as Payum payment services to handle purchases, authorizations, captures, refunds and notifications via one consistent interface.
Architecture fit. The bridge implements an adapter between two abstraction layers on the same domain: Payum (payment workflow abstraction — gateways, actions, requests, tokens, persisted payment state) and Omnipay (a thinner, stateless gateway driver library — purchase, authorize, capture, refund, void). Its value is architectural: it lets a Payum-centric application reach the ~100 Omnipay gateway drivers without adopting a second payment paradigm, keeping a single token/state-machine and security-token model in front of many providers. It is a plain PHP library, not a Laravel package — no service provider, no config file, no facades — so "Laravel fit" means "can be composed inside a Laravel app," not "installs as a Laravel module." It fits only if Payum is already the payment abstraction of record; it adds no value to a codebase that talks to Omnipay directly.
Integration feasibility. Mechanically trivial: a Composer dependency, registration of the bridge's gateway factory, and per-gateway configuration. The real work is dependency resolution, not wiring. Expect to spend most of the effort reconciling version constraints rather than writing integration code.
Technical risk. High, concentrated in three areas:
Capture vs. Omnipay partial-capture/refund semantics, which differ per driver) produces double charges or orphaned authorizations, not a stack trace.Key questions.
Stack fit. Laravel + Payum (via an existing Payum Laravel integration) + Omnipay drivers. The bridge slots between Payum core and the Omnipay gateway instance. Because it ships no Laravel glue, you will write a small service provider or container binding yourself — budget a day, not a sprint. Configuration is per-gateway: instantiate the Omnipay gateway, wrap it, register it with Payum's gateway registry.
Migration path. Two viable end states, and the TPM should choose one up front:
The anti-pattern is adopting it as a permanent foundation because it installed successfully once.
Compatibility. Treat as unverified until spiked. Check: PHP constraint vs. our runtime; Omnipay major (expect 2.x); Payum major; Symfony event-dispatcher/options-resolver transitives; PHPUnit version if we intend to run its suite. The realistic outcome is a fork with widened constraints — a few days of work plus a smoke test — not a clean composer require. Also confirm the Omnipay driver for the target PSP is itself maintained; the bridge is only as good as the driver behind it.
Sequencing.
Maintenance. Effectively zero upstream maintenance; assume full ownership on day one. Budget recurring cost: quarterly dependency/security review, an owner-of-record for the fork, and CI that actually executes payment contract tests. A fork with no test suite is worse than the original, because it looks maintained.
Support. Community support is effectively nil — no active maintainers, thin documentation, low issue traffic. Troubleshooting means reading the bridge source and both upstream abstractions. In practice, the one or two engineers who did the spike become a single point of failure; mitigate with written runbooks per gateway.
Scaling. Not a scaling concern. The bridge is a thin translation layer over HTTP calls to the PSP; throughput is bounded by PSP latency, Payum's token/payment storage, and queue capacity — not by the adapter. Horizontal scaling is fine provided Payum's token and payment-detail stores are shared (database/Redis), not local. Concurrency correctness around token capture matters far more than raw volume.
Failure modes. Ranked by business impact:
Each needs an explicit detection and fallback: alerting on payment-state transitions, a reconciliation job against PSP settlement reports, and a kill switch that routes traffic off the bridged gateway.
Ramp-up. Low codebase ramp-up (it is small), moderate domain ramp-up. A competent PHP engineer reads the bridge in a day; understanding Payum's request/action/token model well enough to debug a failed capture safely takes one to two weeks. Realistic estimate for production readiness including fork, tests, and canary: one to two sprints with a senior engineer, and only if the coverage inventory justifies it. If the answer to "which PSP is Omnipay-only for us?" is anything other than a concrete list of names, the recommendation is to not adopt.
How can I help you explore Laravel packages today?