sirumobile/siru-php-sdk
A PHP SDK for integrating Siru Mobile payments into your app, offering a simple client for the Siru Mobile API so you can initiate and manage mobile and carrier-billing payments from Laravel or plain PHP projects.
Architecture fit
The package is a vendor SDK for a single upstream (Siru Mobile, carrier-billing / mobile payments), so its natural role is an isolated outbound payment adapter behind a domain-owned interface. It should not leak Siru DTOs, status enums, or HTTP exceptions into application code; wrap it in a PaymentGateway port with Siru-specific mapping in one adapter class. That keeps the blast radius small if the package is abandoned and lets you swap to a direct HTTP client or another PSP without touching checkout, order, or reconciliation logic.
A payment SDK also sits on a trust boundary: request signing, callback verification, and idempotency keys must be treated as security-critical rather than convenience utilities. Because the SDK is thin (typical Guzzle/curl client plus payload builders), assume it does not give you retry logic, idempotency guarantees, or webhook replay protection — those belong in your application layer regardless of what the SDK ships.
Integration feasibility Mechanically this is low-effort: Composer install, bind a client singleton in a service provider, expose a facade or inject the adapter. The real effort is not wiring but due diligence on the contract: which Siru API version the SDK targets, whether it covers the payment methods you need (initiate, status, refund, cancel, settlement report), and whether it implements the current signature scheme. A 2021 SDK against a live payment API is a genuine risk of speaking a deprecated version.
Technical risk
Key questions
composer.json constraints PSR-4/PSR-18 compliant and free of abandoned transitive deps?Stack fit
Fits Laravel cleanly as a boundary adapter, not a core dependency: one SiruGateway class implementing your PaymentGateway interface, one service provider for config (SIRU_* env vars, credentials in a secrets manager not .env in prod), and no facade exposure to controllers. Keep the SDK out of domain models entirely so a future fork-and-vendor or replacement is a one-file change.
Migration path Plan for the SDK being a starting point, not a foundation. Two paths:
app/Support/Siru or a private VCS repo. You gain MIT-licensed code you can patch, pin, and audit without upstream cooperation.If Siru later publishes a maintained SDK, the adapter interface makes the swap a contained change with no schema or UX impact.
Compatibility
Verify before committing: PHP constraint vs. your runtime, Guzzle/PSR-7/PSR-18 versions against your lockfile, and whether Laravel's HTTP client and the SDK can coexist without duplicate Guzzle major versions. Check for illuminate/* constraints that pin you to an EOL Laravel. Run composer why-not and a dependency audit (composer audit) as a gate.
Sequencing
Maintenance
Ownership sits with your team, not the vendor. Budget an ongoing patch-and-audit cadence: quarterly dependency review, composer audit in CI, and a documented fork point. With no upstream activity since 2021, assume you will be the maintainer; treat any future upstream release as a diff to review rather than a version to adopt. MIT licensing makes this legally clean, but it is still real engineering time.
Support Two support surfaces: Siru's merchant/technical support (SLA, escalation path, incident comms) and your internal on-call. The SDK itself provides no support channel — no issues activity, no dependents to consult. That means payment incidents have no community fallback: your runbook must include how to call Siru's API directly when the SDK misbehaves. Confirm merchant support terms, sandbox availability, and a named technical contact before go-live.
Scaling Payment traffic is low-volume relative to typical web traffic, so the SDK's performance is rarely the constraint; correctness and idempotency are. Scale risks are:
Failure modes
Ramp-up Low code ramp-up (small, readable surface), moderate domain ramp-up. Engineers need: Siru's payment lifecycle and settlement model, carrier-billing constraints (operator coverage, refund windows, currency), your reconciliation and refund workflows, and the incident runbook. Plan roughly a week for a mid-level engineer to be productive against the sandbox and two to three weeks to own the integration confidently. Document the adapter's contract and the fork rationale in an ADR so the next engineer does not re-litigate the build-vs-SDK decision.
How can I help you explore Laravel packages today?