PHPackages                             gelo11/smstraffic-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. gelo11/smstraffic-client

ActiveLibrary[API Development](/categories/api)

gelo11/smstraffic-client
========================

SmsTraffic HTTP API client for PHP 8.4+

v1.0.0(6mo ago)01MITPHPPHP ^8.4

Since Oct 21Pushed 6mo agoCompare

[ Source](https://github.com/gelo11/smstraffic-client)[ Packagist](https://packagist.org/packages/gelo11/smstraffic-client)[ Docs](https://github.com/gelo11/smstraffic-client)[ RSS](/packages/gelo11-smstraffic-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

SmsTraffic HTTP API Client для PHP
==================================

[](#smstraffic-http-api-client-для-php)

Легковесный, типобезопасный и полностью тестируемый клиент для работы с **SmsTraffic HTTP API** на PHP 8.4+.

Соблюдает принципы **SOLID**, **PSR-4**, использует **immutable DTO**, **enums** и современные возможности PHP.

Требования
----------

[](#требования)

- **PHP 8.4 или выше**
- Расширение `ext-simplexml` (включено по умолчанию в большинстве сборок)
- Composer для управления зависимостями

Автоматически устанавливает:

- `guzzlehttp/guzzle` — для HTTP-запросов

Быстрый старт
-------------

[](#быстрый-старт)

1. Установите пакет:

```
composer require gelo11/smstraffic-client
```

2. Отправьте SMS:

```
use Gelo11\SmsTraffic\SmsTrafficClient;
use Gelo11\SmsTraffic\SmsTrafficConfig;
use Gelo11\SmsTraffic\Client\GuzzleHttpClient;
use Gelo11\SmsTraffic\Parser\SimpleXmlResponseParser;
use Gelo11\SmsTraffic\Request\SendSmsRequest;

$config = new SmsTrafficConfig('ваш_логин', 'ваш_пароль');

$client = new SmsTrafficClient(
    $config,
    new GuzzleHttpClient(new \GuzzleHttp\Client()),
    new SimpleXmlResponseParser()
);

$request = new SendSmsRequest(
    phones: '79051112233',
    message: 'Привет!',
    originator: 'MySender',
    wantSmsIds: true
);

$response = $client->sendSms($request);
echo "Отправлено: {$response->description}\n";
```

3. Обработка ошибок

```
use Gelo11\SmsTraffic\Exception\SmsTrafficException;
use Gelo11\SmsTraffic\Model\ErrorCode;

try {
    $client->sendSms($request);
} catch (SmsTrafficException $e) {
    if ($e->getCode() === ErrorCode::INSUFFICIENT_FUNDS) {
        // Обработка нехватки средств
    }
}
```

4. Работа со статусами

```
use Gelo11\SmsTraffic\Model\Status;

$status = Status::fromString('Delivered');
echo $status->isFinal() ? 'Доставлено' : 'В обработке';
```

Методы
------

[](#методы)

Клиент поддерживает следующие операции:

МетодНазначениеПример использования`sendSms(SendSmsRequest $request)`Отправка SMS на один или несколько номеров`new SendSmsRequest(...)``getStatus(GetStatusRequest $request)`Получение статуса по ID сообщений`new GetStatusRequest(['1001', '1002'])``getBalance(GetBalanceRequest $request)`Проверка баланса аккаунта`new GetBalanceRequest()``getIncomingSms(GetIncomingSmsRequest $request)`Получение входящих SMS`new GetIncomingSmsRequest()`Лицензия
--------

[](#лицензия)

Этот проект распространяется под лицензией MIT.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance70

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

200d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/02b57444d417b638f67855f7d2415e61951ea713877e8410bacbb73f05ae6824?d=identicon)[gelo11](/maintainers/gelo11)

---

Top Contributors

[![gelo11](https://avatars.githubusercontent.com/u/3087891?v=4)](https://github.com/gelo11 "gelo11 (3 commits)")

---

Tags

apiclientsmssms-gatewaysmstraffic

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gelo11-smstraffic-client/health.svg)

```
[![Health](https://phpackages.com/badges/gelo11-smstraffic-client/health.svg)](https://phpackages.com/packages/gelo11-smstraffic-client)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

611.5M5](/packages/crowdin-crowdin-api-client)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[ardakilic/mutlucell

Mutlucell SMS API wrapper for sending sms text messages for Laravel

457.3k](/packages/ardakilic-mutlucell)[markrogoyski/numverify-api-client-php

Numverify API Client for PHP

1220.9k](/packages/markrogoyski-numverify-api-client-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
