hipay/hipay-fullservice-sdk-php
Official HiPay Fullservice SDK for PHP, letting you integrate card and local payment methods, manage transactions, and call the HiPay gateway APIs from your PHP application.
Architecture fit
HiPay Enterprise (Fullservice) is a full acquiring/payment-gateway integration: card payments, 3-D Secure step-up, captures/refunds, recurring and one-click tokenisation, and alternative/local payment methods. That makes this package an infrastructure dependency on the critical money path, not a utility library — it deserves the same treatment as a database driver, not a convenience import.
The SDK itself is a plain, framework-agnostic PHP library distributed over Composer. There is no Laravel service provider, facade, config file, publishable asset, or contract binding. Architecturally that is neutral-to-good: it can live cleanly behind an application-owned adapter and never leak HiPay types into controllers, models, or domain services. The cost is that every piece of Laravel glue — container binding, config, retries, logging, exception translation, HTTP test doubles — is code we own and must maintain.
Practical consequence: treat it as an anti-corruption layer candidate from day one. The SDK's surface is untyped (arrays/stdClass-style request and response payloads) and the client is instantiated directly, so it will not be swappable later unless we wrap it now.
Integration feasibility
Mechanically straightforward. composer require hipay/hipay-fullservice-sdk-php, a HiPayServiceProvider registering a singleton client built from config/services.php credentials, and a HiPayGateway class implementing an app-level PaymentGateway interface. No published config, no migrations, no middleware, no auto-discovery. A competent Laravel engineer can have sandbox order creation working in a day or two.
Three friction points matter for planning:
Http::fake(), Guzzle middleware, Laravel Telescope's HTTP watcher, and standard tracing/retry middleware will not see these calls. Test strategy has to be built at the adapter boundary (fake the PaymentGateway interface) plus a small number of sandbox contract tests. Budget for this explicitly; teams routinely under-scope it.Technical risk
Key questions
ext-curl) does the current release declare, and does that match our target Laravel runtime?Stack fit
Compatible with any modern Laravel release, subject to the declared PHP floor. Expect no dependency conflicts: the SDK is largely self-contained and pulls in little beyond cURL and JSON extensions. Register it as a singleton bound to an interface, configured through config/services.php reading from environment variables — never instantiate the SDK client inside a controller, job, or model.
Recommended shape:
App\Contracts\PaymentGateway — our interface: createPayment, capture, refund, findTransaction.App\Payments\HiPay\HiPayGateway — the only class that imports SDK namespaces.App\Payments\HiPay\*Mapper — explicit request/response mapping, with validation and normalised DTOs.App\Payments\HiPay\HiPayNotificationVerifier — signature verification, isolated and independently unit-testable.provider discriminator and the gateway's own reference.Migration path
If we already have a provider (Stripe, Adyen, Mollie), do not fork the payment code. Introduce the PaymentGateway interface first, wrap the incumbent behind it, ship that refactor with no behaviour change, then add HiPay as a second adapter. This is the difference between a one-week addition and a quarter-long untangling.
If this is greenfield, still define the interface — it costs an hour and buys optionality. Keep HiPay identifiers (order_id, transaction_reference, payment_method token) in a gateway_references JSON column or a dedicated table, and keep our own orders/payments schema free of vendor field names. Route selection per-currency or per-country then becomes configuration, not a rewrite.
Compatibility
services.php + .env; no vendor:publish step exists.VerifyCsrfToken (or bootstrap/app.php in Laravel 11+); the route must be outside auth middleware.error_log/var_dump calls in the vendor tree and consider a Monolog channel with redaction.scoped rather than singleton.Sequencing
HiPayException → our PaymentFailedException with a stable error code).findTransaction and wire it to a sandbox call. Cheapest way to validate credentials, transport, auth, and error handling without touching money.pending / authorised / failed / abandoned states.PaymentGateway fake used by the broader test suite.Each phase should be independently deployable behind a feature flag, with HiPay enabled only after the reconciliation job has run clean for a full settlement cycle.
Maintenance
Ongoing maintenance is low-volume but high-consequence: mostly version bumps and payment-method onboarding. Because there is no community, each bump requires reading vendor release notes and re-running sandbox contract tests rather than trusting semver. Pin to an exact version, keep the lockfile committed, and subscribe to HiPay security advisories. Budget roughly 1–2 engineer-days per quarter for dependency hygiene, plus the PCI/3DS2 compliance treadmill, which is a recurring external deadline rather than a discretionary task.
The adapter boundary is the primary maintenance control: if the SDK must be replaced, only the adapter and its tests change. Enforce this with an architecture test (e.g. a Pest/PHPStan rule) that fails if SDK namespaces appear outside App\Payments\HiPay.
Support
Escalation runs entirely through the HiPay account relationship — support portal, account manager, or status page. There is no meaningful community, no Stack Overflow corpus, and no third-party integrators to lean on. This raises the value of internal documentation substantially: record the sandbox test cards, the payment-method matrix, the notification payload shapes, and the exact response body HiPay expects on acknowledgement. When a payment incident occurs at 2 a.m., the runbook is the support organisation.
Contractually, confirm the SLA and whether production incidents are covered by a paid tier before committing volume.
Scaling
The SDK is stateless and synchronous, so it scales horizontally without ceremony. The real constraint is worker occupancy: each gateway call blocks a PHP-FPM or queue worker for the full round trip. With a 30-second default timeout and a slow gateway, a traffic spike can saturate the pool and take down unrelated parts of the app.
Mitigations:
max_execution_time), configured explicitly rather than defaulted.Failure modes
pending and reconcile via findTransaction. Auto-retrying order creation without idempotency risks double-charging customers, which is a refund-and-reputation event.pending forever.Ramp-up
Two engineers, roughly two to three sprints to a production-ready card flow with 3DS, notifications, and reconciliation — assuming the sandbox spike goes cleanly. Add one to two sprints if alternative payment methods, recurring/one-click, or partial refunds are in the launch scope, and more if PCI evidence (SAQ A-EP) is required.
Knowledge concentration is the main organisational risk: with no community and thin documentation, exactly two people will understand this integration. Force breadth via pairing on the notification handler and reconciliation job, write the runbook as you build rather than after, and rehearse the "gateway is down" and "notifications stopped" playbooks in staging before go-live.
How can I help you explore Laravel packages today?