misaf/vendra-api
Laravel integration for the Vendra API. This package provides a simple, fluent wrapper around Vendra's endpoints, letting PHP applications authenticate, send requests, and handle responses with minimal boilerplate. Install via Composer and configure your credentials to get started quickly.
ApiResource DTOs and service-provider wiring that every domain API module (vendra-product-api, vendra-cart-api, vendra-faq-api, vendra-blog-api, vendra-multimedia-api, vendra-custom-page-api) is built on. Adopting this is a platform decision, not a library choice.Adopt when:
Http::fake() testing and event-based logging come free.Look elsewhere when:
misaf/vendra, this repo is read-only), and the v1.12.3 release note is a bare compare link — two minor versions with no described changes. Treat minor bumps as potentially config-breaking and read diffs before upgrading.For executives. This is integration glue, not product. Adoption cost is one composer require, a published config file, and .env keys — days, not weeks. The real cost is the dependency: a 1-star, single-maintainer package that ships without meaningful release notes, which means upgrade risk we can't read in advance. We contain that by wrapping it behind our own client class and testing at the HTTP layer, so replacing it later is a one-file change. Recommendation: adopt only if Vendra is already committed on the roadmap; otherwise defer. No revenue, retention, or differentiation impact either way.
For engineering. Wrap, don't sprinkle: bind our own VendraClient, constructor-inject it, and depend on that — never on Misaf\VendraApi\... — in controllers and jobs. Bind it scoped, not singleton, so a per-tenant token can't leak across requests. Resolve from the container in application code; facades are for spikes. Split reads from writes: cache reference data with a credential-aware cache key, push writes onto queued jobs with $tries, $backoff, and a failed() handler that surfaces the vendor error body. Set an explicit timeout below the worker --timeout. Retry idempotent verbs aggressively on 429/503, never on POSTs that may have already succeeded and never on 4xx auth/validation. Normalize vendor payloads into readonly DTOs at the boundary and translate vendor error codes into our own exception types. Log outbound calls via Illuminate\Http\Client\Events\* with a correlation ID we also carry in our logs, and scrub auth headers and PII — they land in debug output and failed_jobs payloads. Test with Http::fake() against one recorded success and one recorded error fixture; assert the mapping, not the JSON. Run php artisan config:clear after every upgrade.
How can I help you explore Laravel packages today?