Docs: fix examples and claims (Maystro webhook, ZRExpressProvider, NoEST statuses…)

Merged
DE
17d ago
+78-22

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

FileFix
docs/guide-php.mdMaystro 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.mdSame ZRExpressProvider fix.
docs/CONTRACT.mduse 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.mdNoEST: 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 with track() instead of trusting the unsigned pushed status.
  • ZRExpressProvider examples are built from ClientOptions::fromArray() (the constructor requires it), and every product line includes quantity.
  • NoEST status keys are listed exactly instead of * wildcards, which neither mapper implements.
  • docs/CONTRACT.md gains the PHP interface imports, the Yalidine origin option (fromWilayaId/fromWilayaName; getFees can take it from the query), and per-provider https notes (Elogistia sends credentials in the query string).
  • README.md now 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 when track() fails.

Note: packages/php/README.md is also the package README synced to Packagist on the next release.