mobianglobal/reseller-api

此包已被废弃且不再维护。作者建议使用mobianglobal/mobian-api-php包。

MOBIAN Global Reseller API 包。

1.0.0 2020-04-09 08:57 UTC

This package is auto-updated.

Last update: 2020-04-09 09:00:14 UTC


README

MOBIAN Reseller API 可以用于预订各种旅游服务。为了方便经销商,我们尽量简化集成过程,设置默认包。这应该可以处理API端的默认请求和验证。

该包通过维护API的版本,使版本间的切换更加顺畅。

该包所需的条件:

  • PHP 5.6 或更高版本
  • cURL

安装

建议通过Composer来安装此包。

composer require mobianglobal/reseller-api-php

安装后,请确保您需要Composer的自动加载器

require 'vendor/autoload.php';

然后您可以使用Composer更新包

composer update mobianglobal/reseller-api-php

示例用法

use Mobian\ResellerApi\ApiClient;
use Mobian\ResellerApi\ApiConfig;
use Mobian\ResellerApi\Requests\Bookings\FetchAll as FetchBookingsRequest;

// Setup reseller authentication key
ApiConfig::setAuthKey('RESELLER_KEY_HERE');

$request = new FetchBookingsRequest([
    'order_id' => 1234567890,
]);

$bookings = ApiClient::request($request);