nztforum / lzt-invoices-php
PHP library for the Lolzteam Market Invoices
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/nztforum/lzt-invoices-php
Requires
This package is auto-updated.
Last update: 2025-12-14 18:41:49 UTC
README
PHP library for the Lolzteam Market Invoices
Requirements
PHP 8.3.0 and later.
Composer
You can install the bindings via Composer. Run the following command:
composer require nztforum/lzt-invoices-php
To use the bindings, use Composer's autoload:
require_once 'vendor/autoload.php';
Getting Started
Simple usage looks like (creating invoice):
try { $api = new LZT\Api('YOUR_API_KEY'); $payUrl = $api->invoice([ 'currency' => 'rub', 'amount' => 500, 'payment_id' => random_int(100, 100000), 'comment' => 'Test invoice', 'url_success' => 'https://lolz.live/', 'url_callback' => 'https://example.com/callback', 'merchant_id' => 1, 'lifetime' => 3600, ]); } catch (\LZT\Exception $e) { // handle errors $errors = $e->getErrors(); } // Get info by payment_id / invoice_id $info = $api->info(paymentId: 10000); // or $info = $api->info(invoiceId: 500);
Webhook verify
$webhook = new LZT\Webhook('YOUR_MERCHANT_SECRET'); if ($webhook->verify()) { echo 'Webhook verified'; } else { echo 'Webhook verification failed'; }