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

Omnipay Bundle Laravel Package

xola/omnipay-bundle

A Symfony bundle that integrates the Omnipay payment library, providing configurable gateway services and helpers for processing payments through multiple providers with a consistent PHP API.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — poor, and the mismatch is the headline finding. Despite being evaluated as a "Laravel/PHP package," xola/omnipay-bundle is a Symfony bundle, not a Laravel package. Its entire contribution is Symfony-shaped glue: a Bundle subclass, a DependencyInjection\Extension that parses a YAML/XML config tree, compiler passes that tag and wire gateway services, and service definitions consumed by Symfony's container. Laravel has no Kernel::registerBundles(), no config tree builder, and no compiler passes. To use the bundle you would have to install symfony/framework-bundle and a second DI container inside a Laravel application — a parallel bootstrap, a parallel configuration surface, and two competing definitions of "the container." The actual domain value (constructing an Omnipay 3 gateway from an array of credentials and exposing purchase/authorize/capture/refund) is roughly 150–300 lines of code. We would be importing a framework to avoid writing a service provider.

Integration feasibility — likely blocked at dependency resolution. The package requires omnipay/common: ^3.0 plus Symfony components. Laravel 9/10/11 pin Symfony components to 6.x/7.x; a bundle last released in January 2020 will almost certainly constrain symfony/framework-bundle and symfony/dependency-injection to 2.8/3.x/4.x/5.x. That produces a hard Composer conflict, and the only "fix" (downgrading framework components) would break Laravel itself. Realistically the last plausible host is Laravel 8 on Symfony 5 — which is past security-support end-of-life for most organizations. This must be verified with a one-day composer require spike on the actual target application before any design work, but the prior is strongly negative.

Technical risk — high, concentrated in abandonment and blast radius. Signals: 9 stars, 0 dependents, last release 2020-01-22, opportunity score ~1.09. There is no downstream population to surface bugs, no maintainer responsiveness, and no evidence of PHP 8.2/8.3 compatibility work. This code sits directly on the payment path, which is the highest-consequence code in the system: a deprecation-triggered fatal during checkout is a revenue event, and a silently changed gateway request shape is a reconciliation event. Note the distinction: Omnipay 3 itself is a reasonable, framework-agnostic dependency; the risk is isolated to this Symfony adapter, which we do not need.

Key questions for the team:

  1. Which gateways are actually in scope (Stripe, PayPal, Authorize.Net, Adyen)? That determines whether Omnipay is even the right abstraction versus a first-party SDK.
  2. What is our Laravel and PHP version floor today, and 12 months out? If we are on Laravel 10/11 + PHP 8.2+, this package is a non-starter.
  3. Does any team in the org actually run Symfony and therefore have a legitimate use for this bundle? If yes, scope it there and keep it out of Laravel.
  4. Are we permitted to build and own a ~200-line internal wrapper, or is there a policy preference for an off-the-shelf Laravel package?
  5. Who is the named owner and on-call rotation for payment code once integrated?

Integration Approach

Stack fit — adopt the dependency, reject the package. The correct landing zone is Omnipay 3 core (league/omnipay) plus only the specific gateway driver packages we need, consumed directly from a Laravel service provider. Omnipay is deliberately framework-agnostic; Laravel's container handles it natively with no adapter required. Treat xola/omnipay-bundle as reference documentation, not a dependency — its gateway-construction and option-mapping logic is a useful sanity check when writing our own config schema.

Migration path:

  1. Do not add xola/omnipay-bundle to composer.json. Record the decision and rationale in the ADR so it is not re-litigated.
  2. Add league/omnipay:^3 and one gateway package (e.g. omnipay/stripe) behind a feature branch; confirm PHP 8.2/8.3 compatibility in CI.
  3. Add config/payments.php with per-gateway credential blocks keyed by gateway name, sourced from environment variables / secrets manager — never committed.
  4. Add App\Providers\OmnipayServiceProvider registering a GatewayManager singleton that lazily constructs and caches gateway instances via Omnipay::create($name) and ->initialize($config).
  5. Define a thin PaymentGateway interface (purchase, authorize, capture, refund, void) so calling code never imports Omnipay types directly — this preserves the option to swap to a first-party SDK later.
  6. Provide a FakeGateway / NullGateway binding for tests and local development so the suite never touches a sandbox endpoint.
  7. Handle idempotency keys, retries, and webhook verification as a separate, explicitly scoped workstream — these are the parts that actually cause incidents, and no bundle gives them to us.

Compatibility and test matrix: PHP 8.1/8.2/8.3 × Laravel 10/11, plus one sandbox end-to-end per gateway (authorize → capture → refund) in CI against test credentials. Verify each gateway driver's own maintenance status individually; bundle risk and driver risk are independent.

Sequencing and effort: Day 1 — Composer spike on the real app to document the conflict (evidence for the ADR). Days 2–4 — direct Omnipay integration against a sandbox gateway with the interface above. Days 5–6 — provider, config, fake gateway, tests. Week 2+ — idempotency, retry/backoff, webhooks, reconciliation. Total to first production transaction: roughly 1.5–2 engineer-weeks, of which the bundle saves approximately zero.

Operational Impact

Maintenance and ownership. Adopting the bundle means owning a fork of abandoned Symfony glue we cannot cleanly run — the worst of both worlds. Skipping it means we own ~200–300 lines of straightforward Laravel code with full test coverage and no upstream dependency. The ongoing cost is not the code; it is tracking Omnipay core and each gateway driver for releases, which is identical in both scenarios. Budget roughly 2–4 hours per quarter for dependency review, plus a defined upgrade window whenever a gateway changes its API.

Support. Zero dependents means zero community surface: no Stack Overflow corpus, no downstream issue reports to learn from, no security advisories routed to us. Any defect becomes an internal investigation. This is acceptable for a wrapper we wrote and understand; it is not acceptable for a framework adapter we did not write.

Scaling. The wrapper is stateless and not the bottleneck — gateway API latency dominates (typically 300–2000 ms per authorization). Under PHP-FPM, synchronous gateway calls block a worker for that duration, so worker pool sizing must account for payment traffic, and low-priority operations (refunds, captures, settlement polling) should be queued rather than executed in the request cycle. Use Guzzle with explicit connect/read timeouts (e.g. 5s/15s), a bounded retry policy, and a circuit breaker per gateway so a slow provider does not exhaust the pool. Horizontal scaling is unaffected.

Failure modes to design against, in priority order:

  1. Composer lock conflicts blocking framework upgrades — the most likely and most expensive failure; it converts a routine Laravel upgrade into a payment-code rewrite under time pressure. Avoided entirely by not installing the bundle.
  2. Duplicate charges from retries without idempotency keys — mitigate by generating a stable idempotency key per order attempt and persisting gateway transaction IDs before responding.
  3. Silent gateway driver breakage on a PHP minor upgrade — mitigate with the sandbox end-to-end CI job above.
  4. Config drift — in a bundle scenario, credentials live in Symfony YAML while the app reads Laravel config, producing two sources of truth; the single config/payments.php avoids this.
  5. Timeout with unknown outcome (charge may or may not have landed) — requires a reconciliation job querying the gateway by idempotency key, not a blind retry.

Ramp-up. Low. Omnipay's request/response object model is learnable in about a day, and a Laravel service provider is familiar territory for any mid-level engineer on the team. The bundle offers no ramp-up advantage in Laravel because its documentation and idioms are Symfony-specific and would actively mislead. Plan one onboarding session covering the gateway interface, the fake gateway for local dev, and the on-call runbook for failed captures and reconciliation.

Bottom line. Do not adopt xola/omnipay-bundle. The Laravel/Symfony impedance mismatch, the near-certain Composer conflict with modern Laravel, and the 2020 abandonment date combine to make this a liability rather than an accelerator. Adopt Omnipay 3 core with per-gateway drivers, wrap it in a small internal service provider behind a stable interface, and invest the saved effort in idempotency and reconciliation — the parts that determine whether payments are actually reliable.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums