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

Laravelpagseguro Laravel Package

michael/laravelpagseguro

Laravel package for integrating PagSeguro payments into your application. It provides a simple API to create checkout requests, handle payment notifications, and manage transactions, making Brazilian payment integration straightforward for Laravel developers.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • Thin Laravel service-provider + facade wrapper around PagSeguro's legacy REST/XML gateway APIs. Fits the Laravel 5.x idiom (container bindings, config file, facades) but is not a payment abstraction layer — PagSeguro concepts (sessions, transactions, notifications, payment methods) leak directly into calling code.
  • No gateway-agnostic contract (no PaymentGateway interface, no DTOs, no domain events). Adopting it means your checkout code becomes coupled to a gateway that is itself being retired.
  • Suited only to a redirect/transparent-checkout flow inside a Laravel monolith; it has no first-class support for async reconciliation, idempotent charge creation, or multi-provider routing.

Integration feasibility

  • Composer-installable and small in surface area; a POC in PagSeguro sandbox is achievable in days, not weeks.
  • Requires PagSeguro/PagBank seller credentials (email + production/sandbox token, app ID/key), notification URL registration, and a public HTTPS endpoint for postbacks.
  • Practical blockers: the package's composer.json pins era-appropriate constraints (PHP 7.x, Illuminate 5.x, Guzzle 6). Modern Laravel (9/10/11) and PHP 8.1+ will fail dependency resolution without a fork.

Technical risk

  • Vendor lifecycle risk (highest): PagSeguro's legacy checkout/API surface has been superseded by PagBank. Confirm the exact deactivation timeline and endpoint status with the vendor before any commitment — this is a decision gate, not a footnote.
  • Abandonment risk: last release 2018-01-16; no security patching, no PHP 8 support, no maintenance. Any CVE in the transitive tree (Guzzle, Illuminate) becomes yours to remediate.
  • Adoption-signal risk: 356 stars but 0 Packagist dependents — actual production usage is unverifiable and likely app-level and dated; you will not find a peer community to lean on.
  • Correctness risk: no idempotency keys on charge creation, generic exception handling, and postback handling that likely lacks replay/duplicate protection — all of which become money-affecting defects.
  • Compliance: transparent-checkout usage pulls card data into your PCI scope (SAQ-D-adjacent); redirect flow keeps you in SAQ-A. Architecture must be decided before code.

Key questions

  1. Is the legacy PagSeguro API still live for our merchant account, and what is the contractual end date versus PagBank's replacement API?
  2. New build or existing Laravel 5.x estate? If new, why this gateway/package at all versus PagBank SDK or a maintained alternative?
  3. Redirect or transparent checkout — and therefore what PCI scope are we accepting?
  4. Who owns the fork and the security-patch cadence after adoption?
  5. What is the monthly transaction volume, and does the gateway's rate limit and latency profile fit?
  6. Do we need PIX/boleto/card parity, and does this package expose all required methods, or will we drop to raw HTTP anyway?
  7. What is the fallback provider if PagBank cuts legacy endpoints mid-quarter?

Integration Approach

Stack fit

  • Greenfield on Laravel 9+/PHP 8.2: do not adopt. Use PagBank's current SDK/API directly, or a maintained multi-gateway abstraction.
  • Legacy Laravel 5.4–5.8 / PHP 7.1–7.4 estate with an existing PagSeguro merchant relationship: viable as a short-horizon bridge, provided it is wrapped, pinned, and given an explicit sunset date.
  • Any architecture requiring multi-provider routing, idempotent retries, or async settlement reconciliation: package is a starting reference, not the integration layer.

Migration path

  1. Fork and vendor the package (or pin via Composer with a commit hash); do not depend on Packagist availability or upstream fixes.
  2. Introduce a PaymentGateway interface in your domain (authorize, capture, refund, handleWebhook, reconcile). Implement PagSeguroAdapter over the package; forbid direct facade calls outside the adapter.
  3. Persist raw request/response payloads and gateway IDs in your own payments / payment_events tables — never rely on the gateway as your system of record.
  4. Build the PagBank (or alternate provider) adapter behind the same interface in parallel; run contract tests against both sandboxes.
  5. Shadow-run: send production traffic to the legacy path while validating the new adapter against recorded payloads.

Compatibility

  • Verify the constraint matrix explicitly: PHP version, Illuminate version, Guzzle major, ext-* requirements, and whether package auto-discovery is declared. Assume Laravel 9+ requires a fork with updated composer.json and possibly Guzzle 7 API adjustments.
  • Confirm certificate/TLS and PagSeguro endpoint hostnames still resolve and are not redirected to PagBank migration endpoints.
  • Check whether notification/postback payload parsing tolerates the XML/JSON variants currently emitted.

Sequencing

  1. Week 1 — Decision gate: vendor confirmation of legacy API status + sunset date; if sunset < 6 months, skip and go straight to PagBank.
  2. Week 1–2 — POC: sandbox transaction end-to-end (create session → charge → notification → refund) through the adapter.
  3. Week 2–3 — Hardening: idempotency keys, retry/backoff, structured logging with PII redaction, webhook signature/replay handling.
  4. Week 3–4 — Parity & cutover: contract tests, reconciliation job, canary in one market/one product line, then full cutover with legacy path retained as fallback for one billing cycle.

Operational Impact

Maintenance

  • Effectively unmaintained upstream. Budget ongoing ownership: fork upkeep, dependency/CVE patching, and PHP/Laravel upgrade compatibility — roughly 0.1–0.25 FTE steady state, spiking at each framework upgrade.
  • Treat the package as internal code from day one: vendored fork, internal README, ownership assigned to a named team.

Support

  • No vendor support for the package; Portuguese-only README and examples; issues/PRs are unlikely to be triaged.
  • Escalation for gateway behavior goes to PagSeguro/PagBank merchant support, which will itself steer you to the new platform — reinforcing that support cost is really migration cost deferred.

Scaling

  • Each checkout is a synchronous outbound HTTP call: latency and gateway rate limits become your throughput ceiling. Queue non-interactive calls (refunds, reconciliation, notifications) and keep only authorization on the request path.
  • Postback handling needs a queue with backpressure; bursts at peak sales windows will otherwise hit PHP-FPM worker exhaustion.
  • Reconciliation must be a scheduled job over gateway settlement reports — the package does not provide one.

Failure modes

  • Duplicate charges from retries without idempotency — mitigate with a client-side idempotency key and a pre-charge lookup.
  • Lost or duplicated postbacks — mitigate with idempotent event storage keyed on gateway transaction ID and a polling reconciler.
  • Silent status drift (paid but order still pending) — mitigate with a daily settlement diff alert.
  • Credential/token expiry and rotation — no rotation helper; must be handled operationally with config encryption and a documented runbook.
  • Endpoint decommission — hard failure at an unknown date; the single largest outage risk and the reason for a sunset date.
  • XML/parse and timeout errors surfacing as generic exceptions — instrument error taxonomy before launch.

Ramp-up

  • A mid-level Laravel engineer reaches productive POC in ~3–5 days; production-ready (idempotency, webhooks, reconciliation, PCI-scope decisions) in ~3–4 weeks.
  • Requires Brazilian payments domain knowledge: boleto settlement timing, card installments/antifraude, PIX via PagBank, and sandbox quirks. Without that, add 1–2 weeks or bring in a payments-savvy engineer.
  • Recommend a written runbook (credential rotation, webhook replay, refund procedure, reconciliation failure) as a launch prerequisite — 356 stars and 0 dependents means no community tribal knowledge to inherit.
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.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
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