1. Go to this page and download the library: Download texhub/virtual-pos-andoz 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/ */
texhub / virtual-pos-andoz example snippets
use TexHub\VirtualPosAndoz\VirtualPos;
use TexHub\VirtualPosAndoz\Enums\TaxType;
use TexHub\VirtualPosAndoz\Requests\Product;
use TexHub\VirtualPosAndoz\Requests\ReceiptRequest;
$pos = VirtualPos::make('YOUR_OFD_TOKEN');
// 1) Open a shift
$pos->register()->openShift('Бульбашев Б.Б.');
// 2) Issue a cash income receipt
$receipt = $pos->receipts()->create(
ReceiptRequest::income(TaxType::General)
->addProduct(Product::make('Шкаф', price: 10000, quantity: 1))
->cash(10000)
->consumer('[email protected]')
->externalId('7887788778')
);
echo $receipt->get('fdNumber'); // 3
echo $receipt->get('fpd'); // 0305354977
// 3) Close the shift
$pos->register()->closeShift('Бульбашев Б.Б.');
use TexHub\VirtualPosAndoz\Config;
use TexHub\VirtualPosAndoz\VirtualPos;
$pos = new VirtualPos(new Config(token: 'TOKEN', authPrefix: 'Bearer'));