jordisala1991/sermepa-omnipay
Omnipay gateway driver for Sermepa (RedSys), the payment platform used by Spanish banks. Adds payment request, response, and notification handling to PHP and Laravel apps through the Omnipay API.
Architecture fit. The package is a thin Omnipay gateway adapter for Redsys (formerly Sermepa), the payment processor used by essentially every Spanish acquiring bank's virtual TPV. Architecturally, this is the right shape for our stack: it implements Omnipay's GatewayInterface as a hosted/redirect gateway, meaning card data never touches our servers and PCI scope stays at SAQ A–level. The integration surface is small — a purchase request that renders/redirects to sis.redsys.es, plus a notification (callback) response that must be parsed and its signature verified. For a Laravel application that already speaks Omnipay, the conceptual fit is excellent.
The problem is not the architecture, it is the artifact. With 0 stars, 0 dependents, and a last release in March 2017, this is effectively an abandoned single-author repository. We would be adopting an unmaintained, security-sensitive code path with no community review. Treat the evaluation as "is this a usable reference implementation to fork?" rather than "should we composer require this?"
Integration feasibility. Low-to-moderate, with one hard caveat. The 2017 release date puts it in the Omnipay 2.x era (League Omnipay 3 split gateways into standalone packages mid-2017 and moved to PSR-7/PSR-18 transport). If our application runs Omnipay 3.x — the norm for anything on modern Laravel — the package will not install cleanly or will drag in a conflicting omnipay/common v2 tree. We must confirm the declared constraints before scoping. The Laravel side is trivial in either case: bind the gateway as a singleton in a service provider, pull credentials from config/services.php, and expose a small PaymentService that wraps purchase/completePurchase.
Technical risk. This is the dominant concern and it is concentrated in cryptography and protocol versioning:
HMAC_SHA256_V1 in 2015, which requires deriving a per-order key from the merchant key using 3DES over Ds_Merchant_Order. A 2017 package probably handles this, but it must be proven against the live test environment — a silent fallback to SHA-1 or an incorrect 3DES derivation will fail in production, not in staging.Ds_Merchant_EMV3DS payloads, and the exemption flags are almost certainly absent from a 2017 gateway.Also note refunds and pre-authorization are typically out of scope for this style of gateway (Redsys handles those via a separate bank-side interface), and order-number constraints (Redsys historically caps Ds_Merchant_Order at 12 characters, 4 numeric prefix + 8 alphanumeric) are a classic source of production bugs.
Key questions.
composer.json constraints — omnipay/common v2 or v3, and what PHP floor?HMAC_SHA256_V1 key, and is it verified against sis-t.redsys.es today?Stack fit. The package is PHP/Composer and Laravel-agnostic, so it slots in mechanically. The real fit question is Omnipay major version alignment. Two viable paths:
| Path | Description | Verdict |
|---|---|---|
| Adopt as-is | composer require and use the Sermepa gateway |
Reject — abandoned, Omnipay 2 coupling |
| Fork & harden | Internal fork, upgrade transport, add tests, own the code | Recommended |
| Reimplement | Thin custom client against Redsys' documented redirect + notification protocol | Fallback if fork proves brittle |
Forking is the pragmatic middle. It is roughly 800–1,500 lines of well-understood protocol code; we keep the protocol knowledge encoded in the fork while owning maintenance.
Migration path. Fork to an internal namespace (e.g. acme/redsys-omnipay), pin it via a VCS repository entry in composer.json, and upgrade to Omnipay 3 semantics: extend Omnipay\Common\AbstractGateway, implement getDefaultParameters()/initialize(), and move any server-to-server calls onto the PSR-18 client. Register the gateway in a RedsysServiceProvider with per-environment credentials (test: sis-t.redsys.es, Ds_SignatureVersion: HMAC_SHA256_V1). Keep the gateway behind our own PaymentGateway interface so the Omnipay coupling is one adapter deep.
Compatibility considerations.
Sequencing.
sis-t, confirm signature validity end-to-end. This is the go/no-go gate.Ds_Merchant_Order + Ds_AuthorisationCode.Net estimate: ~2 sprints for a mid-level Laravel developer, contingent on the spike passing.
Maintenance. The package has no upstream maintainer and no release in seven-plus years — the fork becomes ours outright. That means owning protocol drift: Redsys periodically revises signature requirements, 3DS2 parameters, and decline-code semantics. Budget a recurring 1–2 days per quarter for review, plus a standing dependency-update lane. Without Dependabot/CI on the fork, this will silently rot.
Support. Zero. No issue tracker activity, no security advisories, no one to escalate to. Any production incident is an internal debugging exercise against Spanish-language Redsys documentation and bank-side terminal contacts. We should establish an escalation path through the acquiring bank's technical support before go-live — that relationship, not the package, is the real support contract.
Scaling. The redirect model is architecturally kind: the payment page is hosted by Redsys, so our infrastructure carries only the request-generation and notification-handling load — stateless, horizontally scalable, no long-lived connections. The actual bottlenecks are (a) notification endpoint throughput during traffic spikes and (b) database contention on order-state transitions. Both are solved with a queue: acknowledge the notification immediately, enqueue processing, and make the handler idempotent. The gateway library itself is never a scaling factor.
Failure modes to instrument.
Ds_Response; the 0000–0099 approved band versus 0101/0180/0190 declines versus 0900+ technical errors is frequently mis-mapped, producing false "failed" states on successful charges.Ramp-up. One developer, roughly 3–5 days to productive on the codebase given prior Laravel/Omnipay familiarity. The dominant ramp cost is not the PHP — it is the Redsys protocol and its Spanish-only documentation, the 3DES/HMAC signature derivation, and the notification state machine. That knowledge should be written down in an ADR during the spike, because it is the asset we are actually acquiring here — not the package.
How can I help you explore Laravel packages today?