pgrimaud / cegid-y2-sdk
CEGID / Y2 - SDK
3.0.8
2019-09-03 10:09 UTC
Requires
- php: >=5.6
- ext-soap: *
README
消费CEGID/Y2的SOAP API。
需求
- PHP >= 5.6
- php-soap包(ext-soap扩展)
安装
composer require pgrimaud/cegid-y2-sdk
基本使用
Hello world
<?php use Y2\ItemInventory\HelloWorld; use Y2\ItemInventory\ItemInventoryWcfService; use Y2\ItemInventory\RetailContext; $wsdl = ''; // WSDL interface $login = ''; // credentials for basic auth $password = ''; // credentials for basic auth $dbId = ''; // Y2 database ID $retailContext = new RetailContext(); $retailContext->setDatabaseId($dbId); $helloWorld = new HelloWorld('ZZZ', $retailContext); try { $client = new ItemInventoryWcfService($wsdl, [ 'login' => $login, 'password' => $password ]); $call = $client->HelloWorld($helloWorld)->getHelloWorldResult(); print_r($call); } catch (SoapFault $e) { echo "SOAP ERROR CALL : " . $e->getMessage() . "\n"; }
许可证
根据MIT许可证条款授权。