hryvinskyi / reepay-api
2.0.3
2023-03-27 22:11 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.5
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
README
REST API 用于管理 Reepay 资源
此 PHP 包由 Swagger Codegen 项目自动生成
- API 版本:1
- 包版本:1.0.0
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
要求
PHP 5.5 及更高版本
安装与使用
Composer
要通过 Composer 安装绑定,请在 composer.json
中添加以下内容
{
"repositories": [
{
"type": "git",
"url": "https://github.com/hryvinskyi/reepay-api.git"
}
],
"require": {
"hryvinskyi/reepay-api": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门指南
请遵循安装过程,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); try { $result = $apiInstance->createPrivateKey(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->createPrivateKey: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); try { $result = $apiInstance->createPublicKey(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->createPublicKey: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); $key = "key_example"; // string | Private key try { $apiInstance->expirePrivateKey($key); } catch (Exception $e) { echo 'Exception when calling AccountApi->expirePrivateKey: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); $key = "key_example"; // string | Public key try { $apiInstance->expirePublicKey($key); } catch (Exception $e) { echo 'Exception when calling AccountApi->expirePublicKey: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); try { $result = $apiInstance->generateWebhookSecret(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->generateWebhookSecret: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); try { $result = $apiInstance->getCurrentAccount(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getCurrentAccount: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); try { $result = $apiInstance->getDiscountSettings(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getDiscountSettings: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); try { $result = $apiInstance->getMailSettings(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getMailSettings: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); try { $result = $apiInstance->getMfaSettings(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getMfaSettings: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); try { $result = $apiInstance->getPrivateKeys(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getPrivateKeys: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); try { $result = $apiInstance->getPublicKeys(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getPublicKeys: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); try { $result = $apiInstance->getTerms(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getTerms: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); try { $result = $apiInstance->getWebhookSettings(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getWebhookSettings: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); $body = new \Reepay\Model\UpdateAccount(); // \Reepay\Model\UpdateAccount | try { $result = $apiInstance->updateAccountJson($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->updateAccountJson: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); $body = new \Reepay\Model\DiscountSettings(); // \Reepay\Model\DiscountSettings | try { $result = $apiInstance->updateDiscountSettings($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->updateDiscountSettings: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); $body = new \Reepay\Model\MailSettings(); // \Reepay\Model\MailSettings | try { $result = $apiInstance->updateMailSettingsJson($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->updateMailSettingsJson: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); $body = new \Reepay\Model\AccountMfaSettings(); // \Reepay\Model\AccountMfaSettings | try { $result = $apiInstance->updateMfaSettings($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->updateMfaSettings: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); $body = new \Reepay\Model\Terms(); // \Reepay\Model\Terms | try { $result = $apiInstance->updateTerms($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->updateTerms: ', $e->getMessage(), PHP_EOL; } // Configure HTTP basic authorization: basicAuth $config = Reepay\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Reepay\Api\AccountApi( // 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 ); $body = new \Reepay\Model\UpdateWebhookSettings(); // \Reepay\Model\UpdateWebhookSettings | try { $result = $apiInstance->updateWebhookSettingsJson($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->updateWebhookSettingsJson: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都是相对于 https://api.reepay.com/api.reepay.com
模型文档
- 账户
- 账户资金信息
- 账户多因素认证设置
- 激活 MPS 协议
- 激活订阅
- 附加功能
- 附加功能列表
- 添加支付方式
- 额外费用
- 金额规则
- 任意日协议
- 任意日交易
- Applepay 协议
- 认证登录体
- Bancontact 交易
- Blik 交易
- 取消订阅
- 卡
- 卡国家规则
- 卡网关协议
- 卡前缀规则
- 卡令牌 DTO
- 卡交易
- 卡类型规则
- 卡 V2
- 卡验证
- 卡验证请求
- 更改下个周期开始日期
- 更改订阅
- 更改后的订阅
- 费用
- 费用列表
- 费用参数
- 费用来源
- 结账账户数据 DTO
- 结账会话数据 DTO
- 复制卡
- 企业卡规则
- 优惠券
- 优惠券列表
- 优惠券兑换
- 创建附加功能
- 创建额外费用
- 创建卡网关协议
- 创建费用
- 创建优惠券
- 创建信贷
- 创建信贷笔记行
- 创建客户
- 创建客户发票
- 创建客户笔记
- 创建折扣
- 创建催款计划
- 创建权限
- 创建 MPS 协议
- 创建订单行
- 创建支付
- 创建已准备订阅
- 创建退款
- 创建订阅
- 创建订阅附加功能
- 创建订阅额外费用
- 创建订阅折扣
- 创建订阅发票
- 创建订阅计划
- 创建税收政策
- 创建 Vipps 协议
- 信贷
- 信贷发票
- 信贷笔记行
- 信贷笔记设置
- 货币规则
- 客户
- 客户债务人设置
- 客户列表
- 客户笔记
- 折扣
- 折扣列表
- 折扣设置
- 催款计划
- EMV 配置
- 权限
- 权限搜索
- EPS 交易
- 错误代码 DTO
- 错误响应
- 爱沙尼亚银行交易
- 事件
- 事件列表
- 过期订阅
- 扩展认证响应
- 扩展 Klarna 认证响应
- 网关协议
- Googlepay 协议
- Ideal 交易
- 导入 MPS 支付方式请求
- 导入 Vipps 定期支付方式请求
- InlineResponse200
- 间隔金额
- 邀请用户
- 邀请用户接受
- 发票
- 发票账单地址
- 发票配置
- 发票信贷笔记
- 发票信贷笔记列表 DTO
- 发票信贷笔记 V2
- 发票列表
- 发票序列配置
- 发票发货地址
- 密钥
- 克朗纳协议
- 克朗纳交易
- 拉脱维亚银行交易
- 立陶宛银行交易
- 邮件设置
- 手动退款转账
- 手动结算转账
- 手动交易
- MBWay交易
- 移动卡
- Mpo协议
- Mps协议
- Mps订阅
- Mps订阅V2
- Mps交易
- 多银行交易
- 我的银行交易
- 不同国家规则
- 离线协议
- 挂起订阅
- 订单行
- 组织
- 组织登录
- P24交易
- Payconiq交易
- Payever协议
- 支付方式列表
- 支付方式V2
- 支付类型规则
- 付款
- 付款列表
- 付款交易
- Paypal协议
- Paypal交易
- Paysafecard交易
- Paysera交易
- 计划
- 计划列表
- Postfinance交易
- Ppro协议
- 准备费用Dto
- 准备订阅
- 提供商规则
- 重新激活订阅
- 兑换优惠券代码
- 退款
- 请求者国家规则
- 重置用户密码
- Resurs协议
- Resurs交易
- 风险配置
- 风险规则
- 风险规则集
- 桑坦德交易
- Satispay交易
- SEPA授权
- 设置支付方式
- 结算
- 结算费用
- 标准税率响应Dto
- 强身份验证状态规则
- 强身份验证规则
- 订阅
- 订阅附加功能
- 订阅取消预览
- 订阅更改
- 订阅更改日志
- 订阅折扣
- 订阅链接
- 订阅列表
- 订阅周期余额
- 替代订阅计划
- Swish协议
- Swish交易
- 税务政策
- 税务政策后备
- 税务政策列表
- 税率
- 模板模型
- 条款
- 三重安全状态规则
- 交易
- 交易上下文规则
- 交易列表
- Trustly交易
- 更新账户
- 更新附加功能
- 更新任何一天协议
- 更新卡网关协议
- 更新优惠券
- 更新客户
- 更新折扣
- 更新催收计划
- 更新EMV配置
- 更新费用配置
- 更新Googlepay协议
- 更新Klarna协议
- 更新Mps协议
- 更新离线协议
- 更新组织
- 更新Payever协议
- 更新Paypal协议
- 更新Ppro协议
- 更新Resurs协议
- 更新订阅计划
- 更新附加费
- 更新税务政策
- 更新用户
- 更新用户组
- 更新用户密码
- 更新Viabill协议
- 更新Webhook设置
- 用户
- 用户账户
- 用户账户Mfa
- 用户信息
- 用户登录
- 用户续订
- 用户重置请求密码
- 用户设置Mfa
- Viabill协议
- Viabill交易
- Vipps协议
- Vipps商户入金
- Vipps周期性协议
- Vipps周期性授权
- Vipps周期性商户入金
- Vipps周期性商户入金响应
- Vipps周期性交易
- 微信支付交易
- Webhook
- Webhook禁用请求
- Webhook列表
- Webhook请求
- Webhook重发请求
- Webhook设置
- Webhook更新请求
授权文档
apiKey
- 类型:API密钥
- API密钥参数名称:X-Auth-Token
- 位置:HTTP头部
basicAuth
- 类型:HTTP基本认证