### Installing Business.Ru Open API SDK (Composer) Source: https://github.com/business-ru/open-api-sdk-php/blob/main/README.md Command to install the Business.Ru Open API SDK library using the Composer dependency manager. This requires Composer to be installed on your system. ```bash composer require business-ru/open-api-sdk-php ``` -------------------------------- ### Getting System State (PHP) Source: https://github.com/business-ru/open-api-sdk-php/blob/main/README.md Calls the getStateSystem method on the initialized Open API client instance to retrieve information about the current state of the system. ```php getStateSystem(); ``` -------------------------------- ### Getting Command Status by ID (PHP) Source: https://github.com/business-ru/open-api-sdk-php/blob/main/README.md Sets a variable $commandID with the identifier of a previously issued command. Calls the dataCommandID method on the initialized Open API client instance to retrieve the status and details of that specific command. ```php dataCommandID($commandID); ``` -------------------------------- ### Initializing Business.Ru Open API Client (PHP) Source: https://github.com/business-ru/open-api-sdk-php/blob/main/README.md Demonstrates how to include necessary files, set the API endpoint URL (v1 or v2), provide client credentials (appID, secretKey), and create an instance of the OpenClient class for interacting with the Business.Ru Open API. Requires PHP 7.4+ and the cURL extension. ```php "Тестовый кассир", "smsEmail54FZ" => "test@test.ru", "c_num" => "1111222333", "payed_cashless" => 1000, "goods" => [ [ "count" => 2, "price" => 500, "sum" => 1000, "name" => "Товар 1", "nds_value" => 20, "nds_not_apply" => false, "payment_mode" => 1, "item_type" => 1 ] ] ]; $openApiClient->printPurchaseReturn($command); ``` -------------------------------- ### Opening Shift (PHP) Source: https://github.com/business-ru/open-api-sdk-php/blob/main/README.md Calls the openShift method on the initialized Open API client instance to perform the operation of opening a fiscal shift. ```php openShift(); ``` -------------------------------- ### Printing Purchase Check (PHP) Source: https://github.com/business-ru/open-api-sdk-php/blob/main/README.md Demonstrates how to structure the command data array for a purchase check, including author, contact info, check number, payment details, and item list. Calls the printCheck method with this command data to initiate printing. ```php "Тестовый кассир", "smsEmail54FZ" => "test@test.ru", "c_num" => "1111222333", "payed_cashless" => 1000, "goods" => [ [ "count" => 2, "price" => 500, "sum" => 1000, "name" => "Товар 1", "nds_value" => 20, "nds_not_apply" => false, "payment_mode" => 1, "item_type" => 1 ] ] ]; $openApiClient->printCheck($command); ``` -------------------------------- ### Closing Shift (PHP) Source: https://github.com/business-ru/open-api-sdk-php/blob/main/README.md Calls the closeShift method on the initialized Open API client instance to perform the operation of closing a fiscal shift. ```php closeShift(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.