- How do I install and set up Yandex Market orders in Laravel?
- Run `composer require baks-dev/yandex-market baks-dev/yandex-market-orders`, then configure FBS or DBS profiles using console commands like `php bin/console baks:users-profile-type:yandex-market-fbs`. Install assets and migrations with `php bin/console baks:assets:install` followed by `php bin/console doctrine:migrations:migrate`.
- Does this package support both FBS and DBS Yandex Market schemes?
- Yes, the package supports both Fixed Buyer Scheme (FBS) and Dynamic Buyer Scheme (DBS). Use the respective console commands (`baks:users-profile-type:yandex-market-fbs` or `baks:users-profile-type:yandex-market-dbs`) to set up your preferred scheme.
- Will this package work with Laravel 10+ and PHP 8.4+?
- Yes, the package is optimized for Laravel 10+ and requires PHP 8.4+. Ensure your project meets these requirements before installation to avoid compatibility issues.
- Can I use this package with Eloquent if my app already uses it?
- No, this package relies on Doctrine ORM for migrations and database structure. If your app uses Eloquent, you’ll need to either switch to Doctrine or manually merge the schema changes, which may require custom migrations.
- How do I handle Yandex Market webhooks for order updates or payments?
- The package assumes webhook handling but lacks detailed documentation. You’ll need to implement stub handlers early and test them using Yandex’s sandbox environment. Consider extending the package’s service layer to integrate with Laravel’s built-in webhook routes.
- What if my existing order or payment tables conflict with the package’s migrations?
- The package enforces its own schema. To resolve conflicts, either extend your existing tables by adding Yandex-specific columns, use parallel schemas (e.g., `yandex_market_orders`), or replace existing models—though the latter risks breaking changes. Audit your schema before integration.
- Is there a way to customize order workflows, like partial refunds or custom delivery rules?
- The package provides limited extensibility. For custom logic, override services or use Laravel’s middleware/event system. However, complex workflows may require forking the package or extending its core classes.
- How do I test the package before going live?
- Run PHPUnit tests with `php bin/phpunit --group=yandex-market-orders`. For integration testing, mock Yandex API responses and simulate webhooks to validate order, payment, and delivery flows in a staging environment.
- What are the risks of using this package in production?
- Key risks include vendor lock-in due to tight coupling with `baks-dev/yandex-market`, schema conflicts if mixing ORMs, and undocumented webhook handling. Mitigate these by abstracting dependencies, auditing your database, and implementing fallback mechanisms for API failures.
- Are there alternatives for Yandex Market integration in Laravel?
- If you need more flexibility, consider building a custom integration using the official Yandex Market API or exploring packages like `spatie/laravel-webhooks` for webhook handling. However, this package is the most Laravel-native solution for Yandex Market order management.