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

Laravel Fina Sdk Laravel Package

giorgigrdzelidze/laravel-fina-sdk

A Laravel SDK for integrating the Fina API into PHP applications. It provides configuration, service bindings, and convenient helpers for authenticating and making Fina requests, helping keep your Laravel integration clean, reusable, and maintainable.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package is a thin, Laravel-native client for FINA Web API v8.0: configured credentials, a guarded HTTP layer with bearer-token acquisition and 401 refresh, and typed exceptions on the vendor's ex error envelope. v0.1.3 fills two gaps that previously forced teams into raw Http:: calls — product rest levels across stores (GET getProductsRest) and a single retail sale document (GET getDocProductOutSingle/{id}). The more important signal is architectural rather than functional: the new endpoints route through the existing response guard, so error semantics are now uniform across the surface. That matters to us because our integration code can depend on one contract (FinaRemoteException plus status-code mapping) instead of special-casing two endpoints.

Integration feasibility. Straightforward. Composer install, publish config, wire credentials and a token store, then call the client from a service or job. getProductsRest() is read-only and needs no payload beyond auth; getProductOutSingle($id) is a path-parameterised read. Neither introduces a new dependency, a new auth mechanism, or a migration on the FINA side that we can see from the notes. Both are additive — no removals, renames, or signature changes — so adoption is opt-in per call site.

Technical risk. Three concerns, in priority order:

  1. Pre-1.0 versioning. v0.1.3 with 84 tests is a credible maturity level, but the 0.x contract means minor bumps can carry breaking changes. We should pin an exact version and treat upgrades as reviewed changes, not automated ones.
  2. Error-semantics divergence. Any code we already wrote against these two endpoints via raw HTTP will have been returning ex payloads as data. Once we migrate those call sites to the package, an ex becomes a thrown FinaRemoteException. That is the correct behaviour but it is a silent behavioural change at the seam — call sites must be audited, not swapped blind.
  3. Payload shape assumptions. getProductsRest() returns a nested { rest: [{ id, store, rest, reserve }] } for every product in every store. Cardinality is unknown to us and grows with the catalogue. getProductOutSingle() returns products[] whose nesting we have not yet validated against real documents.

Key questions. What is the per-call latency and payload size of getProductsRest() for our catalogue — and does FINA rate-limit it? Does the 401 refresh handle concurrent in-flight requests without a token stampede, and where is the refreshed token persisted (cache? file? per-process)? Is FinaRemoteException exposing the raw ex code, or only a message — we need the code for retry classification. Are there other v8.0 endpoints still uncovered that our roadmap depends on (document creation, stock movements)? What is the vendor's stated support window for API v8.0?

Integration Approach

Stack fit. No mismatch. The package assumes Laravel's HTTP client, container bindings, and configuration conventions — all of which we already use. Token refresh via 401 is the pattern our other vendor clients use, so operational muscle memory transfers. There is nothing here that requires a new runtime, a sidecar, or an event bus.

Migration path. Adopt in place rather than behind an abstraction. For the two endpoints, the migration is: identify raw call sites, wrap them in a try/catch for FinaRemoteException, assert the response shape against fixtures captured from the current raw calls, then swap. Do not perform a wholesale replacement in one change — a per-endpoint swap with the old path retained behind a flag lets us compare outputs for one cycle.

Compatibility. Additive release; existing endpoints and their behaviour are untouched. Our Laravel and PHP floor should be verified against the package's composer.json before we commit — the notes don't state it, and 0.x packages are inconsistent here. The 84-test suite including HTTP 400/500 and 401 refresh is a reasonable compatibility signal for the HTTP layer.

Sequencing.

  1. Pin the version; confirm PHP/Laravel constraints and publish config into the target environment.
  2. Smoke-test auth and a 401 refresh in staging against the FINA test tenant.
  3. Land getProductOutSingle($id) first — single-document, bounded payload, low blast radius, good validation of the exception contract.
  4. Land rest() second, behind a scheduled job with caching, and measure payload size and duration before exposing it to any user-facing feature.
  5. Retire the raw call sites only after both are observed clean for a full cycle.

Operational Impact

Maintenance. Small surface, one maintainer-visible dependency, and a test suite that grows with each endpoint — the 9 new tests (URL/method, bearer token, payload passthrough, ex handling, 400/500, 401 refresh) are exactly the right coverage for a client like this. Our ongoing cost is version-pin review on each 0.x bump, plus keeping our own contract tests current as FINA evolves v8.0. Budget a few hours per release cycle, not per month.

Support. Failures will surface as either FinaRemoteException (vendor said no) or a transport-level exception (we never reached the vendor). Those must be distinguishable in logs and alerts — the package helps here, but only if we catch and tag them explicitly. Whoever is on call needs the FINA ex code list; without it, a code-only exception is unactionable. Own that mapping on our side rather than waiting for the package to ship it.

Scaling. getProductsRest() is the scaling question, not the package. It is a full-catalogue, all-stores read: call it on a schedule, cache the result, and never put it on a request path. getProductOutSingle($id) is safe to call per-document. The 401 refresh path deserves attention under concurrency — if several workers hit an expired token simultaneously, confirm the package serialises the refresh or we will see a burst of refreshes and possible throttling. Cap concurrency on the client side until that is verified.

Failure modes.

  • Expired token under load — 401 refresh either resolves transparently or, if unserialised, multiplies into a refresh storm. Mitigate with a shared token store and bounded worker concurrency.
  • Vendor ex on a valid request — now thrown rather than returned; unhandled, these become 500s in our app. Every call site needs a catch.
  • Large rest() payload — memory and timeout risk on the job worker. Set an explicit timeout and stream or paginate if FINA supports it (per the notes, it does not appear to).
  • Silent shape drift — FINA changes a field inside products[] and nothing fails loudly. Assert on shape, not just on HTTP status.
  • Partial migration — some call sites on the package and some on raw HTTP will produce two different error behaviours for the same logical operation. Track the migration to completion.

Ramp-up. Low. A Laravel developer can integrate this in under a day; the new endpoints add perhaps two hours each including tests. The real ramp-up cost is domain knowledge — what "rest" means operationally, which stores matter, and how retail sale documents are keyed — and that belongs to whoever owns the FINA relationship, not to the package. Recommend one engineer owns the pin/review cadence and the ex-code mapping so it does not become everyone's part-time problem.

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.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel