pstpagofacil/sdk-apis-php

Pago Fácil API

2.1.5.1 2020-03-23 18:47 UTC

This package is auto-updated.

Last update: 2024-09-24 06:26:37 UTC


README

Pago Fácil SpA Examples

@pstpagofacil/sdk-apis-php

Status GitHub Issues GitHub Pull Requests License

Pago Fácil APIs PHP SDK

Pago Fácil API

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

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

要求

PHP 5.5及以上

安装与使用

Composer

使用Packagist

使用GITHUB

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/PSTPAGOFACIL/sdk-apis-php.git"
    }
  ],
  "require": {
    "PSTPAGOFACIL/sdk-apis-php.git": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

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

测试

运行单元测试

composer install
./vendor/bin/phpunit

入门指南

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

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

$apiInstance = new PSTPagoFacil\ApiClient\Api\AuthApi();
$loginParams = [
    "username" => "mimaildeejemplo@pagofacil.cl",
    "password" => "MiClavedeMentira!"
];

$body = new \PSTPagoFacil\ApiClient\Model\LoginBody($loginParams);

try {
    $result = $apiInstance->usersLoginPost($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthApi->usersLoginPost: ', $e->getMessage(), PHP_EOL;
}
?>

API端点文档

所有URI均相对于https://apis.pgf.cl

模型文档

授权文档

JWT令牌

  • 类型:Bearer身份验证(JWT)

令牌

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

作者

  • Cristian Tala Sánchez