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

Shippingbo Laravel Package

splash/shippingbo

Laravel integration for ShippingBo that wraps the ShippingBo API in a clean, configurable client. Manage orders, shipments, and logistics data from your PHP application with familiar Laravel conventions, simple setup, and straightforward syncing of fulfillment workflows.

View on GitHub
Deep Wiki
Context7

Getting Started

This is a Splash connector bundle — a thin, framework-agnostic PHP client around the ShippingBo OpenAPI, packaged as a Symfony bundle that happens to be installable in a Laravel app. There is no Laravel service provider, no facade, no config publishing. Assume you are wiring it yourself.

Minimal path:

  1. composer require splash/shippingbo — expect it to pull in splash/connector (the base HTTP/transport layer) and a PSR client such as Guzzle. If the dependency graph fights with your Laravel version, stop and check composer.json in the repo before going further; the "Embedded" suffix usually means the bundle is meant to be pulled into a host Splash application, not a standalone one.
  2. Read, in this order:
    • composer.json — required PHP version, Symfony bundle dependencies, transport library.
    • src/ — find the main connector class (usually ShippingBo or ShippingBoConnector) and the Resources/ or Service/ directory. The resource classes are the API surface; everything else is plumbing.
    • Any DependencyInjection/ or *.yaml file — this tells you the exact config keys the bundle expects (endpoint, credentials, timeout).
  3. Authenticate. ShippingBo's OpenAPI typically issues a token via a login call, or accepts an API key header. Look at the connector constructor for $login/$password/$token parameters and any login() / auth() method. Call it once in tinker and dump the raw response before assuming the shape.
  4. First real use case: read products or stock, not writes. Hit the products/stock resource, dd() the hydrated DTOs, and confirm field names match ShippingBo's docs. Writes (order injection) are where you'll burn time debugging; do them second.

Don't try to boot the Symfony bundle in Laravel. Instantiate the connector class directly with new inside a small wrapper service, or via a manual binding in a service provider. That's the whole integration.

Implementation Patterns

Bind it once, inject everywhere. The connector is stateful (it holds an authenticated session/token). Register it as a singleton in a service provider, not a fresh instance per call:

$this->app->singleton(ShippingBo::class, fn () => new ShippingBo(
    baseUrl: config('services.shippingbo.url'),
    login:   config('services.shippingbo.login'),
    password: config('services.shippingbo.password'),
));

Put SHIPPINGBO_* keys in config/services.php, not config/app.php, and never in the repo.

Wrap it in a domain service. Never let the connector leak into controllers. One ShippingBoService with intention-revealing methods (pushOrder(Order $order), getStock(string $sku)) gives you a single seam to mock in tests and a single place to log request IDs.

Queue every write. Order creation, stock adjustments, shipment confirmations — all of these belong in a job with $tries, $backoff, and an idempotency key. ShippingBo is an external system on the other side of a network call; synchronous writes in a request cycle will bite you at the worst time. Dispatch with a dedicated queue so a slow fulfillment API doesn't starve your mail queue.

Map with explicit DTOs, not arrays. The connector returns hydrated objects (Splash convention) whose property names track the OpenAPI schema. Write a mapper class per entity — App\ShippingBo\Mappers\OrderMapper — that converts your Eloquent model into the payload the resource class expects. When ShippingBo changes a field name, you edit one mapper, not forty call sites.

Idempotent order push. Store the ShippingBo order reference on your local order row before/after the push, and check it first:

if ($order->shippingbo_ref) {
    return; // already pushed
}
$response = $this->client->orders()->create($mapper->toPayload($order));
$order->update(['shippingbo_ref' => $response->reference]);

Stock sync as a scheduled command. Pull stock levels on a schedule (->hourly()), diff against local inventory, and write the delta. Don't mirror the whole catalog every run — page through results and use updatedSince/date filters if the resource exposes them.

Webhooks over polling where available. If ShippingBo offers webhook callbacks for shipment/status events, register a route, verify the signature (if any) in middleware, and queue the handling. Keep polling as a reconciliation job, not the primary path.

Multi-account. If you ship for several ShippingBo accounts, don't share the singleton — register a factory that returns a keyed connector per account, and pass the account through the job payload.

Gotchas and Tips

  • The bundle is not Laravel-native. There's no publishes(), no auto-discovery. If you see Extension/Configuration classes, they're for Symfony's DI container and are dead weight in Laravel — ignore them, instantiate directly.
  • "Embedded" is a warning sign, not a feature. It means this package was extracted from a larger Splash host app and may assume services, HTTP clients, or config that only exist there. Expect to satisfy a couple of undocumented constructor args.
  • Zero stars, zero dependents, no releases. Pin the exact commit in composer.json ("dev-main#abc1234" or a VCS repository entry). A composer update on a floating branch can silently change API signatures with no changelog to warn you.
  • Auth tokens expire. If the connector holds a token internally, long-running queue workers will eventually start throwing 401s. Either instantiate per job, or add a small reconnect() on auth failure — check whether the base connector already retries once before you build it.
  • Rate limits are real. ShippingBo throttles. The base Splash connector usually doesn't back off for you. Add a Guzzle middleware or a job-level release() on 429, and log the Retry-After header.
  • Timezone and date formats. French fulfillment APIs frequently use Europe/Paris and either ISO 8601 or d/m/Y. Verify against a real sandbox response rather than trusting the schema; converting a date wrong produces silently misplaced shipments.
  • SKU matching is the #1 source of production bugs. Your internal SKU, the ShippingBo product reference, and the supplier EAN are three different fields. Build a lookup table and fail loudly on unmatched SKUs instead of pushing a half-formed order.
  • Response hydration failures look like transport failures. If a new API field lands, the hydrator may throw deep inside the connector with an opaque message. Wrap calls and log $e->getPrevious() plus the raw body where you can capture it.
  • Debug with raw HTTP first. Before blaming your mapper, run the equivalent curl against the sandbox. If that succeeds and the connector fails, it's the payload shape; if both fail, it's credentials or the endpoint.
  • No test suite guarantee. Treat the package as untested. Write your own contract tests against a recorded fixture set (use Http::fake() at the Guzzle layer or vcr-style recording) so a bump doesn't silently break you.
  • Extension point is the HTTP client. Most Splash connectors let you inject a ClientInterface. That's your hook for logging, retries, and mocking — swap it in the singleton binding rather than forking the package.
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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package