billabear/php-sdk

1.0.0 2024-07-21 16:16 UTC

This package is auto-updated.

Last update: 2024-09-21 16:38:32 UTC


README

BillaBear PHP SDK

安装与使用

composer require billabear/php-sdk

入门

请按照安装步骤进行操作,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()
        ->setHost('YOUR_API_URL')
        ->setApiKey('X-API-Key', 'YOUR_API_KEY');


$apiInstance = new BillaBear\Api\CheckoutApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$body = new \BillaBear\Model\CheckoutBody();

try {
    $result = $apiInstance->createCheckout($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CheckoutApi->createCheckout: ', $e->getMessage(), PHP_EOL;
}
?>

API端点文档

所有URI都是相对于 https://{customerId}.billabear.cloud/api/v1

模型文档

作者

support@billabear.com