PHPackages                             myallocator/myallocator-php-sdk-ota - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. myallocator/myallocator-php-sdk-ota

ActiveLibrary[API Development](/categories/api)

myallocator/myallocator-php-sdk-ota
===================================

PHP SDK for OTA's to easily integrate with the MyAllocator OTA BuildToUs API

1.0.0(11y ago)137.2k↓42.1%6MITPHPPHP &gt;=5.3.2

Since Mar 10Pushed 3y ago6 watchersCompare

[ Source](https://github.com/MyAllocator/myallocator-ota-php)[ Packagist](https://packagist.org/packages/myallocator/myallocator-php-sdk-ota)[ Docs](https://www.myallocator.com/)[ RSS](/packages/myallocator-myallocator-php-sdk-ota/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

myallocator-ota-php
===================

[](#myallocator-ota-php)

MyAllocator BuildToUs API PHP SDK (JSON). Online Travel Agencies (OTA's) may use this SDK to quickly and reliably integrate with the MyAllocator BuildToUs API to enable distribution into their systems.

The MyAllocator BuildToUs API supports many OTA-inbound API's but only one OTA-outbound API (NotifyBooking). As a result, this SDK currently only implements the OTA-inbound API's defined in the MyAllocator BuildToUs API Documentation. You may implement the simple HTTP GET NotifyBooking API directly in your code base.

Note, this is not the PMS PHP SDK for PMS's. The PMS PHP SDK can be found at

MyAllocator BuildToUs API Version: 201503

MyAllocator BuildToUs API Documentation &amp; Integration Guide \[TODO\]

MyAllocator BuildToUs API PHP SDK Documentation \[\]

MyAllocator \[\]

MyAllocator Development Support \[\]

Requirements
------------

[](#requirements)

PHP 5.3.2 and later.

Documentation
-------------

[](#documentation)

Please see  for the complete and up-to-date SDK documentation.

Composer Installation
---------------------

[](#composer-installation)

You can install via composer. Add the following to your project's `composer.json`.

```
{
    "require": {
        "myallocator/myallocator-php-sdk-ota": "1.*"
    }
}

```

Then install via:

```
composer.phar install

```

To use the bindings, either use Composer's autoload \[\]:

```
require_once('vendor/autoload.php');

```

Or manually:

```
require_once('/path/to/vendor/MyAllocator/myallocator-php-sdk-ota/src/MyAllocator.php');

```

Manual Installation
-------------------

[](#manual-installation)

Grab the latest version of the SDK:

```
git clone https://github.com/MyAllocator/myallocator-ota-php.git

```

To use the bindings, add the following to a PHP script:

```
require_once('/path/to/myallocator-ota-php/src/MyAllocator.php');

```

Getting Started
---------------

[](#getting-started)

#### Installation and usage example with composer installation:

[](#installation-and-usage-example-with-composer-installation)

```
root@nate:/var/www# mkdir test
root@nate:/var/www# cd test/
root@nate:/var/www/test# echo '{"require": {"myallocator/myallocator-php-sdk-ota": "1.*"}}' > composer.json
root@nate:/var/www/test# composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing myallocator/myallocator-php-sdk-ota (1.0.0)
    Downloading: 100%
Writing lock file
Generating autoload files
root@nate:/var/www/test# cp vendor/myallocator/myallocator-php-sdk-ota/examples/Receiver/* .

```

Configure your host's webserver at the desired endpoint to point to /var/www/test/MaReceiver.php. Send in a health check :)

```
root@nate:/var/www/test# curl -v -H "Accept: application/json" -X POST -H "Content-Type: application/json" -d '{"verb":"HealthCheck", "mya_property_id":"123", "ota_property_id":"321", "shared_secret":"test"}' http://{your_ip}:{your_port}/
{"success":true,"errors":null}

```

#### Installation and usage example with manual installation:

[](#installation-and-usage-example-with-manual-installation)

```
root@nate:/var/www# mkdir -p test/lib
root@nate:/var/www# cd test/lib/
root@nate:/var/www/test/lib# git clone https://github.com/MyAllocator/myallocator-ota-php.git
Cloning into 'myallocator-ota-php'...
remote: Counting objects: 111, done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 111 (delta 38), reused 101 (delta 31), pack-reused 0
Receiving objects: 100% (111/111), 38.22 KiB | 0 bytes/s, done.
Resolving deltas: 100% (38/38), done.
Checking connectivity... done.
root@nate:/var/www/test/lib# cd ..
root@nate:/var/www/test# cp lib/myallocator-ota-php/examples/Receiver/* .

```

Edit require\_once autoload in line 12 to:

```
require_once(dirname(__FILE__) . '/lib/myallocator-ota-php/src/MyAllocator.php');

```

Configure your host's webserver at the desired endpoint to point to /var/www/test/MaReceiver.php. Send in a health check :)

```
root@nate:/var/www/test# curl -v -H "Accept: application/json" -X POST -H "Content-Type: application/json" -d '{"verb":"HealthCheck", "mya_property_id":"123", "ota_property_id":"321", "shared_secret":"test"}' http://{your_ip}:{your_port}/
{"success":true,"errors":null}

```

Configuration
-------------

[](#configuration)

The default configuration file can be found at at `src/MyAllocator/Config/MaConfig.php`. The following is configurable:

#### shared\_secret

[](#shared_secret)

The shared\_secret will be allocated to the OTA by MyAllocator after initial registration. The shared\_secret is used to authenticate the MA &lt;-&gt; OTA communication.

#### debugsEnabled

[](#debugsenabled)

Set `debugsEnabled` to true in `src/MyAllocator/Config/Config.php` to display request and response data in the SDK interface and API transfer data formats for an API request.

Integration
-----------

[](#integration)

This SDK is meant to be installed in the OTA's environment to act as an inbound API receiver for MyAllocator. It is not required for BuildToUs API integration, however, if an OTA is integrating via PHP we highly recommend utilizing the SDK to minimize integration time and costs.

The SDK consists of three primary parts: the receiver, SDK library, and backend interface (to be implemented by OTA).

#### Receiver

[](#receiver)

The receiver is located at `examples/Receiver/MaReceiver.php` and is the actual endpoint script that receives the request and forwards to the SDK library. It is optional for an OTA to utilize this receiver. If you have an existing framework for exposing endpoints, please feel free to continue using it and simply invoke the SDK library similar to the receiver example. If an existing mechanism is not available and you would like a quick solution, please feel free to use the included receiver.

#### SDK Library

[](#sdk-library)

The SDK library is located at `src/MyAllocator` and consists of the inbound API router, API definitions, backend interface definition, and required infrastructure.

#### Backend Interface

[](#backend-interface)

The SDK library includes a backend interface definition located at `src/MyAllocator/Api/Inbound/MaInboundInterface.php` which must be implemented by your environment so that the router (`MaRouter.php`) may forward requests to your backend system. You must instantiate an object of the class that implements this interface and pass it into the MaRouter object's construct during instantiation. Take a look at `examples/Receiver/MaInboundInterfaceStub.php` for a stub/example interface implementation and `examples/Receiver/MaReceiver.php` for how it is instantiated and passed into MaRouter.

It is worth explicitly noting, the backend interface implementations must return an MaResponse object to the calling router (as suggested by the docblocks).

Examples
--------

[](#examples)

Examples can be found in the `examples/` directory.

Tests
-----

[](#tests)

You can run phpunit tests from the top directory:

```
vendor/bin/phpunit --debug

```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4087d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb609e895a60633e71ddd3b67b33f1249e35146afd64e67614d3c8f58908ccf6?d=identicon)[myallocator](/maintainers/myallocator)

---

Top Contributors

[![nathanhelenihi](https://avatars.githubusercontent.com/u/3403276?v=4)](https://github.com/nathanhelenihi "nathanhelenihi (10 commits)")[![lgalecki75](https://avatars.githubusercontent.com/u/11096415?v=4)](https://github.com/lgalecki75 "lgalecki75 (1 commits)")[![mopagemo](https://avatars.githubusercontent.com/u/1155268?v=4)](https://github.com/mopagemo "mopagemo (1 commits)")

---

Tags

managerchannelmyallocator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/myallocator-myallocator-php-sdk-ota/health.svg)

```
[![Health](https://phpackages.com/badges/myallocator-myallocator-php-sdk-ota/health.svg)](https://phpackages.com/packages/myallocator-myallocator-php-sdk-ota)
```

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
