twoju5 / mono-card-issuance
此包已被废弃,不再维护。未建议替代包。
立即向您的客户发行虚拟卡(美元/奈拉)
dev-master
2022-12-12 04:14 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2023-10-12 06:03:39 UTC
README
未提供描述(由Swagger Codegen生成 https://towoju.com.ng)
此PHP包是由 Swagger Codegen 项目自动生成的
- API版本:2.0
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
要求
PHP 5.5 及以上
安装与使用
Composer
要通过 Composer 安装绑定,请在 composer.json
中添加以下内容
composer require towoju5/mono-card-issuance
然后运行 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 API key authorization: apiKey $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKey('mono-sec-key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKeyPrefix('mono-sec-key', 'Bearer'); $apiInstance = new Towoju5\MonoCards\Api\MiscApi( // 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 \Towoju5\MonoCards\Model\null(); // | try { $apiInstance->createaVirtualCard($body); } catch (Exception $e) { echo 'Exception when calling MiscApi->createaVirtualCard: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKey('mono-sec-key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKeyPrefix('mono-sec-key', 'Bearer'); $apiInstance = new Towoju5\MonoCards\Api\MiscApi( // 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 { $apiInstance->fetchCardDetails(); } catch (Exception $e) { echo 'Exception when calling MiscApi->fetchCardDetails: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKey('mono-sec-key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKeyPrefix('mono-sec-key', 'Bearer'); $apiInstance = new Towoju5\MonoCards\Api\MiscApi( // 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 { $apiInstance->fetchCardTransactions(); } catch (Exception $e) { echo 'Exception when calling MiscApi->fetchCardTransactions: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKey('mono-sec-key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKeyPrefix('mono-sec-key', 'Bearer'); $apiInstance = new Towoju5\MonoCards\Api\MiscApi( // 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 { $apiInstance->freezeaCard(); } catch (Exception $e) { echo 'Exception when calling MiscApi->freezeaCard: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKey('mono-sec-key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKeyPrefix('mono-sec-key', 'Bearer'); $apiInstance = new Towoju5\MonoCards\Api\MiscApi( // 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 \Towoju5\MonoCards\Model\null(); // | try { $apiInstance->fundaVirtualCard($body); } catch (Exception $e) { echo 'Exception when calling MiscApi->fundaVirtualCard: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKey('mono-sec-key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKeyPrefix('mono-sec-key', 'Bearer'); $apiInstance = new Towoju5\MonoCards\Api\MiscApi( // 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 \Towoju5\MonoCards\Model\null(); // | try { $apiInstance->liquidateCardBalance($body); } catch (Exception $e) { echo 'Exception when calling MiscApi->liquidateCardBalance: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKey('mono-sec-key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKeyPrefix('mono-sec-key', 'Bearer'); $apiInstance = new Towoju5\MonoCards\Api\MiscApi( // 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 { $apiInstance->unfreezeaCard(); } catch (Exception $e) { echo 'Exception when calling MiscApi->unfreezeaCard: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKey('mono-sec-key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Towoju5\MonoCards\Configuration::getDefaultConfiguration()->setApiKeyPrefix('mono-sec-key', 'Bearer'); $apiInstance = new Towoju5\MonoCards\Api\MiscApi( // 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 \Towoju5\MonoCards\Model\null(); // | try { $apiInstance->updateCardPin($body); } catch (Exception $e) { echo 'Exception when calling MiscApi->updateCardPin: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI均相对于 https://api.withmono.com/issuing/v1/cards
类 | 方法 | HTTP请求 | 描述 |
---|---|---|---|
MiscApi | createaVirtualCard | POST /virtual | 创建虚拟卡 |
MiscApi | fetchCardDetails | GET /61bb3a0d5f53902db40eb478 | 获取卡详情 |
MiscApi | fetchCardTransactions | GET /61bb3a0d5f53902db40eb478/transactions | 获取卡交易 |
MiscApi | freezeaCard | PATCH /61bb3a0d5f53902db40eb478/freeze | 冻结卡 |
MiscApi | fundaVirtualCard | POST /61bb3a0d5f53902db40eb478/fund | 为虚拟卡充值 |
MiscApi | liquidateCardBalance | PATCH /61bb3a0d5f53902db40eb478/liquidate | 清算卡余额 |
MiscApi | unfreezeaCard | PATCH /61bb3a0d5f53902db40eb478/unfreeze | 解冻卡 |
MiscApi | updateCardPin | PATCH /61bb3a0d5f53902db40eb478/pin | 更新卡PIN |
模型文档
授权文档
apiKey
- 类型:API密钥
- API密钥参数名:mono-sec-key
- 位置:HTTP头部