Search by

This package is abandoned and no longer maintained. No replacement package was suggested.

MSS API Client for PHP projects

Package info

github.com/bookingsuedtirol/mss-php

pkg:composer/bookingsuedtirol/mss-php

Statistics

Installs: 25

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 0

v6.5.2 2026-09-09 22:49 UTC

README

Packagist Version (including pre-releases)

⚠️ 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.