giannisftaras/speedex-api
Composer 安装命令:
composer require giannisftaras/speedex-api
包简介
Use the Speedex WSDL SOAP API with PHP
README 文档
README
Speedex is a Greek courier company. This package is a simple PHP handler for its SOAP API.
At the moment only the following features are supported:
- Get voucher data
- Check if the package has been delivered
- Check if the voucher is valid and present in the database
If you want more additions you can contact me or submit a feature request.
Installation:
Prerequisites:
You need to have enabled the SOAP module on your server. To enable it:
- Edit the php.ini file and uncomment the
;extension=soapline - Restart the PHP-FPM service and Apache server
There are two ways to install the package.
1. With composer:
composer require giannisftaras/speedex-api
2. Manually:
Download this repository, extract the zip file and include the SpeedexAPI.php file, as seen in the tests.
Usage
<?php require $_SERVER['DOCUMENT_ROOT'] . '/vendor/autoload.php'; use SpeedexAPI\SpeedexAPI; $sp_api = new SpeedexAPI(); $voucher_id = '<THE VOUCHER NUMBER>'; $voucher = $sp_api->get_voucher($voucher_id); if ($voucher->is_valid()) { var_dump($voucher->get_data()); var_dump($voucher->is_delivered()); } ?>
Configuration
The API works directly out of the box as is, but if you want you can specify some options.
$options = [ 'cache' => 2 ]; $sp_api = new SpeedexAPI($options);
Available options:
| configuration | options | Type | Description | Default |
|---|---|---|---|---|
| cache | 0-3 | Integer | Specify the WSDL cache level with a integer | 2 'WSDL_CACHE_MEMORY' |
| timeout | 0-100 | Integer | Timeout in seconds if the server does not respond | 5 |
| exceptions | true, false | Boolean | Show or hide server side exceptions | true |
giannisftaras/speedex-api 适用场景与选型建议
giannisftaras/speedex-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 11 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 giannisftaras/speedex-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 giannisftaras/speedex-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2021-11-28