oscar-team/reepay-php-api

1.0.29 2024-04-22 13:44 UTC

README

REST API 管理Reepay资源

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

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

关于Reepay(由reepay提供)

Reepay是一个支付网关,也是一个订阅计费平台,适用于多个在线网店和商家。Reepay也是VISA和Mastercard的收单机构

这是一个由爱好者完成的不官方仓库,我们非常感谢为此付出的工作和努力。

要求

PHP 5.4.0及以后版本

安装与使用

Composer

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

{
  "require": {
    "oscar-team/reepay-php-api": "dev-master"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

    require_once('/path/to/code/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

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

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

// Configure API key authorization: apiKey
Reepay\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Reepay\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
// Configure HTTP basic authorization: basicAuth
Reepay\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Reepay\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$apiInstance = new Reepay\Api\AccountApi();

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

?>

API端点文档

所有URI相对于https://api.reepay.com/,除了Session,它相对于https://checkout-api.reepay.com/

模型文档

授权文档

apiKey

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

basicAuth

  • 类型:HTTP基本认证