elestyle/elepay-php-sdk

elepay API是基于REST架构的支付API。它可以处理支付、退款等各种与支付相关的操作。

1.2.3 2024-01-10 10:26 UTC

This package is auto-updated.

Last update: 2024-09-10 11:49:52 UTC


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

模型

授权

basicAuth

  • 类型: HTTP基本认证

bearerAuth

  • 类型: Bearer认证

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

support@elestyle.jp

关于此包

此PHP包是由OpenAPI Generator项目自动生成的

  • API版本: 1.2.3
    • 包版本: 1.2.3
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen