openpay/sdk
Openpay PHP SDK offers a Composer-installable client for adding Openpay payments to PHP apps, including Laravel. Manage customers, cards, charges, subscriptions, payouts, and webhooks through secure API calls, with straightforward objects and sandbox support.
Architecture fit
openpay/sdk has historically been a framework-agnostic PHP client library, not a Laravel package — no service provider, facade, publishable config, contract/binding, or Laravel-version constraints. The 1.4.0 release ships with no notes, so confirm the package shape has not changed (a service provider, config file, or Laravel constraint appearing in composer.json would alter the integration plan below).Openpay::<...>::getInstance($merchantId, $privateKey, $country)) returning resource objects for charges, customers, cards, payouts, and webhooks. Global-state/static access resists constructor injection, is awkward to mock, and leaks gateway types into controllers and jobs. Verify whether 1.4.0 introduces instance-based clients — if it does, the adapter becomes materially cleaner.PaymentGateway interface (charge, refund, tokenize, customer CRUD, webhook parse), implement it in a single adapter that is the only file referencing the SDK, bind it in a service provider. That isolates risk to one seam and makes substitution a one-class change.use Openpay\... in a controller, job, or model is a design defect to catch in review.Integration feasibility
composer require openpay/sdk, credentials in config/services.php and .env, bind a singleton, wrap calls. A competent Laravel engineer reaches a working sandbox charge in under a day.Http facade, retry helper, events, and your Guzzle middleware (tracing, logging, circuit breaking). Re-verify for 1.4.0 — adopting PSR-18 would be the single most valuable change the release could contain.curl and standard JSON handling; verify against your container image and hardened runtimes (disable_functions, outbound proxy, TLS inspection).Technical risk — the dominant finding has softened but is not resolved
| Risk | Severity | Rationale |
|---|---|---|
| Maintenance status: unverified, no longer "abandoned" | Medium-High | 1.4.0 breaks the five-year silence, which is a genuine positive signal. But a single release with no published notes does not establish a cadence, and cannot be assumed to include PHP 8.x compatibility work. Needs 2–3 consecutive releases over two quarters before the risk rating drops further. |
| Opaque release / unreviewable change | Medium-High | No changelog, no migration notes, no stated breaking changes. You cannot size the upgrade or the regression surface without diffing the source yourself. |
| Supply-chain integrity of a dormant repo | Medium | A sudden publish to a low-traffic payments package is a scenario worth validating: confirm tag signature/authorship and that Packagist metadata is unchanged. |
| PHP 8.2+ compatibility: still unverified | Medium-High | Do not infer from the version bump. Dynamic properties, implicit nullable params, and legacy curl idioms may remain. Must be proven empirically at E_ALL on your highest supported PHP. |
| API drift vs. vendor REST reference | Medium | Whether 1.4.0 catches up to the current Openpay API is unknown; test against sandbox contracts. |
| Community depth | Medium | Prior snapshot was 68 stars / 0 dependents. Re-check — one release rarely changes this, and a 0.x/1.x payments SDK with no dependents still means no third-party battle-testing. You remain maintainer of last resort. |
| PCI DSS scope | High (unchanged) | The SDK transmits and may handle cardholder data in-process. Currency now looks better to an auditor than it did last week; unpatched status and scope are unchanged. |
| Credential blast radius | Medium (unchanged) | Private key in .env is full merchant authority. Secret manager required in production. |
| License | Low | Apache-2.0, permissive, patent grant. Not a blocker — confirm it did not change in 1.4.0. |
Key questions to resolve before committing
composer why-not openpay/sdk plus a sandbox smoke test at E_ALL.)Stack fit
config/openpay.php + config/services.php entry for credentials, country, sandbox flag, timeouts.App\Payments\OpenpayGateway implements PaymentGateway — sole SDK touchpoint.OpenpayServiceProvider binding the interface as a singleton (or scoped binding for multi-tenant).PaymentDeclined, PaymentGatewayUnavailable) mapped from SDK error codes at the adapter boundary.payments with gateway, gateway_reference, status, raw_response JSON). Never treat the SDK as your system of record.Migration path
composer update this package unattended.Compatibility & sequencing
| Step | Gate to pass |
|---|---|
| 0. Release review | Diff last-known tag → 1.4.0; confirm author, tag signature, license, namespace, and whether public API or HTTP layer changed |
| 1. Two-day spike | composer require resolves on target PHP; sandbox charge + refund succeed; no deprecation notices at E_ALL |
| 2. Adapter + interface | Unit tests against a fake; zero SDK imports outside App\Payments\Openpay |
| 3. Config & secret injection | Credentials from secret manager; no key material in .env.example, logs, or error trackers |
| 4. Sandbox integration suite | Charge, capture, refund, partial refund, declined, 3DS/SCA if applicable, timeout, malformed response |
| 5. Webhook receiver | Signed/verified, idempotent, replay-safe, queued for processing |
| 6. Observability | Per-call latency, error-code histogram, circuit-breaker state, PAN-redacted request log |
| 7. Production cutover | Feature flag, low-value traffic first, rollback rehearsed |
composer.lock, and mirror the package into a private Composer registry. The repo was dormant for years; a fresh tag does not guarantee it stays available or immutable.internal/openpay-sdk with PHP 8.x fixes, vendored via VCS repository. 1.4.0 may reduce the patching you need; it does not remove the need for the capability.composer.json (config.platform) rather than trusting a composer.json constraint that has historically been stale and permissive.Maintenance
Support
Scaling
Failure modes
| Failure | Detection | Mitigation |
|---|---|---|
| Gateway timeout on charge (ambiguous outcome) | Latency alert, orphaned pending rows |
Idempotency keys + reconciliation query on gateway reference before retry |
| Double charge from naive retry | Customer complaint, reconciliation mismatch | Retry only on idempotent/safe errors; never blind-retry a create |
| 1.4.0 regression surfaces at runtime (not install time) | Staging smoke tests, deprecation logging at E_ALL |
Full sandbox suite per upgrade; flag-gated rollout; fork-and-patch pre-planned |
| Upgrade adopts an undocumented breaking change | Elevated 4xx/5xx on upgrade | Diff review before merge; contract tests in CI; pin by commit hash |
| Compromised or accidental upstream publish | Unreviewed diff, changed author/namespace | Verify tag provenance, mirror to private registry, adopt only after diff review |
| Vendor API breaking change with no SDK update | Elevated 4xx rate from gateway | Contract tests against sandbox in CI; vendor change-notification subscription |
| Credential leak (private key) | Secret scanner, anomaly detection | Secret manager, rotation runbook, IP allowlisting, least-privilege merchant keys |
| Webhook loss / replay | Missing terminal states in reconciliation | Idempotent handler plus scheduled polling fallback; never rely on webhooks alone |
| Upstream repo deletion or force-push | Composer install failure | Private Composer registry mirror + committed lockfile |
| Dependency flagged in security review | Audit | Documented risk acceptance with compensating controls (adapter isolation, minimized card-data exposure) |
Ramp-up
How can I help you explore Laravel packages today?