Download the PHP package wishbox/cdek-library without Composer
On this page you can find all versions of the php package wishbox/cdek-library. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download wishbox/cdek-library
More information about wishbox/cdek-library
Files in wishbox/cdek-library
Download wishbox/cdek-library
More information about wishbox/cdek-library
Files in wishbox/cdek-library
Vendor wishbox
Package cdek-library
Short Description PHP library for working with CDEK-related functionality.
License MIT
Package cdek-library
Short Description PHP library for working with CDEK-related functionality.
License MIT
Please rate this library. Is it a good library?
Informations about the package cdek-library
wishbox/cdek-library
PHP 8.4 client for CDEK API with a modular structure around a shared CdekClient, PSR-18 HTTP support, request DTOs, and basic local validation for order creation.
Requirements
- PHP 8.4+
- PSR-18 HTTP client
- PSR-17 request and stream factories
Installation
This package expects a PSR-18 HTTP client and PSR-17 factories from your application.
Usage
Testing
Current unit tests cover:
- request DTO serialization
- auth token request formatting
- authenticated request building
- automatic token fetch before API calls
- typed async responses for
orders(),intakes(), andprints() - typed order details response for
orders()->getByUuid() - local validation for
orders()->create()
Current integration tests cover:
auth()->getOAuthToken()wrong password handling against CDEK sandboxlocations()->getRegions()against CDEK sandboxlocations()->getPostalcodes()against CDEK sandboxorders()->create()against CDEK sandboxorders()->getByUuid()against CDEK sandbox
To run integration tests against sandbox, set:
If credentials are missing, integration tests are skipped automatically.
Structure
WishboxCdek\CdekClient- config, auth, shared HTTP requests, PSR-18 integrationWishboxCdek\Api\AuthApi- OAuth tokenWishboxCdek\Api\LocationApi- cities, regions, postal codes, coordinatesWishboxCdek\Api\DeliveryPointApi- offices and pickup pointsWishboxCdek\Api\CalculatorApi- tariffs and cost calculationWishboxCdek\Api\OrderApi- create, update, get, delete ordersWishboxCdek\Api\IntakeApi- intake dates and courier intake requestsWishboxCdek\Api\PrintApi- order receipts, barcode print jobs, and barcode PDF downloadsWishboxCdek\Api\WebhookApi- webhook subscriptionsWishboxCdek\Request\...- request DTOs for all public API methodsWishboxCdek\Response\...- response DTOs for typed API resultsWishboxCdek\Validation\...- local validators for request prechecksWishboxCdek\Enum\...- enums for documented CDEK constants
Notes
- Production base URL:
https://api.cdek.ru - Sandbox base URL:
https://api.edu.cdek.ru - If
access_tokenis not passed explicitly, the client will request it automatically usingaccountandpassword - Laravel facade
Httpis not PSR-18 by itself - Joomla HTTP package can be used as a PSR-18 client
CreateOrderRequestuses immutable fluent builder-style API:make(...)+with...()OrderType::INTERNET_SHOPandOrderType::DELIVERYmap to the documented order typesИМandДоставкаHttpExceptionhandles transport and HTTP-level errors,ApiResponseExceptionhandles async business errors from successful CDEK responses with invalidrequests[*]OrderValidationExceptionis thrown before the HTTP call when local order validation fails- Async methods like
orders()->create(),intakes()->create(),prints()->createOrders(), andprints()->createBarcodes()return typed async response objects withentityandrequests orders()->getByUuid()returns a typedOrderDetailsobject withentityandextraprints()->downloadBarcodesPdf()returns the raw PDF body for/v2/print/barcodes/{uuid}.pdf- Built-in local validation currently knows destination rules for tariffs
136,137,138, and139
All versions of cdek-library with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.4
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^2.0
ext-ctype Version *
ext-simplexml Version *
ext-http Version *
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^2.0
ext-ctype Version *
ext-simplexml Version *
ext-http Version *
The package wishbox/cdek-library contains the following files
Loading the files please wait ...