Docs: fix examples and claims (Maystro webhook, ZRExpressProvider, NoEST statuses…)
Aligns the Markdown docs with the fixes already made on the site in #14. The errors were found by the review of #14 and checked against packages/ts and packages/php.
Docs
| File | Fix |
|---|---|
docs/guide-php.md | Maystro webhook: checks a secret in the URL (hash_equals), rejects a missing order id, and reads the order back with track() instead of trusting the pushed status (Maystro does not sign its requests). quantity on every product line. [] fallback for config() in the Laravel examples (otherwise a TypeError for a carrier with no config). ZRExpressProvider built from ClientOptions::fromArray() (the constructor requires ClientOptions). |
docs/ZREXPRESS.md, packages/php/README.md | Same ZRExpressProvider fix. |
docs/CONTRACT.md | use DzDelivery\Models\… imports in the PHP interface. Yalidine origin option (fromWilayaId / fromWilayaName, required by createParcel and getFees). HTTPS note: credentials travel in the query string for Elogistia, and only ecotrack/noest/ecom/mdm/elogistia reject non-https URLs. |
docs/PROVIDERS.md | NoEST: exact verssement_… / return_… keys instead of * wildcards, which neither mapper implements. |
README.md | "Switch carriers": only a configuration change for operations both carriers support; link to the matrix. |
Site
Also includes 8dba18c (cherry-picked from ccd55ce), which #14 missed because it was pushed after the merge: the Maystro webhook example on the site (php/, en/php/) rejects a missing order id and handles track() failures with a 502 response.
Note: packages/php/README.md is also the package README (synced to dz-delivery-php / Packagist on the next release).
🤖 Generated with Claude Code
Summary by cubic
Aligns the Markdown docs and site examples with the fixes made in #14, verified against packages/ts and packages/php.
- The Maystro webhook example checks a URL secret with
hash_equals, trims and rejects a missing order id, and reads the order back withtrack()instead of trusting the unsigned pushed status. ZRExpressProviderexamples are built fromClientOptions::fromArray()(the constructor requires it), and every product line includesquantity.- NoEST status keys are listed exactly instead of
*wildcards, which neither mapper implements. docs/CONTRACT.mdgains the PHP interface imports, the Yalidine origin option (fromWilayaId/fromWilayaName;getFeescan take it from the query), and per-provider https notes (Elogistia sends credentials in the query string).README.mdnow states that switching carriers is only a configuration change for operations both carriers support.- The site PHP examples (
php/,en/php/) include the same webhook fixes, including a 502 response whentrack()fails.
Note: packages/php/README.md is also the package README synced to Packagist on the next release.