Download the PHP package flairuk/laravel-booking-com without Composer

On this page you can find all versions of the php package flairuk/laravel-booking-com. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-booking-com

PHP 8.2+  Laravel 12 or 13  Lint  Tests  Downloads on Packagist  MIT licence  Demand API v3.2 
 

**Laravel Booking.com** — A Laravel 12 and 13 client for the [Booking.com Demand API](https://developers.booking.com/demand/docs), for affiliates and travel sites that search, show and book Booking.com stays and car rentals. - **Every stable endpoint.** Covers accommodation search, availability, content, reviews and changes; locations; orders (preview, create, modify, cancel); car rentals; and messaging. - **Pagination built in.** Any paginated result can be walked with `->lazy()`, which fetches the next page only when you reach it. - **Rate-limit friendly.** Reference data is cached. A `429` raises a `RateLimitException` that tells you how long to wait. - **Safe retries.** Reads are retried on connection errors and 5xx responses. Order creation, changes and cancellations never are, so nothing is booked or cancelled twice. - **Real errors.** Failures throw exceptions carrying Booking.com's error ids and the `request_id` to quote to their support. > This is an unofficial package. It is not affiliated with or endorsed by Booking.com. You need your own Booking.com affiliate partner account and API key.

📦 Installation · 🚀 Usage · 🛏️ Booking flow · ⚠️ Errors · ⚙️ Configuration



## 📦 Installation `booking-com:install` publishes `config/booking-com.php` and adds these keys to `.env` and `.env.example`: Then check the connection: The sandbox uses your normal credentials, with test properties such as `10507360` (Demand API Sandbox Hotel Orion, Amsterdam). Car rentals aren't available in the sandbox.

## 🚀 Usage You can also type-hint `FLAIRUK\BookingCom\BookingCom` to have it injected. Request bodies are plain arrays in the shape the [API reference](https://developers.booking.com/demand/docs/open-api/3.2/demand-api) documents. Dates can be given as `DateTimeInterface` objects. Every call returns a `Response`: ### Searching for stays `booker` and `currency` fall back to `BOOKING_COM_BOOKER_COUNTRY`, `BOOKING_COM_BOOKER_PLATFORM` and `BOOKING_COM_CURRENCY`. The booker's country decides the prices and how taxes are shown, so pass each visitor's real country when you know it. You can also search by `country`, `region`, `district`, `landmark`, `airport`, `coordinates` (latitude, longitude and radius) or a list of `accommodations`. ### Availability, content and reviews ### Keeping stored content up to date Store property content and refresh only what changed: ### Locations Accommodation searches use Booking.com's own location ids: ### Car rentals ### Anything else For endpoints without a wrapper, such as Beta endpoints, call them directly. Authentication and error handling still apply:

## 🛏️ Booking flow Preview the order to get the final price, policies and an `order_token`. Then create the order with that token: After booking: `create()`, `modify()` and `cancel()` are never retried automatically. If one of them times out, check with `orders()->find()` before trying again. > **Card data:** if your integration takes card payments, card details pass straight through to Booking.com in the `create()` payload. Make sure your own logging, error reporting and queues never record that payload, and check your PCI DSS obligations. ### Messaging Guest–property messaging is available in API version 3.1, and in 3.2 for partners with Beta access:

## ⚠️ Errors and rate limits In queued jobs, release the job on a rate limit: Your account's rate limit is set by Booking.com; your Account Manager can tell you what it is.

## ⚙️ Configuration | Key | Env | Default | | --- | --- | --- | | `token` | `BOOKING_COM_TOKEN` | | | `affiliate_id` | `BOOKING_COM_AFFILIATE_ID` | | | `sandbox` | `BOOKING_COM_SANDBOX` | `false` | | `version` | `BOOKING_COM_API_VERSION` | `3.2` | | `base_url` | `BOOKING_COM_BASE_URL` | built from `sandbox` and `version` | | `defaults.booker.country` | `BOOKING_COM_BOOKER_COUNTRY` | | | `defaults.booker.platform` | `BOOKING_COM_BOOKER_PLATFORM` | `desktop` | | `defaults.currency` | `BOOKING_COM_CURRENCY` | | | `timeout` | `BOOKING_COM_TIMEOUT` | `30` seconds | | `retry` | | 2 retries, 500 ms apart (reads only) | | `cache.store` | `BOOKING_COM_CACHE_STORE` | the default cache store | | `cache.ttl` | | 24 hours; `null` turns caching off | Scope a single call differently without changing the defaults:

## 🧪 Testing The client uses Laravel's HTTP client, so `Http::fake()` works in your own tests:

## 📄 License The MIT License (MIT). See [LICENSE](LICENSE) for details. Booking.com is a trademark of Booking.com B.V. This package is not affiliated with or endorsed by Booking.com.

All versions of laravel-booking-com with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/cache Version ^12.0|^13.0
illuminate/collections Version ^12.0|^13.0
illuminate/console Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package flairuk/laravel-booking-com contains the following files

Loading the files please wait ...