rocketgate/sdk
A Laravel/PHP SDK for integrating the RocketGate payment gateway, providing a clean, developer-friendly API for payments, subscriptions, customer vaulting, refunds, and secure transaction handling in your applications.
Architecture fit. Despite the repository name, this is not a Laravel package — it is a vendor-supplied PHP client library for RocketGate's gateway API. There is no ServiceProvider, no Facade, no publishable config, no migrations, no queue integration, and no Laravel-native conventions. Architecturally it sits inside Laravel rather than integrating with it: you composer require it, instantiate a gateway/request object, populate it imperatively, and read back a response object. That is a perfectly workable shape, but it means every Laravel-idiomatic concern (config, DI, testing seams, logging, retries) is your responsibility, not the package's.
Integration feasibility. The happy path is genuinely small: install, supply merchant ID / site ID / API key, build a request, call a charge method, inspect the response. A single authorization/capture flow is an afternoon. Effort escalates sharply for tokenization/vaulting, subscription and rebilling lifecycle, voids and credits against prior transactions, 3-D Secure / SCA, and hosted payment page flows — those are where RocketGate's product semantics (not the PHP wrapper) dominate the work.
Technical risk.
@), and loosely-typed arrays for request/response payloads. Any of these complicates dependency injection and makes hermetic unit testing hard.Key questions.
require-style loader that would conflict with our autoloader?Stack fit. Compatible with any Laravel 9+ / PHP 8.x application, but deliberately non-idiomatic. The correct pattern is a thin internal adapter, not direct SDK calls scattered through controllers:
config/rocketgate.php populated from environment/secrets manager.PaymentGateway interface (authorize, capture, refund, void, tokenize, subscribe) that the SDK satisfies.Migration path. If payments already sit behind an abstraction, this slots in as another driver and rollout is a config change per merchant. If they do not, introduce the abstraction first — do not let the SDK's object model leak into domain code, because it makes both testing and any future gateway swap expensive. Then sequence: sandbox credentials → single charge in staging → tokenization/vaulting → subscription lifecycle → production cutover behind a per-merchant feature flag.
Compatibility. Before committing, verify: composer.json PHP constraint and required extensions (ext-curl, ext-xml/ext-simplexml); absence of a bundled autoloader; absence of removed functions (money_format, each) and of create_function; and whether TLS/cipher requirements are met by the base image. Run the test suite (if any) and a static analysis pass against the vendor directory to gauge quality.
Sequencing. (1) One-week spike in a throwaway branch against sandbox. (2) Vendor certification / test-card matrix sign-off. (3) Build the adapter with recorded-response fixtures so tests never hit the network. (4) Wrap all calls in queued jobs with retry and dead-letter handling. (5) Build a reconciliation job that matches gateway settlement reports to internal orders — this is not optional. (6) Canary one low-volume merchant, then ramp.
Maintenance. Low churn, high opacity. The practical model is: pin an exact version, never auto-update, and read the diff before every bump. Because there is no meaningful community, there is no upstream pressure to fix bugs — if you hit one, your only lever is the RocketGate support desk. Budget a small recurring allocation (a few days per quarter) for version reviews and gateway API change notices.
Support. GitHub is a distribution channel, not a support channel. Primary escalation is RocketGate's merchant support and your account representative. Internally, the bus factor risk is real: document the adapter, the credential rotation procedure, and the decline-code mapping in the repo, because the knowledge will otherwise live in one engineer's head.
Scaling. The SDK is synchronous HTTP; throughput is bounded by gateway round-trip latency times your worker concurrency, not by CPU. Consequences: queue everything, size the worker pool against peak checkout volume with headroom for gateway slowdowns, and check whether the client reuses connections or opens a fresh cURL handle per call (the latter compounds latency badly under load). Add circuit-breaking so a gateway slowdown degrades checkout gracefully rather than exhausting PHP-FPM workers.
Failure modes. The dangerous ones are the ambiguous ones:
.env committed to disk, and that no log handler captures request payloads containing PAN or CVV.Ramp-up. A mid-level Laravel developer can produce a working sandbox charge in a day and a production charge endpoint in a week. A production-grade integration — tokenization, subscription lifecycle, refunds, SCA, reconciliation, observability, PCI review — is realistically 2–4 engineering weeks plus vendor certification time. Plan the compliance conversation (hosted/tokenized vs. direct card capture) before writing code, because that decision, not the SDK, determines the schedule.
How can I help you explore Laravel packages today?