zacksleo / ec-sdk
电商平台 SDK
dev-master
2019-08-07 03:39 UTC
Requires
This package is auto-updated.
Last update: 2024-12-07 15:43:08 UTC
README
电商平台 SDK.
Installing
$ composer require zacksleo/ec-sdk -vvv
Usage
try { $config = [ 'key' => 'key', 'secret' => 'secret', 'debug' => false, 'log' =>[ 'file' => __DIR__.'/suning.log', 'level' => 'error', 'permission' => 0777, ] ]; $code = Factory::suning($config)->express->name2code('申通快递'); var_dump($code); } catch (\Zacksleo\SuningSdk\SuningException $exception) { //苏宁返回错误 var_dump($exception->getMessage()); } catch (\Hanson\Foundation\Exception\HttpException $exception) { //Http 请求发生错误 var_dump($exception->getMessage()); } catch (\Exception $exception) { $exception->getMessage(); var_dump($exception->getMessage()); }
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
License
MIT