abdellahchatioui / erp-connector
Bagisto Erp Connector Package
v3.0.0
2026-05-26 11:34 UTC
Requires
- php: ^8.0
README
A powerful, secure integration package for Bagisto that enables seamless synchronization between your e-commerce store and an external ERP system.
Features
- Admin UI Configuration: Configure your ERP connection directly from the Bagisto Admin Panel.
- Secure Token Storage: API tokens are securely encrypted before being stored in the database.
- Connectivity Testing: Built-in "Test Connection" tool to verify your ERP backend is reachable.
- Product Synchronization: Receive product updates from your ERP via secure webhooks.
- Order Synchronization: Automatically push order details to your ERP via event listeners when an order is placed.
- Secure Webhooks: Built-in middleware to verify API tokens for all incoming requests.
Requirements
- Server: Apache 2 or NGINX
- Node.js: 23.10.0 LTS or higher
- PHP: 8.3 or higher
- Composer: 2.5 or higher
- MySQL: Version 8.0.32 or higher
- Keycloak: Running and accessible for JWT authentication
Installation
1. Install via Composer
In your Bagisto project root, run:
composer require abdellahchatioui/erp-connector:dev-main
2. Clear Cache
Clear the application cache so Bagisto auto-discovers the package and loads the new configuration UI:
php artisan optimize:clear php artisan config:cache
Configuration
We have removed the need for .env variables! All configuration is now securely managed via the Admin Panel.
- Log into your Bagisto Admin Panel.
- Navigate to Settings > Configuration > ERP Connector.
- Enter your ERP Backend URL (e.g.,
http://localhost:8080). - Enter your ERP Token.
- Click Save Settings.
- Click Test Connection to immediately verify that Bagisto can communicate with your ERP system.
API Endpoints
The package exposes the following webhook endpoints in Bagisto (prefixed with /api/erp):
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/erp/webhook/product |
Sync product data from ERP |
| POST | /api/erp/webhook/order |
Sync order data from ERP |
Note: All requests sent to Bagisto must include the X-ERP-TOKEN header matching the token saved in your Admin settings.
License
The MIT License (MIT). Please see License File for more information.