maksekeskus / php-shipping-sdk
MakeCommerce PHP shipping SDK
Requires
- php: >=7.4
- ext-json: *
- guzzlehttp/guzzle: ^7.8
Requires (Dev)
- phpmd/phpmd: ^2.15
- phpstan/phpstan: ^1.11
- squizlabs/php_codesniffer: ^3.10
- symfony/var-dumper: 5.4.39
- dev-main
- 1.5.5
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.9
- 1.4.8
- 1.4.7
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.3
- 1.3.2
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.0
- dev-MODULE-1218-make-php-shipping-sdk-headers-all-lowercase
- dev-dev
- dev-MODULE-1279-Update-PHP-shipping-SDK-add-base-url-as-optional-parameter-to-connect-request
- dev-MODULE-1182-update-shipping-sdk-sample-folder
- dev-MODULE-1147-Implement-cache-key-for-shipping-SDK
- dev-MODULE-1126-update-subscription-cancel-in-manager
- dev-MODULE-996-add-label-size-support
- dev-MODULE-938-upgrade-downgrade-shipping-in-manager
- dev-GET_RATES_HEADERS
- dev-MODULE-998-carrier-credentials-validation-endpoint
- dev-PLATFORM_INFO
- dev-LOCALE_HEADER
- dev-PARSE_WEIGHT_PARAM
- dev-MODULE-1054_SDK_Manager_updates
- dev-MODULE-1039_Flatten_API_structure
- dev-MODULE-1036_SDK_shipment_updates
- dev-MODULE-997_Update_Shipping_SDK
- dev-MODULE-943_SDK_refactoring
- dev-dependabot/composer/phpstan/phpstan-tw-1.11
- dev-dependabot/composer/squizlabs/php_codesniffer-tw-3.10
- dev-dependabot/composer/symfony/var-dumper-5.4.39
- dev-dependabot/composer/guzzlehttp/guzzle-tw-7.8
This package is not auto-updated.
Last update: 2026-05-06 22:12:48 UTC
README
Set up:
Please see samples in "sample" directory
<?php require '../vendor/autoload.php'; use MakeCommerceShipping\SDK\Environment; use MakeCommerceShipping\SDK\Http\MakeCommerceClient; $metaData = [ "module" => "WooCommerce", "module_version" => "3.2", "platform" => "Wordpress", "platform_version" => "5.1" ]; // Obligatory platform Meta data $mcs = new MakeCommerceClient( Environment::TEST, 'f7741ab2-7445-45f9-9af4-0d0408ef1e4c', // shopId 'pfOsGD9oPaFEILwqFLHEHkPf7vZz4j3t36nAcufP1abqT9l99koyuC1IWAOcBeqt', //secretKey $metaData );
To get your API keys, please visit merchant.test.maksekeskus.ee or merchant.maksekeskus.ee
environment
Set Environment::TEST or ::LIVE and store credentials what belong to current environment
shopId
Retrieved from merchant.test.maksekeskus.ee or merchant.maksekeskus.ee
secretKey
Retrieved from merchant.test.maksekeskus.ee or merchant.maksekeskus.ee
How to use:
Copy the contents of the repository to your desired location (preferably in the same folder where the implementation is located)
Following line:
require __DIR__ . '/vendor/autoload.php';
needs to be added to the file which is implements shipments logic or some bootstrap file
Main SDK logic is located in following namespace
use MakeCommerceShipping\SDK\Http\MakeCommerceClient;
Example
<?php require '../vendor/autoload.php'; use MakeCommerceShipping\SDK\Environment; use MakeCommerceShipping\SDK\Http\MakeCommerceClient; $metaData = [ "module" => "WooCommerce", "module_version" => "3.2", "platform" => "Wordpress", "platform_version" => "5.1" ]; $mcs = new MakeCommerceClient( Environment::TEST, 'f7741ab2-7445-45f9-9af4-0d0408ef1e4c', 'pfOsGD9oPaFEILwqFLHEHkPf7vZz4j3t36nAcufP1abqT9l99koyuC1IWAOcBeqt', $metaData ); $parcelMachines = $mcs->getParcelmachines(); ?>
To run the application in development, you can run these commands
composer start
Or you can use docker-compose to run the app with docker, so you can run these commands:
cd [my-app-name]
docker-compose up -d
After that, open http://localhost:8080 in your browser.