elestyle / elepay-php-sdk
elepay API是基于REST架构的支付API。它可以处理支付、退款等各种与支付相关的操作。
1.2.3
2024-01-10 10:26 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
elepay API是基于REST架构的支付API。它可以处理支付、退款等各种与支付相关的操作。
更多信息,请访问 https://elepay.io.
安装与使用
要求
PHP 7.4 及更高版本。也适用于 PHP 8.0。
Composer
要使用Composer安装绑定,请将以下内容添加到 composer.json
{
"require": {
"elestyle/elepay-php-sdk": ">=1.2.3"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
<?php require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
入门指南
请遵循安装过程,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth $config = Elepay\Configuration::getDefaultConfiguration() ->setUsername('Your Elepay Secret Key') ->setPassword(''); $apiInstance = new Elepay\Api\ChargeApi( // 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 ); $chargeReq = new \Elepay\Model\ChargeReq(); // \Elepay\Model\ChargeReq | 支払リクエスト try { $result = $apiInstance->createCharge($chargeReq); print_r($result); } catch (Exception $e) { echo 'Exception when calling ChargeApi->createCharge: ', $e->getMessage(), PHP_EOL; }
API端点
所有URI都是相对于 https://api.elepay.io
模型
- CardBrandType
- CardInfo
- ChannelPropertiesDto
- ChargeCaptureReq
- ChargeDateTimeType
- ChargeDto
- ChargeReq
- ChargeStatusDto
- ChargeStatusType
- ChargesResponse
- CodeDto
- CodeItem
- CodePaymentMethodResponse
- CodeReq
- CodeStatusType
- CustomerDto
- CustomerPropertiesDto
- CustomerReq
- CustomerResponse
- CustomerStatusType
- DisputeDateTimeType
- DisputeDto
- DisputeStatusType
- DisputesResponse
- InvoiceDto
- InvoiceItem
- InvoiceReq
- InvoiceStatusType
- InvoicesResponse
- LocationDto
- LocationsResponse
- PaymentMethodDto
- PaymentMethodResponse
- PaymentMethodType
- ReaderStatusType
- RefundDto
- RefundReq
- RefundStatusType
- RefundsDto
- RefundsResponse
- ResourceType
- ResourceWebEnvType
- SortOrderType
- SourceDto
- SourceReq
- SourceResponse
- SourceStatusDto
- SourceStatusType
- SubscriptionDto
- SubscriptionIntervalType
- SubscriptionPeriodDto
- SubscriptionPeriodsResponse
- SubscriptionReq
- SubscriptionScheduleChargesResponse
- SubscriptionStatusType
- SubscriptionUpdateReq
- SubscriptionsResponse
- TerminalReaderDto
- TerminalReaderReq
- TerminalReadersResponse
授权
basicAuth
- 类型: HTTP基本认证
bearerAuth
- 类型: Bearer认证
测试
要运行测试,请使用
composer install vendor/bin/phpunit
作者
关于此包
此PHP包是由OpenAPI Generator项目自动生成的
- API版本:
1.2.3- 包版本:
1.2.3
- 包版本:
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen