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

Sdk Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • No change to the core structural finding, but it now requires re-verification rather than assumption. 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).
  • Historically the usage pattern is a static factory (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.
  • Placement remains the infrastructure edge of a hexagonal/ports-and-adapters design: define your own 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.
  • Laravel fit is medium-to-good after adaptation, poor if adopted naively. Any direct use Openpay\... in a controller, job, or model is a design defect to catch in review.
  • Abstractions you will still own: configuration object, retry/timeout policy, idempotency-key generation, error-code → domain-exception mapping, PAN-redacted request/response logging.

Integration feasibility

  • Mechanically easy: 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.
  • New gating step: 1.4.0 was published into a repository that had been quiet since 2020-06-17. Before adopting, obtain and read the diff between the last adopted tag and 1.4.0, confirm the maintainer identity and publishing token were not compromised, and check that the package name, namespace, and license are unchanged. An unexplained publish to a dormant payments library is a supply-chain question, not just a maintenance question.
  • Real constraints remain environmental:
    • Auth model: private-key + merchant-ID + country triple resolved at construction. Multi-merchant/multi-country needs a per-tenant factory, not a singleton. Decide early.
    • HTTP layer: historically not PSR-18/PSR-7, so it bypasses Laravel's 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.
    • Synchronous, blocking calls: no async surface. Every charge occupies a PHP-FPM or queue worker for the full round trip.
    • Extensions: assumes 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

  1. What is actually in 1.4.0? Obtain the changelog or diff, and classify it: feature, bugfix, PHP 8 compatibility work, or dependency bump only. Everything below depends on this answer.
  2. Does 1.4.0 install and run deprecation-free on our highest supported PHP and Laravel versions? (composer why-not openpay/sdk plus a sandbox smoke test at E_ALL.)
  3. Does 1.4.0 change the public API, auth model, or HTTP layer (e.g. PSR-18 adoption)? If yes, re-estimate adapter effort and re-run the test matrix.
  4. Is the release attributable to the known maintainer, and is the tag signed/verifiable? Treat unverifiable provenance as a hard stop for a payments dependency.
  5. Can the vendor confirm a support commitment, a published cadence, and a security-disclosure channel? Get this from the account manager in writing — a repo release is not a support contract.
  6. Is Openpay a contractual requirement (merchant account, LatAm/BBVA relationship, SPEI/OXXO), or discretionary? If discretionary, one release does not outweigh the thin ecosystem; still evaluate maintained alternatives.
  7. What is the fallback if a zero-day lands here — fork-and-patch or emergency gateway swap? Who owns it, and has the fork been rehearsed?
  8. Does our PCI scope already exclude card data (hosted checkout / tokenization widgets)? This materially reduces exposure regardless of SDK version.

Integration Approach

Stack fit

  • Unchanged: Laravel can host the SDK, but only behind an adapter.
    • 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).
    • Domain exceptions (PaymentDeclined, PaymentGatewayUnavailable) mapped from SDK error codes at the adapter boundary.
    • Form Requests / DTOs so no SDK object reaches a controller, Blade view, or queued payload.
  • Persist gateway state in your own schema (payments with gateway, gateway_reference, status, raw_response JSON). Never treat the SDK as your system of record.
  • If 1.4.0 does happen to ship a Laravel service provider or config, still keep your own interface and adapter. Do not let a vendor publish step become your integration boundary.

Migration path

  1. Greenfield: build the interface first, then implement with the SDK. Costs ~2 extra days, repaid the first time you swap or mock the gateway.
  2. Already running a pre-1.4.0 version: treat 1.4.0 as a planned upgrade, not a routine patch bump. Diff against your pinned version, run the full sandbox suite, and ship behind a flag. Do not composer update this package unattended.
  3. Brownfield with direct SDK calls: introduce interface and adapter, move call sites one at a time behind a comparison flag, then delete direct references. Do not refactor and add features in the same sprint.
  4. Migrating from another gateway: run both in parallel with a routing flag keyed by merchant or currency; reconcile settlement reports daily for a full billing cycle before cutover.

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
  • Pin to 1.4.0 by commit hash, commit 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.
  • Do not relax the fork plan. Budget for 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.
  • Re-verify the SDK's PHP upper bound yourself in composer.json (config.platform) rather than trusting a composer.json constraint that has historically been stale and permissive.
  • Re-run the sandbox contract tests against the live Openpay API as part of this upgrade — the release date suggests the SDK may finally have caught up to API changes, and you need to know whether it went far enough.

Operational Impact

Maintenance

  • Still assume you are the maintainer, but with a changed posture: shift from "fork and patch by default" to "monitor and patch on demand." One release is an encouraging data point, not a cadence.
  • Set an explicit evidence bar for downgrading the risk: two or three substantive releases within two consecutive quarters, at least one of which addresses PHP 8.x/Laravel currency. Until then, keep the quarterly review at 1–2 engineer-days.
  • Automated SCA/SBOM tooling will remain near-silent on this package (low version churn, no advisory feed). Keep the manual calendar review — silence is still the risk, even when the last release is recent.
  • Review the 1.4.0 diff as a one-off task and record the findings in the internal runbook: what changed, what was deliberately not adopted, and why.
  • Keep fork divergence minimal and documented so re-baselining stays cheap if the upstream goes quiet again — a realistic outcome given the prior five-year gap.
  • Runbook remains the highest-ROI artifact: auth, sandbox setup, error-code meanings, known quirks, and now a "tracking upstream releases" section.

Support

  • Two support surfaces, still not to be conflated:
    • Gateway (uptime, settlements, declined disputes, API changes) → Openpay/BBVA merchant support and your account manager. Contractual SLA lives here.
    • SDK (bugs, PHP compatibility) → no guaranteed upstream channel. The 1.4.0 release is not a support commitment. Your on-call engineer owns it.
  • Use the release as a natural moment to ask the account manager for a named escalation contact and a stated maintenance/disclosure policy. A publisher who just resumed releasing is more likely to answer than one who has been silent for five years.
  • Train support/CS on the distinction between our failure and gateway failure; both look identical in a customer complaint.

Scaling

  • Unchanged and still the binding constraint: synchronous blocking HTTP. Size worker pools against p95 gateway latency × target TPS, and move all non-interactive operations (payouts, batch refunds, reconciliation) to queued jobs.
  • Set explicit connect and total timeouts (e.g. 2s / 10s). Do not rely on library defaults.
  • Retries must be idempotency-keyed at the adapter layer; a timeout after the gateway committed is indistinguishable from a pre-commit failure. Without this you will double-charge customers — the highest-severity defect class here.
  • Circuit breaker plus queue-based backpressure so a gateway slowdown degrades to "delayed" rather than "site down."
  • Per-merchant rate limits apply; isolate tenants into separate queues so one merchant's burst cannot starve others.
  • Daily reconciliation against settlement reports remains non-negotiable — the only reliable detector of silent state divergence.

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

  • Engineering: ~3–5 days for an engineer new to Openpay to be productive behind a pre-built adapter (sandbox account, docs, charge/refund/webhook happy paths). Add ~2 days for ambiguity/retry semantics, where the real complexity lives. Add 2–3 days if the adapter must be built from scratch, and 0.5 day to review the 1.4.0 diff as part of the upgrade.
  • QA: needs a sandbox test-data playbook — test cards, decline triggers, and simulation endpoints are not obvious from the repo. Half a day per tester plus a maintained dataset. Test data must never resemble production PANs. Re-baseline the expected results against 1.4.0.
  • Ops/on-call: half a day on dashboard, alert set, circuit-breaker lever, and escalation script, including a game-day exercise for "gateway timeout during peak checkout."
  • Finance/CS: short briefing on settlement timing and refund latency so customer-facing promises match reality.
  • Organizational: the stakeholder framing needs updating but not retiring: "we are adopting a low-ecosystem vendor SDK that has recently resumed releasing, and we still own its maintenance risk until it demonstrates a sustained cadence." Get explicit sign-off on that ownership (named team, quarterly review with the two-to-three-release evidence bar) before the first production charge — otherwise the risk quietly becomes nobody's, which is the worst outcome for a payments dependency.
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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle