承接 incert/php-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

incert/php-sdk

最新稳定版本:2.0.2

Composer 安装命令:

composer require incert/php-sdk

包简介

PHP SDK to use for Incert coupon api

README 文档

README

Client SDK for Incert Coupon usage

Installation & Usage

Requirements

PHP 7.4 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/incert/php-sdk.git"
    }
  ],
  "require": {
    "incert/php-sdk": "^2.0"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/Client/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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


// Configure API key authorization: authenticateKey
$config = new Incert\Client\Configuration();
$config->setApiKey('X-Api-Key', 'YOUR_API_KEY');

// Set hostname for your API endpoint
// Default Host: https://api-sandbox.myincert.com/api
$config->setHost('YOUR_API_ENDPOINT');


$apiInstance = new Incert\Client\Api\OAuth20ClientCredentialsApi($config);

$accessToken = new \Incert\Client\OAuth20\GrantAccessTokenRequest();
$accessToken->setClientId('YOUR_CLIENT_ID')->setClientSecret('YOUR_CLIENT_SECRET');

try {
    $result = $apiInstance->oauthAccessTokenPost($accessToken);
    $token = $result->getAccessToken();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OAuth20ClientCredentialsApi->oauthAccessTokenPost: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to Incert API Endpoint

Authorization

Authentication schemes defined for the API:

authenticateKey

  • Type: API key
  • API key parameter name: X-Api-Key
  • Location: HTTP header

authenticateBearer

  • Type: Bearer authentication

authenticateSession

  • Type: API key
  • API key parameter name: XTCsid
  • Location:

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

统计信息

  • 总下载量: 16
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2025-06-02