1. Go to this page and download the library: Download oihso/cse-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
oihso / cse-php-sdk example snippets
use Oihso\CSESDK\ClassMap;
use Oihso\CSESDK\ServiceType\Get;
use Oihso\CSESDK\StructType\Element;
use Oihso\CSESDK\StructType\GetReferenceData;
$options = [
\WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => 'https://lk-test.cse.ru/1c/ws/Web1C.1cws?wsdl',
\WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_CLASSMAP => ClassMap::get(),
// \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_LOGIN => 'test', // Логин и пароль требуется только для боевого окружения
// \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_PASSWORD => '2016'
];
$get = new Get($options);
$errors = $get->GetReferenceData(new GetReferenceData(
new Element('parameters', list: [
new Element('Reference', 'ErrorCodes', valueType: 'string')
]),
'test', // Логин, test - для тестового окружения
'2016' // Пароль, 2016 - для тестового окружения
));
// Ошибкой будет считаться только неудачный сетевой запрос
if ($errors !== false) {
var_dump($get->getResult());
} else {
var_dump($get->getLastError());
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.