bookingsuedtirol / mss-php
MSS API Client for PHP projects
Requires
- php: >=8.3
- jms/serializer: ^3.32
- php-http/client-common: ^2.7.2
- php-http/discovery: ^1.20
- psr/http-client: ^1.0.3
Requires (Dev)
- glynnforrest/crutches: ^0.4
- kriswallsmith/buzz: ^1.3
- nyholm/psr7: ^1.8.2
- phpunit/phpunit: ^12.5
- vlucas/phpdotenv: ^5.6.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v6.5.2
- v6.5.1
- v6.5.0
- v6.4.0
- v6.3.0
- v6.2.0
- v6.1.0
- v6.0.0
- v5.0.1
- v5.0.0
- v4.0.0
- v3.4.0
- v3.3.0
- v3.2.0
- v3.1.1
- v3.1.0
- v3.0.0
- v2.4.1
- v2.4.0
- v2.3.0
- v2.2.1
- v2.2.0
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.0
- v2.0.0-beta.3
- v2.0.0-beta.2
- v2.0.0-beta.1
- v1.x-dev
- v1.7.3
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.1
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.0
- v1.0.0
This package is auto-updated.
Last update: 2026-09-09 22:51:22 UTC
README
⚠️ Deprecated
This package is deprecated and no longer maintained.
None of our projects use it any more. There will be no further releases, including bug fixes and security fixes. The code stays here for reference, and existing installs keep working, but do not start anything new with it.
Our MSS client work continues in mss-go.
MSS API Client for PHP projects. Only supports MSS 2.0!
Installation
PHP version requirement: 8.1 or greater.
The MSS API Client is not hard coupled to Guzzle, Buzz or any other library that sends HTTP messages. Instead, it uses the PSR-18 client abstraction. This will give you the flexibility to choose what PSR-7 implementation and HTTP client you want to use.
composer require bookingsuedtirol/mss-php kriswallsmith/buzz nyholm/psr7
Available methods
- getHotelList
- getSpecialList
- getRoomList
- getPriceList
- getRoomAvailability
- prepareBooking
- getBooking
- createInquiry
- getUserSources
- getLocationList
- getMasterpackagesList
- getThemeList
- validateCoupon
Example
<?php require __DIR__ . "/vendor/autoload.php"; use Crutches\Bitmask; use MssPhp\Client; use MssPhp\Bitmask\HotelDetails; $client = new Client([ "user" => "username", "password" => "password", "source" => "source", ]); $res = $client->request(function ($req) { $req->header->method = "getHotelList"; $req->request->search->id = ["11230"]; $req->request->options->hotel_details = (new Bitmask( HotelDetails::BASIC_INFO | HotelDetails::COORDINATES ))->getBitmask(); }); $hotel = $res["result"]["hotel"][0]; $hotel["name"]; // => string(18) "Hotel Lichtenstern" $hotel["stars"]; // => float(3) $hotel["geolocation"]["latitude"]; // => float(46.53063158978)
Check out the examples directory for more advanced usage.
Exception handling
If the MSS returns an error response, a MssException exception is thrown.
<?php use MssPhp\Exception; // ... try { $res = $client->request(function ($req) { // ... }); } catch (Exception\MssException $e) { $e->getMessage(); // => string(50) "Invalid value '2016-04-08' for parameter 'arrival'" $e->getCode(); // => int(32) $e->getResponse()->getStatusCode(); // => int(400) }
Development
Run docker compose run --rm cli bash.
If you experience permission issues with some files in this folder,
change the USER_ID and GROUP_ID values inside Dockerfile.
Automated tests
Run composer test inside the Docker container.