netzkollektiv/easycredit-api-v3-php

商家门户交易-V3 API 交易-V3 API for ratenkauf 应用程序 交易分期计算器-V3 API for ratenkauf 应用程序

2.0.0 2024-09-23 14:13 UTC

This package is auto-updated.

Last update: 2024-09-23 14:13:39 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