revenuewire/merchant-gateway-api-sdk-php

v1.0.3 2018-01-23 20:55 UTC

This package is auto-updated.

Last update: 2024-08-29 05:06:07 UTC


README

商户网关API

此PHP包由Swagger Codegen项目自动生成

  • API版本:1.2.6
  • 构建包:io.swagger.codegen.languages.PhpClientCodegen

要求

PHP 5.4.0及更高版本

安装与使用

Composer

要通过Composer安装绑定,请在composer.json中添加以下内容

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/revenuewire/merchant-gateway-api-sdk-php.git"
    }
  ],
  "require": {
    "revenuewire/merchant-gateway-api-sdk-php": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

    require_once('/path/to/SwaggerClient-php/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

请遵循安装流程,然后运行以下命令

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

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
// Configure API key authorization: JWTHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Authorization-JWT', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Authorization-JWT', 'Bearer');

$api_instance = new Swagger\Client\Api\MerchantGatewayApi();
$clientId = "clientId_example"; // string | 
$gatewayPolicy = "gatewayPolicy_example"; // string | 

try {
    $result = $api_instance->createMerchantGateway($clientId, $gatewayPolicy);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MerchantGatewayApi->createMerchantGateway: ', $e->getMessage(), PHP_EOL;
}

?>

API端点文档

所有URI均相对于https://merchant-gateway-api.revenuewire.io/v1

模型文档

授权文档

APIKeyHeader

  • 类型:API密钥
  • API密钥参数名:X-API-KEY
  • 位置:HTTP头

JWTHeader

  • 类型:API密钥
  • API密钥参数名:X-Authorization-JWT
  • 位置:HTTP头

作者