Download the PHP package beziworld/laravel-serwersms without Composer

On this page you can find all versions of the php package beziworld/laravel-serwersms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-serwersms

Laravel SerwerSMS

tests Latest Version

Laravel integration for SerwerSMS.pl (HTTPS API v2): SMS ECO and FULL, personalised, voice and MMS messages, a notification channel, delivery report and incoming message webhooks, HLR checks and multiple accounts.

Polska wersja dokumentacji

Features

Installation

Sending messages

Other options: toGroup(), toContact(), utf(), flash(), speed(), validity($minutes), dlrUrl(), test(). When the message has a sender and the text contains characters outside the GSM alphabet, utf is enabled automatically (set SERWERSMS_UTF=false to disable it).

Segment estimate before sending: SmsCounter::parts($text) and SmsCounter::encoding($text) (Beziworld\SerwerSms\Support\SmsCounter).

Account and data

Notification channel

The recipient is taken from the notifiable:

On-demand: Notification::route('serwersms', '500600700')->notify(new OrderShipped($order));

A message may define its own recipients with ->to() and its account with ->connection('shop'). A notifiable without a phone number is skipped silently.

Delivery reports and incoming messages

  1. Enable the endpoints and choose a secret token:

  2. In the SerwerSMS.pl panel (Ustawienia interfejsów > HTTPS XML API > Raporty doręczeń) set the delivery report URL template (or send it with every message through SERWERSMS_DLR_URL / dlrUrl()):

    Forward incoming messages (SMS ECO replies, ND/NDI) to https://your-app.com/serwersms/incoming?token=long-random-string&phone=...&text=... using the placeholders offered by the panel for the sender number, text and date. MMS posted in the items format of the API are supported too.

  3. Listen to the events:

Both endpoints answer OK, which stops the retries of SerwerSMS.pl (5, 15, 60 minutes and 24 hours). SerwerSMS.pl does not sign callbacks, hence the token: without a configured token every request is rejected. The token travels in the query string and appears in access logs, so use a long random value and the IP allow-list. Add &connection=shop to the URL in multi-account setups; it is exposed as $event->report->connection. Keep listeners idempotent.

Multiple accounts

Options outside connections (test_mode, utf, dlr_url, http, ...) are shared and may be overridden per connection.

Error handling

All exceptions extend Beziworld\SerwerSms\Exceptions\SerwerSmsException:

Exception When
ApiException SerwerSMS.pl returned an error (errorCode(), errorType(), httpStatus(), payload()) or could not be reached
InvalidMessage Message without recipients or content, invalid unique_id
InvalidConfiguration Missing credentials or unknown connection
CouldNotSendNotification Notification without a valid toSerwerSms()

SerwerSMS.pl reports errors with HTTP 200 and an error object, for example 1001 InvalidUser, 1012 InvalidToken, 3002 (SMS FULL limit exhausted) or 3106 (sender name not allowed). isAuthenticationError() covers the credential errors.

Retries

Retries are disabled by default (SERWERSMS_RETRIES=0): a request that timed out may still have been accepted, and repeating it would send the SMS twice. When enabling retries, give every message a uniqueId() and enable duplicate control of unique_id in the panel.

Testing your application

Development

Author

Created and maintained by Kamil Ćwiertnia, beziworld.eu.

Need a custom integration, an SMS gateway setup or a Laravel project? Get in touch through beziworld.eu.

License

MIT. See LICENSE.md. This package is not affiliated with SerwerSMS.pl.


All versions of laravel-serwersms with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-json Version *
illuminate/notifications Version ^12.0|^13.0
guzzlehttp/guzzle Version ^7.8
illuminate/contracts Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/routing Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package beziworld/laravel-serwersms contains the following files

Loading the files please wait ...