lsv/food-market-integration-wrapper
Composer 安装命令:
composer require lsv/food-market-integration-wrapper
包简介
Wrapper for sinqro food market integration
README 文档
README
PHP wrapper for sinqro food market integration
Install and basic usage
Install with composer, requires PHP >8.0
composer require lsv/food-market-integration-wrapper # Add a PSR 18 client, fx composer require symfony/http-client # If you add another PSR18 client, then look below on how to use other PSR 18 clients
Authenticate usage
use Lsv\FoodMarketIntegration\Authenticate; use Lsv\FoodMarketIntegration\Request; $userAccessToken = 'your user access token'; $serverAccessToken = 'your server access token'; $authenticate = new Authenticate($userAccessToken, $serverAccessToken); Request\AbstractRequest::setAuthentication($authenticate); // Your requests
And basic usage, to fetch an order
use Lsv\FoodMarketIntegration\Request; $marketCodeIdentifier = 'your market code identifier'; $marketOrderIdentifier = 'order id'; $request = new Request\GetOrder($marketCodeIdentifier, $marketOrderIdentifier); $response = $request->request(); # Response is now an object of Response\Order
For more usages, see below.
Usage
Authenticate
Order requests
| Request | Description | Response |
|---|---|---|
| CancelOrder | Cancel a order | Order |
| GetOrder | Get order by identifier | Order |
| GetOrderStatus | Get consumer order current status | OrderStatus |
| PostOrder | Create new order | Order |
Selling point requests
| Request | Description | Response |
|---|---|---|
| GetMarketSellingPoint | Get market selling point by id | SellingPoint |
| GetMarketSellingPoints | Get all market selling points | array of SellingPoint |
| GetSellingPointAvailability | Return information about selling point services | SellingPointAvailability |
| GetSellingPointClosingExceptions | Get selling point next closing exceptions | array of SellingPointException |
| GetSellingPointMenus | Get menus | array of Menu |
| GetSellingPointMenusAvailability | Get menus with availability | array of Menu |
| GetSellingPointZonesAndTables | Get all the restaurant zones and tables | ServiceZone |
Use another PSR18 HTTP Client
If you dont want to use symfony/http-client implementation, you can easily change it to another one.
You can use a http client from this list - These are all PSR18 http client implementations.
use Lsv\FoodMarketIntegration\Request; $client = $YourPSR18Client; Request\AbstractRequest::setHttpClient($client); // Your requests
TODO
- Easier to make the websocket integration
License
lsv/food-market-integration-wrapper 适用场景与选型建议
lsv/food-market-integration-wrapper 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 11 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 lsv/food-market-integration-wrapper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lsv/food-market-integration-wrapper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-11-10