rawahamid/laravel-fib-integration
Laravel package for integrating First Iraqi Bank (FIB) payments, with a configurable service provider to create and verify transactions, handle callbacks, and manage API credentials cleanly.
Architecture fit. laravel-fib-integration is a thin, config-driven wrapper around First Iraqi Bank's (FIB) payment APIs, packaged in idiomatic Laravel style (service provider, publishable config, env-backed credentials). This fits cleanly into a conventional Laravel monolith or modular monolith where payments are one bounded concern. It is not a fit for multi-gateway abstraction layers or event-driven/queue-first payment orchestration without wrapping it behind your own port interface. Treat it as an adapter, not a payments platform.
Integration feasibility. Low-to-moderate. The integration surface is small — install via Composer, publish config, set credentials, call the provided client from a controller or job. The v1.0.3 addition of a dev (sandbox) environment is the single most material change for feasibility: it means the package now supports pointing at FIB's non-production endpoints, which is a prerequisite for any responsible pre-production validation. Prior to this, teams would either hard-code base URLs or fork the config — both bad. This release converts "we can't safely test" into "we can test," and that alone justifies re-baselining the assessment.
Technical risk.
dev environment means configuration now selects the endpoint. A misconfigured FIB_ENV in production is a silent, high-blast-radius failure mode (payments routed to sandbox, or sandbox credentials against prod). This must be guarded with a hard fail-fast check and per-environment credential separation.Key questions.
FIB_ENV is unset or invalid?Stack fit. Assumes Laravel 8+ and PHP 8.x with Composer 2 and the standard config/ + .env credential pattern. No queue, cache, or database assumptions are evident — which is good for portability but means persistence of payment state, retry policy, and reconciliation are your responsibility, not the package's. Plan for that in your own schema (payments, payment_events), not in the package.
Migration path. Greenfield: composer require, publish config, populate .env per environment, wire a single service class. Brownfield: if you already have a bespoke FIB client, do not swap it wholesale — run the package in parallel behind a feature flag for the dev environment only, compare request/response payloads, then cut over. The package is small enough that a parallel-run is cheap; a payments cutover is not.
Compatibility. Two axes to verify before committing: (a) Laravel/PHP version support against your platform version, and (b) FIB API version pinning — confirm the adapter targets the API version your merchant account is provisioned against. The dev environment does not guarantee parity with production behaviour (rate limits, 3-D Secure flows, and error codes frequently differ), so validate the contract, not just the happy path.
Sequencing. Adopt this release specifically to unlock a dev-environment track:
v1.0.3 explicitly (do not float ^1.0) and record the pin in your dependency policy.FIB_ENV=dev configuration; add a fail-fast assertion that prod never resolves to a dev base URL.PaymentGateway interface now — the cost is one class and it removes the future rewrite.Maintenance. Low code volume, but maintenance is yours in practice. Budget for periodic review of the package against FIB API changes and Laravel upgrades. Set a calendar reminder to re-evaluate on any major-version or bank-API change; patch releases like this one are not worth a review cycle each, but the dev-environment feature is.
Support. No commercial support, no SLA, no evident security-disclosure channel. For a payment path this is the weakest link. Mitigation: vendor the package (fork into an internal namespace) if it becomes load-bearing, so you control the response time to a bank-side break.
Scaling. The package adds negligible overhead — it is HTTP client configuration. Scaling concerns live in your application: request timeouts to FIB, retry with backoff on transient failures, circuit-breaking when FIB is degraded, and queueing payment initiation off the request path so a slow bank response doesn't hold a PHP worker. Ensure connection pooling/timeouts are set explicitly; Laravel's defaults are not tuned for external payment APIs.
Failure modes to design for.
dev switch is the top new risk; enforce via config validation at boot..env on disk for production.Ramp-up. Small API surface, so a mid-level Laravel engineer is productive in under a day for the happy path. The real ramp-up cost is domain knowledge — FIB's payment lifecycle, settlement timing, refund semantics, and dispute handling — none of which the package documents. Pair the integration work with a written runbook and a sandbox-backed walkthrough; otherwise the knowledge concentrates in whoever did the integration, compounding the single-maintainer risk on both sides of the boundary.
How can I help you explore Laravel packages today?