netzkollektiv/ratenkaufbyeasycredit-api-v3-php

商户门户交易-V3 API,ratenkauf应用销售-V3 API,ratenkauf应用分期计算器-V3 API

1.3.11 2023-08-03 08:33 UTC

This package is auto-updated.

Last update: 2024-09-23 13:01:15 UTC


README

easyCredit API v3 库是使用以下 easyCredit API 的官方 PHP 库:

安装与使用

需求

  • PHP >= 7.0

Composer

要通过 Composer 安装 API 库,请将以下内容添加到 composer.json

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/netzkollektiv/easycredit-api-v3-php.git"
    }
  ],
  "require": {
    "netzkollektiv/easycredit-api-v3-php": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

<?php
require_once('/path/to/easycredit-api-v3-php/vendor/autoload.php');

入门

请按照安装过程操作,然后运行以下命令

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



// Configure HTTP basic authorization: basicAuth
$config = Teambank\EasyCreditApiV3\Configuration::getDefaultConfiguration()
              ->setHost('https://ratenkauf.easycredit.de')
              ->setUsername('1.de.1234.1') // use your "Webshop-ID"
              ->setPassword('YOUR_API_KEY'); // use your "API-Kennwort"


$apiInstance = new Teambank\EasyCreditApiV3\Api\DocumentApi(
    // 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
);
$billingDateFrom = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | set by default to the last month if not specified
$billingDateTo = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | set by default to billingDateFrom + one month if not specified
$documentType = array('documentType_example'); // string[] | set by default to all options if not specified
$fileType = array('fileType_example'); // string[] | set by default to all options if not specified

try {
    $result = $apiInstance->apiMerchantV3DocumentsGet($billingDateFrom, $billingDateTo, $documentType, $fileType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->apiMerchantV3DocumentsGet: ', $e->getMessage(), PHP_EOL;
}

API 端点

所有 URI 都是相对于 https://partner.easycredit-ratenkauf.de

模型

授权

基本认证

  • 类型: HTTP基本认证

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包

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

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