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

Ozon Orders Laravel Package

baks-dev/ozon-orders

Laravel module for managing Ozon marketplace orders with support for FBS and DBS schemes. Includes profile type, payment, and delivery console commands. Requires PHP 8.4+ and installs via Composer.

View on GitHub
Deep Wiki
Context7

Getting Started

Confirm the stack fit before anything else. baks-dev/ozon-orders ships Symfony Console commands (php bin/console ...) and is part of the BaksDev ecosystem. In a Laravel app you will not get php artisan commands for free — you'll either run them through a Symfony Console bridge or replicate the three setup calls in your own artisan commands/seeders. Verify this before you sell the package internally.

Minimum steps:

# 1. PHP 8.4+ is a hard floor — check first
php -v

# 2. Install (pin the exact version; releases are tiny and undocumented)
composer require baks-dev/ozon-orders:7.4.48

# 3. Pick your fulfilment model and run its three setup commands
#    FBS (fulfilment by seller, Ozon delivers)
php bin/console baks:users-profile-type:ozon-fbs
php bin/console baks:payment:ozon-fbs
php bin/console baks:delivery:ozon-fbs

#    DBS (seller delivers)
php bin/console baks:users-profile-type:ozon-dbs
php bin/console baks:payment:ozon-dbs
php bin/console baks:delivery:ozon-dbs

# 4. Run the packaged tests
php bin/phpunit --group=ozon-orders

Where to look first: the three commands are the entire documented surface area. Read their source under src/ (or vendor/baks-dev/ozon-orders/) before running them — they write rows into your profile-type, payment, and delivery tables, and the README states no migrations are shipped. Understand exactly what they insert, and into which tables, before you run them against anything that matters.

First use case to target: onboarding a single Ozon seller account in FBS on a staging database — run the three FBS commands, confirm the profile type, payment method, and delivery method appear in your admin, then place one real sandbox order end-to-end. That single loop exercises every part of the package the README actually describes. Add DBS only after FBS is green; treat them as separate rollouts, not one.

Also decide up front where Ozon credentials live (client_id / client_secret). The README doesn't say — assume you own this. Put them in .env + config/services.php, never in the repo.

Implementation Patterns

Treat the CLI commands as seed-like, environment-scoped setup — not as migrations. The cleanest pattern is a wrapper command or a php artisan ozon:setup --model=fbs --env=staging that shells out to the three BaksDev commands in the correct order (profile type → payment → delivery, since the latter two likely reference the profile type). Wire this wrapper into your deploy runbook so a fresh environment is reproducible, and guard it so it only runs once per environment.

Model-per-environment, not model-per-tenant, unless you've verified otherwise. The commands are global-looking (baks:delivery:ozon-fbs takes no tenant argument). Don't assume multi-seller support. If you need several Ozon accounts, spike this early on staging with two sets of credentials and see whether the second run collides with the first.

Pipeline ordering in CI:

- php -v                      # fail fast if < 8.4
- composer install --no-dev
- php bin/phpunit --group=ozon-orders   # cheap regression gate

The --group=ozon-orders suite is the only automated signal you get. Run it on every upgrade of the package — it's the closest thing to a changelog this project has.

Wrap everything you actually call day-to-day. The README documents setup only — it says nothing about order sync, webhooks, status transitions, or refunds. Assume those are either absent or undocumented. The practical pattern is a thin adapter layer of your own (App\Services\Ozon\Orders, Ozon\Payments) that owns retries, logging, and idempotency, and delegates to the package where it genuinely provides behaviour. This keeps the blast radius small if you fork or replace the package later — a real risk at 1 star and 0 dependents.

Queue Ozon API calls; never call them inline in a web request. Whether it's polling for new orders or reconciling payment state, put it behind a job with tries, backoff, and a dead-letter path. The package does not advertise circuit breakers or retries, so your job layer is the retry layer.

If you implement an Ozon webhook endpoint yourself (the package won't do it for you), make it idempotent from day one: persist the Ozon event ID in a unique column, return 200 fast, dispatch a job, and dedupe on replay. Ozon retries; you will see the same payload twice.

Feature-flag the integration per channel. Something like config('features.ozon_fbs') gating order creation and status callbacks lets you ship the package, run it against staging, and flip production without a redeploy — useful when you're unsure how the package behaves under your real order volume.

Gotchas and Tips

  • PHP 8.4+ is not negotiable. The badge is explicit. If your host or CI image is on 8.2/8.3, this package simply won't install cleanly. Check before you promise a timeline.
  • No migrations are shipped. The setup commands mutate your database directly. Back up, run on staging first, and diff the affected tables before and after. There is no documented dry-run mode — assume the answer to "what happens if I run baks:delivery:ozon-fbs twice?" is "unknown" until you test it. Test it on a scratch database.
  • Release notes are useless. v7.4.48 says "v7.4.48". The version cadence is aggressive. Pin the exact version in composer.json, and on every bump diff vendor/baks-dev/ozon-orders/ between tags rather than reading the changelog. Budget ~30 minutes per upgrade for this.
  • The docs are Russian-only, as is likely the CLI output. If your team isn't Russian-speaking, translate the three command descriptions and the README into an internal onboarding note before handover. Cheap now, expensive after the first support ticket.
  • bin/console is Symfony, not Artisan. Laravel developers will instinctively type php artisan. Don't assume the package registers service providers, facades, or config publishing — nothing in the README suggests it does. Verify what, if anything, gets auto-discovered.
  • Very low adoption signal: 1 star, 0 dependents, single maintainer. Do not build critical-path logic directly against this package's internals. Keep your own adapter layer, your own tests around the Ozon API contract (use Ozon's sandbox), and be prepared to fork. Write down the fork criteria now — e.g. "no release for 6 months" or "Ozon API v-change unaddressed".
  • Debugging entry point: since there are no documented event hooks or structured logs, add your own logging at the boundary — log every outbound Ozon request/response pair (redact secrets) and every package call result. When something goes wrong in production, this log is your only forensic trail.
  • Extension points are unclear by design. There's no documented service container tag, event, or interface to hook into. The realistic extensibility story is: decorate the package's services in your own container config, or fork. Do a 30-minute spike reading the package's src/ to confirm which classes are concrete vs. interface-backed before you design around it.
  • Watch Ozon API versioning yourself. Nothing in this package suggests deprecation handling or a version abstraction. Subscribe to Ozon's seller API changelog and set a recurring calendar reminder to check the package for matching updates. You are the monitoring system here.
  • Keep the --group=ozon-orders test run in CI permanently, even after go-live. It's the cheapest way to catch a breaking change during a routine composer update sweep before it reaches a customer order.
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.
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc