ChronoPost Integration
ChronoPost handles express parcel delivery across France and Europe. The integration generates shipping labels via the ChronoPost SOAP API and synchronizes tracking data back into Logidav.
Components
| Component | File | Role |
|---|---|---|
ChronoPostApi | src/CoreBundle/Api/ChronoPostApi.php | SOAP API client |
ChronopostService | src/CoreBundle/Services/ChronopostService.php | Shipment business logic |
Configuration
Required parameters in parameters.yml:
chronopost:
account_number: "..."
password: "..."
wsdl_url: "https://ws.chronopost.fr/shipping-cxf/ShippingServiceWS?wsdl"
:::info SOAP-based integration
Unlike DPD which uses REST, ChronoPost uses a SOAP API. The ChronoPostApi client wraps the WSDL service and provides a simplified interface for label generation and tracking.
:::
Data Flow
Label Generation
ChronopostServicecollects order and address data from the selectedSaleProductrecordsChronoPostApibuilds the SOAP request with sender, recipient, and parcel details- The API returns a PDF label and a tracking number
- The label is saved to disk and the tracking number is stored on the
SaleProduct
Error Handling
| Scenario | Behavior |
|---|---|
| API timeout | Retry with exponential backoff |
| Invalid address | Shipment skipped; system alert raised |
| Authentication failure | Check credentials in parameters.yml |
| WSDL unavailable | Log error; retry on next attempt |
:::warning Address validation ChronoPost is strict about address formatting. Ensure recipient addresses include a valid postal code and country code before submitting. Invalid addresses will cause the SOAP call to fail. :::
Troubleshooting
SOAP connection errors
- Verify the WSDL URL is reachable:
curl -s <wsdl_url> | head - Check that PHP SOAP extension is enabled:
php -m | grep soap - Clear Symfony cache:
php bin/console cache:clear
Missing labels
- Check that the PDF storage directory is writable
- Verify the
ChronopostServicelogs for API response errors - Confirm the
SaleProducthas valid shipping address data