dhcc / om-openapi
OM-OPENAPI SDK for PHP7
dev-master
2020-12-04 03:00 UTC
Requires
- php: >=7.1.0
- ext-json: *
- ext-libxml: *
- ext-openssl: *
- guzzlehttp/psr7: ^1.4
Requires (Dev)
- phpunit/phpunit: <9.0.0
Suggests
- guzzlehttp/guzzle: 经典的兼容PSR7的HTTP客户端
This package is auto-updated.
Last update: 2024-12-29 06:22:01 UTC
README
项目简介
适用于开发OM项目的PHP-SDK
安装说明
composer require dhcc/om-openapi
快速开始
快速初始化客户端
除了手动new客户端,也可以使用简易工厂类
use \Dhcc\OmOpenapi\client\Factory; $omClient = Factory::guzzleOmClient([]);
初始化请求类
以删除订单为例
use \Dhcc\OmOpenapi\requests\refund\DelRefund; $request = new DelRefund(); $request->setOrderId(1);
发送请求
$response = $omClient->execute($request);