starrys / starrys-sdk
There is no license information available for the latest version (dev-master) of this package.
Starrys
dev-master
2017-11-22 11:39 UTC
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: 4.*
This package is not auto-updated.
Last update: 2025-07-10 04:47:53 UTC
README
SDK для работы с API облачного сервиса Чек онлайн СТАРРУС
Отлично подходит для любых интернет магазинов.
Примеры использования
use Starrys\Cashbox\Api;
use Starrys\Cashbox\Commands\ComplexCommand;
use Starrys\Cashbox\Line;
use Starrys\Cashbox\DocumentType;
use Starrys\Cashbox\PayAttribute;
$host = 'https://fce.starrys.ru:4443';
$api = new Api($host);
$api->setClientName('custom');
$api->setClientVer('1.0');
$api->setCertificate('cert', 'cert_key', 'cert_password');
$command = new ComplexCommand('requestId', 'clientId');
$command->setPhoneOrEmail('customer@example.com')
->setNonCash(array(0,10000,0))
->setTaxMode(pow(2, 0))
->setMaxDocumentsInTurn(20)
->setGroup('')
->setDocumentType(DocumentType::DEBIT)
->setPassword(1)
->setFullResponse(false)
->setDevice('auto');
$line = new Line();
$line->setDescription('Товар')
->setPayAttribute(PayAttribute::FULL_PAYMENT)
->setPrice(10000)
->setQty(1000)
->setTaxId(2);
$command->addLine($line);
$result = $api->executeCommand($command);
$request = $result->getRequest();
Установка
composer require starrys/starrys-sdk