PHPackages                             iabduul7/laravel-themepark-booking-adapters - 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. iabduul7/laravel-themepark-booking-adapters

ActiveLibrary[API Development](/categories/api)

iabduul7/laravel-themepark-booking-adapters
===========================================

A Laravel package providing unified booking adapters for theme park providers like Redeam, SmartOrder, and others

v1.1.0(5mo ago)00[5 PRs](https://github.com/iabduul7/laravel-themepark-booking-adapters/pulls)MITPHPPHP ^8.1CI passing

Since Dec 2Pushed 5mo agoCompare

[ Source](https://github.com/iabduul7/laravel-themepark-booking-adapters)[ Packagist](https://packagist.org/packages/iabduul7/laravel-themepark-booking-adapters)[ Docs](https://github.com/iabduul7/laravel-themepark-booking-adapters)[ GitHub Sponsors](https://github.com/iabduul7)[ RSS](/packages/iabduul7-laravel-themepark-booking-adapters/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (17)Versions (9)Used By (0)

Laravel Theme Park Booking Adapters
===================================

[](#laravel-theme-park-booking-adapters)

[![Latest Version on Packagist](https://camo.githubusercontent.com/64600adbca64d0cec30cf88c66cf2084e31c116f92fce10620e9e684c1315d64/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6961626475756c372f6c61726176656c2d7468656d657061726b2d626f6f6b696e672d61646170746572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/iabduul7/laravel-themepark-booking-adapters)[![GitHub Tests Action Status](https://camo.githubusercontent.com/7a376bb7f1c9d851e7e79a89ee3e91db50f842760a0747a6a82b4239617334a5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6961626475756c372f6c61726176656c2d7468656d657061726b2d626f6f6b696e672d61646170746572732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/iabduul7/laravel-themepark-booking-adapters/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub PHPStan Action Status](https://camo.githubusercontent.com/02520f0d40e3234382b0888b2abb48f0b76960a1543c53408835924b80392155/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6961626475756c372f6c61726176656c2d7468656d657061726b2d626f6f6b696e672d61646170746572732f7068707374616e2e796d6c3f6272616e63683d646576266c6162656c3d7068707374616e267374796c653d666c61742d737175617265)](https://github.com/iabduul7/laravel-themepark-booking-adapters/actions?query=workflow%3Aphpstan+branch%3Adev)[![Total Downloads](https://camo.githubusercontent.com/54e9bdeb798b70856823c16b63eb86807654abe6659b5a80c9f34143e4bd36d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6961626475756c372f6c61726176656c2d7468656d657061726b2d626f6f6b696e672d61646170746572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/iabduul7/laravel-themepark-booking-adapters)

A comprehensive Laravel package providing unified booking adapters for major theme park providers including Disney World (via Redeam), Universal Studios (via SmartOrder), and United Parks. This package provides a clean, consistent interface for handling theme park bookings, managing order details, and processing vouchers.

Features
--------

[](#features)

- 🎢 **Multiple Provider Support**: Disney World, Universal Studios, United Parks, SeaWorld
- 🔄 **Unified Interface**: Consistent API across all booking providers
- 📊 **Order Management**: Complete order details tracking with relationships
- 🎫 **Voucher Generation**: Automated voucher creation and management
- ⚡ **Performance Optimized**: Built-in caching, rate limiting, and circuit breakers
- 🔍 **Query Scopes**: Pre-built scopes for Disney, Universal, and United Parks product filtering
- 📝 **Rich Documentation**: Comprehensive examples and configuration
- 🧪 **Full Test Coverage**: Reliable and well-tested codebase
- 🔧 **Easy Installation**: One-command setup with migrations and configuration

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require iabduul7/laravel-themepark-booking-adapters
```

For development work, you'll also need to install Node.js dependencies:

```
pnpm install
```

You can publish the config file with:

```
php artisan vendor:publish --tag="themepark-booking-config"
```

This is the contents of the published config file:

```
return [
    'adapters' => [
        'redeam_disney' => [
            'driver' => 'redeam',
            'park_type' => 'disney',
            'base_url' => env('REDEAM_BASE_URL', 'https://booking.redeam.io/v1.2'),
            'api_key' => env('REDEAM_DISNEY_API_KEY'),
            'api_secret' => env('REDEAM_DISNEY_API_SECRET'),
            'supplier_id' => env('REDEAM_DISNEY_SUPPLIER_ID'),
            'timeout' => 600,
        ],
        'redeam_united' => [
            'driver' => 'redeam',
            'park_type' => 'united_parks',
            'base_url' => env('REDEAM_BASE_URL', 'https://booking.redeam.io/v1.2'),
            'api_key' => env('REDEAM_UNITED_API_KEY'),
            'api_secret' => env('REDEAM_UNITED_API_SECRET'),
            'timeout' => 600,
        ],
        'smartorder' => [
            'driver' => 'smartorder',
            'base_url' => env('SMARTORDER_BASE_URL', 'https://QACorpAPI.ucdp.net'),
            'client_username' => env('SMARTORDER_CLIENT_USERNAME'),
            'client_secret' => env('SMARTORDER_CLIENT_SECRET'),
            'customer_id' => env('SMARTORDER_CUSTOMER_ID', 134853),
            'approved_suffix' => env('SMARTORDER_APPROVED_SUFFIX', '-2KNOW'),
            'timeout' => 600,
        ],
    ],
    'default' => env('THEMEPARK_BOOKING_DEFAULT_ADAPTER', 'redeam_disney'),
];
```

Usage
-----

[](#usage)

### Basic Configuration

[](#basic-configuration)

Add these environment variables to your `.env` file:

```
# Redeam API (Disney World)
REDEAM_DISNEY_API_KEY=your_disney_api_key
REDEAM_DISNEY_API_SECRET=your_disney_api_secret
REDEAM_DISNEY_SUPPLIER_ID=your_disney_supplier_id

# Redeam API (Universal Parks)
REDEAM_UNITED_API_KEY=your_united_api_key
REDEAM_UNITED_API_SECRET=your_united_api_secret

# SmartOrder API
SMARTORDER_CLIENT_USERNAME=your_smartorder_client_id
SMARTORDER_CLIENT_SECRET=your_smartorder_client_secret
SMARTORDER_CUSTOMER_ID=134853
```

### Using the Independent HTTP Clients

[](#using-the-independent-http-clients)

The package includes self-contained HTTP clients that don't depend on external packages:

#### Redeam HTTP Client

[](#redeam-http-client)

```
use iabduul7\LaravelThemeparkBookingAdapters\Http\RedeamHttpClient;

$client = new RedeamHttpClient(
    baseUrl: 'https://booking.redeam.io/v1.2',
    apiKey: 'your_api_key',
    apiSecret: 'your_api_secret',
    timeout: 600
);

// Make API calls directly
$suppliers = $client->get('suppliers');
$products = $client->get('suppliers/123/products');
$booking = $client->post('suppliers/123/bookings', $bookingData);
```

#### SmartOrder HTTP Client

[](#smartorder-http-client)

```
use iabduul7\LaravelThemeparkBookingAdapters\Http\SmartOrderHttpClient;

$client = new SmartOrderHttpClient(
    baseUrl: 'https://QACorpAPI.ucdp.net',
    clientId: 'your_client_username',
    clientSecret: 'your_client_secret',
    customerId: 134853,
    timeout: 600
);

// Automatic OAuth2 token management
$catalog = $client->get('smartorder/MyProductCatalog');
$events = $client->post('smartorder/FindEvents', $searchParams);
$order = $client->post('smartorder/PlaceOrder', $orderData);
```

API Authentication
------------------

[](#api-authentication)

### Redeam API Authentication

[](#redeam-api-authentication)

- Uses **X-API-Key** and **X-API-Secret** headers
- GET requests send data as form parameters
- POST/PUT requests send data as JSON
- 600-second timeout by default

### SmartOrder API Authentication

[](#smartorder-api-authentication)

- Uses **OAuth2 Client Credentials** flow
- Automatic token refresh and caching
- Bearer token authentication
- Customer ID embedded in requests

Product Filtering Scopes
------------------------

[](#product-filtering-scopes)

The package provides three traits with pre-built query scopes for different theme park providers:

### HasDisneyScopes

[](#hasdisneyscopes)

Add Disney-specific filtering to your Product model:

```
use iabduul7\ThemeParkBooking\Concerns\HasDisneyScopes;

class Product extends Model
{
    use HasDisneyScopes;
}

// Usage examples
$disneyProducts = Product::disneyWorld()->get();
$magicKingdom = Product::disneyMagicKingdom()->get();
$epcot = Product::disneyEpcot()->get();
$hollywoodStudios = Product::disneyHollywoodStudios()->get();
$animalKingdom = Product::disneyAnimalKingdom()->get();
$waterParks = Product::disneyWaterPark()->get();
$parkHopper = Product::disneyParkHopper()->get();
$genie = Product::disneyGenie()->get();
$specialEvents = Product::disneySpecialEvent()->get();
```

### HasUniversalScopes

[](#hasuniversalscopes)

Add Universal Studios-specific filtering:

```
use iabduul7\ThemeParkBooking\Concerns\HasUniversalScopes;

class Product extends Model
{
    use HasUniversalScopes;
}

// Usage examples
$promoProducts = Product::universalPromo()->get();
$expressPass = Product::universalExpressPass()->get();
$datedTickets = Product::universalDated()->get();
$hhn = Product::universalHHN()->get(); // Halloween Horror Nights
$volcanoBay = Product::universalVolcanoBay()->get();
$islandsOfAdventure = Product::universalIslandsOfAdventure()->get();
$universalStudios = Product::universalStudios()->get();
$multiDay = Product::universalMultiDay()->get();
```

### HasUnitedParksScopes

[](#hasunitedparksscopes)

Add United Parks (SeaWorld, Busch Gardens) filtering:

```
use iabduul7\ThemeParkBooking\Concerns\HasUnitedParksScopes;

class Product extends Model
{
    use HasUnitedParksScopes;
}

// Usage examples
$unitedParks = Product::unitedParks()->get();
$seaWorld = Product::seaWorld()->get();
$seaWorldOrlando = Product::seaWorldOrlando()->get();
$seaWorldSanDiego = Product::seaWorldSanDiego()->get();
$buschGardens = Product::buschGardens()->get();
$buschGardensTampa = Product::buschGardensTampa()->get();
$buschGardensWilliamsburg = Product::buschGardensWilliamsburg()->get();
$aquatica = Product::aquatica()->get();
$adventureIsland = Product::adventureIsland()->get();
$multiPark = Product::unitedParksMultiPark()->get();
$seasonPass = Product::unitedParksSeasonPass()->get();
$vip = Product::unitedParksVIP()->get();
$dining = Product::unitedParksDining()->get();
$parking = Product::unitedParksParking()->get();
$specialEvents = Product::unitedParksSpecialEvent()->get();
$waterParks = Product::unitedParksWaterPark()->get();
```

### Using Multiple Scopes

[](#using-multiple-scopes)

You can combine multiple scope traits for comprehensive filtering:

```
class Product extends Model
{
    use HasDisneyScopes, HasUniversalScopes, HasUnitedParksScopes;
}

// Filter by park type
$disneyProducts = Product::disneyWorld()->get();
$universalProducts = Product::universalExpressPass()->get();
$unitedParksProducts = Product::seaWorld()->get();

// Negate scopes (exclude products)
$nonDisneyProducts = Product::disneyWorld(true)->get(); // negate = true
$nonPromo = Product::universalPromo(true)->get();
```

Error Handling
--------------

[](#error-handling)

The package provides comprehensive error handling:

```
use iabduul7\ThemeParkBooking\Exceptions\AdapterException;
use iabduul7\ThemeParkBooking\Exceptions\BookingException;
use iabduul7\ThemeParkBooking\Exceptions\ConfigurationException;

try {
    $adapter = new RedeamAdapter('disney', $config);
    $products = $adapter->getAllProducts();
} catch (ConfigurationException $e) {
    // Handle configuration issues
    Log::error('Configuration error: ' . $e->getMessage());
} catch (AdapterException $e) {
    // Handle adapter-specific issues
    Log::error('Adapter error: ' . $e->getMessage());
} catch (BookingException $e) {
    // Handle booking-related errors
    Log::error('Booking error: ' . $e->getMessage());
}
```

Development
-----------

[](#development)

### Initial Setup

[](#initial-setup)

After cloning the repository, install dependencies and set up git hooks:

```
# Install PHP dependencies
composer install

# Install Node.js dependencies (using pnpm)
pnpm install

# IMPORTANT: Manually install git hooks for code quality enforcement
pnpm run hooks:install
```

### Git Hooks

[](#git-hooks)

This package uses git hooks to maintain code quality:

- **Pre-commit hook**: Automatically checks PHP code style using Laravel Pint
- **Pre-push hook**: Runs tests before pushing to ensure code quality

If you encounter style issues during commit, fix them with:

```
composer format
```

To uninstall git hooks (if needed):

```
pnpm run hooks:uninstall
```

Testing
-------

[](#testing)

Run the tests with:

```
composer test
```

Run specific test suites:

```
# Unit tests only
composer test:unit

# Feature tests only
composer test:feature

# With coverage report
composer test:coverage

# HTML coverage report
composer test:coverage-html
```

Code Style
----------

[](#code-style)

Check code style:

```
composer format:check
```

Fix code style issues:

```
composer format
```

**Note**: Code style is automatically enforced via git hooks. Commits will be blocked if style violations are detected.

Static Analysis
---------------

[](#static-analysis)

Run static analysis:

```
composer analyse
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Abdullah](https://github.com/iabduul7)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance72

Regular maintenance activity

Popularity0

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63% 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

Every ~0 days

Total

2

Last Release

162d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc056cb14243e9c095935dd51acd334fb0a7bdbec31472295930ea0489dc7527?d=identicon)[iabduul.7](/maintainers/iabduul.7)

---

Top Contributors

[![iabduul7](https://avatars.githubusercontent.com/u/24309704?v=4)](https://github.com/iabduul7 "iabduul7 (46 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (12 commits)")[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (3 commits)")

---

Tags

laraveladaptersticketsbookingiabduul7theme-parkredeamsmartorder

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/iabduul7-laravel-themepark-booking-adapters/health.svg)

```
[![Health](https://phpackages.com/badges/iabduul7-laravel-themepark-booking-adapters/health.svg)](https://phpackages.com/packages/iabduul7-laravel-themepark-booking-adapters)
```

###  Alternatives

[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[njoguamos/laravel-plausible

A laravel package for interacting with plausible analytics api.

208.8k](/packages/njoguamos-laravel-plausible)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)[combindma/laravel-facebook-pixel

Meta pixel integration for Laravel

4956.9k](/packages/combindma-laravel-facebook-pixel)

PHPackages © 2026

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