cyphp / empg
针对 PHP 7.x 的增强型 MPG 统一 API
0.0.2
2017-01-31 21:19 UTC
Requires
- php: ^5.6 || ^7.0
- guzzlehttp/guzzle: ^6.2
- sabre/xml: ^2.0
- symfony/yaml: ^3.2
Requires (Dev)
- phpunit/phpunit: ^5.7
- symfony/var-dumper: ^3.2
This package is not auto-updated.
Last update: 2024-09-29 02:02:09 UTC
README
针对 PHP 7.x 的增强型 MPG 统一 API 库
灵感来源于 https://github.com/Moneris/eCommerce-Unified-API-PHP
功能
- PHP 7.x 兼容
- 提高可靠性
- Composer 包
- 模仿尽可能多的原始类命名
安装
composer require cyphp/empg
示例
require_once './vender/autoload.php'; use Empg\Client; $client = new Client('MY_STORE_ID', 'MY_API_TOKEN'); $response = $client->post( new MpgRequest( new MpgTransaction([ // ... ]) ) );
使用测试端点
$client = new Client('MY_STORE_ID', 'MY_API_TOKEN', [ 'env' => Empg\Configuration::ENV_TEST, ]);
许可证
MIT