menes1337 / 3dcart-api-php-client
用于访问3dCart Soap API、高级Soap API和REST API的PHP客户端库
0.5.0
2017-03-19 19:10 UTC
Requires
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- phpunit/phpunit: 5.5.*
This package is not auto-updated.
Last update: 2024-09-28 19:47:34 UTC
README
3dcart PHP Api-Client
项目属性
编码风格:PSR-1 (http://www.php-fig.org/psr/psr-1/) / PSR-2 (http://www.php-fig.org/psr/psr-2/)
自动加载:PSR-4 (http://www.php-fig.org/psr/psr-4/)
最低PHP版本:5.6
示例用法
项目初始化
git clone https://github.com/Menes1337/3dcart-api-php-client.git
cd 3dcart-api-php-client
composer install
Soap API
include('vendor' . DIRECTORY_SEPARATOR . 'autoload.php');
use \ThreeDCart\Primitive\StringValueObject;
$soapFactory = new \ThreeDCart\Api\Soap\Factory();
$soapClient = $soapFactory->getApiClient(
new StringValueObject('Your 3dcart API key'),
new StringValueObject('yourstore.3dcartstores.com')
);
$customerObjects = $soapClient->getCustomers();
var_dump($customerObjects);
高级SOAP API
include('vendor' . DIRECTORY_SEPARATOR . 'autoload.php');
use \ThreeDCart\Primitive\StringValueObject;
$soapFactory = new \ThreeDCart\Api\Soap\Factory();
$advancedClient = $soapFactory->getAdvancedApiClient(
new StringValueObject('Your 3dcart API key'),
new StringValueObject('yourstore.3dcartstores.com')
);
$plainCustomersArray = $advancedClient->runQuery(
new StringValueObject('SELECT * FROM customer')
);
var_dump($plainCustomersArray);
贡献
欢迎您贡献力量!
- 创建分支
- 创建您的功能分支(
git checkout -b my-new-feature) - 确保您的更改遵循编码风格(PSR-1 / PSR-2),您的代码经过PHP单元测试,并且可以在PHP 5.6/7.0/7.1上运行
- 提交您的更改(
git commit -am 'Add some feature') - 推送到分支(
git push origin my-new-feature) - 创建新的pull request