billabear / php-sdk
1.0.0
2024-07-21 16:16 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
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
模型文档
- 地址
- 结账体
- 结账项目
- 结账订阅
- 客户
- 客户ID优惠券体
- 错误
- 前端令牌
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse20011
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2004Data
- InlineResponse2004Lines
- InlineResponse2005
- InlineResponse2006
- InlineResponse2007
- InlineResponse2007Data
- InlineResponse2007Receipts
- InlineResponse2008
- InlineResponse2009
- InlineResponse201
- InlineResponse201BillingAdmin
- InlineResponse201Lines
- InlineResponse400
- 支付详情
- 支付ID退款体
- 价格
- 产品
- 座位添加体
- 座位移除体
- 订阅
- 订阅ID取消体
- 订阅ID计划体
- 订阅计划
- 订阅开始体