zipmoney / merchantapi-php
1.0.11
2021-02-03 03:37 UTC
Requires
- php: >=5.3
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: ^5.0
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-08-29 04:42:57 UTC
README
ZipMoney 商户 API 初始构建
- API 版本:2017-03-01
要求
PHP 5.3 及以上版本
安装与使用
Composer
要通过 Composer 安装绑定,请在 composer.json
中添加以下内容:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/zipMoney/merchantapi-php.git"
}
],
"require": {
"zipMoney/merchantapi-php": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/merchantapi-php/autoload.php');
测试
要运行单元测试
composer require
phpunit
入门
请按照 安装流程 进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: Authorization \zipMoney\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); \zipMoney\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Bearer'); \zipMoney\Configuration::getDefaultConfiguration()->setEnvironment('ENVIRONMENT HERE'); // Allowed values are ( sandbox | production ) \zipMoney\Configuration::getDefaultConfiguration()->setPlatform('PLATFORM HERE'); // E.g. Magento/1.9.1.2 $api_instance = new zipMoney\Api\ChargesApi(); $id = "id_example"; // string | The id of the authorised charge $idempotency_key = "idempotency_key_example"; // string | The unique idempotency key. try { $result = $api_instance->chargesCancel($id, $idempotency_key); print_r($result); } catch (Exception $e) { echo 'Exception when calling ChargesApi->chargesCancel: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 https://api.zipmoney.com.au/merchant/v1
模型文档
- 地址
- 权限
- 捕获费用请求
- 费用
- 费用收集
- 费用订单
- 结账
- 结账配置
- 结账功能
- 结账功能令牌化
- 结账订单
- 创建费用请求
- 创建结账请求
- 创建结账请求功能
- 创建结账请求功能令牌化
- 创建退款请求
- 创建令牌请求
- 客户
- 错误响应
- 错误响应错误
- 错误响应错误详情
- 内联响应200
- 元数据
- 订单项目
- 订单运输
- 订单运输跟踪
- 退款
- 购物者
- 购物者统计
- 令牌
授权文档
授权
- 类型:API密钥
- API密钥参数名:Authorization
- 位置:HTTP头