PHPackages                             messagecloud/gateway-php - 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. [Payment Processing](/categories/payments)
4. /
5. messagecloud/gateway-php

ActiveLibrary[Payment Processing](/categories/payments)

messagecloud/gateway-php
========================

A PHP library to help you integrate the MessageCloud Gateway.

v1.0.0(10y ago)137.2k4[3 issues](https://github.com/MessageCloud/gateway-php/issues)[6 PRs](https://github.com/MessageCloud/gateway-php/pulls)PHPPHP &gt;=5.3.0

Since Apr 29Pushed 3y ago4 watchersCompare

[ Source](https://github.com/MessageCloud/gateway-php)[ Packagist](https://packagist.org/packages/messagecloud/gateway-php)[ Docs](http://www.txtnation.com)[ RSS](/packages/messagecloud-gateway-php/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)Dependencies (6)Versions (8)Used By (0)

MessageCloud Gateway PHP Library
================================

[](#messagecloud-gateway-php-library)

The MessageCloud Gateway PHP Library works with PHP 5.4+. It is also compatible with PHP 7.

Documentation
-------------

[](#documentation)

If you would rather build on top of the Gateway API from scratch, further documentation can be found in the [MessageCloud Gateway docs](https://docs.messagecloud.com/article/114-gateway).

Prerequisites
-------------

[](#prerequisites)

This library has been developed and tested on Mac OS 10.11.4 and Fedora 22.

The following README assumes that you are using the following PHP extensions:

- php-curl
- php-mbstring

Installation
------------

[](#installation)

### Building with Composer

[](#building-with-composer)

Using [Composer](https://getcomposer.org/) you can easily download and build the app:

```
$ composer require messagecloud/gateway-php
```

### Importing the Library

[](#importing-the-library)

All you need to do to get started is add the following line at the top of your script:

```
require_once 'vendor/autoload.php';
```

To test that the library is working correctly you can run the following:

```
$objMessage = new SMSMessage(YOUR_COMPANY_NAME_HERE, YOUR_EKEY_HERE);
$objResult = $objMessage->msisdn('447528748500')->body('Hello, world!')->senderId('MessageCloud')->send();

if ($objResult->success()) {
    echo $objResult->getCallbackId();
} else {
    echo 'Error sending message! Code: ' . $objResult->getErrorCode() . ' (' . $objResult->getErrorMessage() . ')';
}
```

To which you will get a result similar to the following:

```
$ php test.php
123e4567-e89b-12d3-a456-426655440000
```

The callback ID can be used when receiving the delivery reports for your requests. Each delivery report will contain an `id` parameter containing the ID returned by the SMSMessage::getCallbackId() function.

You can also include the following line underneath your `require_once()` function as a shortcut to the SMSMessage object:

```
use MessageCloud\Gateway\SMSMessage as SMSMessage;
```

Using the Library
-----------------

[](#using-the-library)

Check out the [examples](examples/) of how to use this library. They can be found in the examples/ directory.

Testing
-------

[](#testing)

You can test the library by using the following command (dev only):

```
$ composer test
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 68.1% 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

3669d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2050d696a456aef23e9b0cb6b49e71e1a8ee0f1f99fa24f965b8d7305bf1de3a?d=identicon)[marcoleary](/maintainers/marcoleary)

![](https://www.gravatar.com/avatar/cb3565d0af2fe52e6c9a9748dc40f5d5517d320a435adc3d660552d82738c325?d=identicon)[ethanbray](/maintainers/ethanbray)

---

Top Contributors

[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (49 commits)")[![marcoleary](https://avatars.githubusercontent.com/u/3300320?v=4)](https://github.com/marcoleary "marcoleary (15 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![jwoww](https://avatars.githubusercontent.com/u/7689190?v=4)](https://github.com/jwoww "jwoww (2 commits)")[![Syriane-B](https://avatars.githubusercontent.com/u/55975077?v=4)](https://github.com/Syriane-B "Syriane-B (1 commits)")[![tchapuis](https://avatars.githubusercontent.com/u/15218089?v=4)](https://github.com/tchapuis "tchapuis (1 commits)")

---

Tags

smssms-apisms-gatewaysmscsmsmessagebillingphonesmsmobiletextCell

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/messagecloud-gateway-php/health.svg)

```
[![Health](https://phpackages.com/badges/messagecloud-gateway-php/health.svg)](https://phpackages.com/packages/messagecloud-gateway-php)
```

###  Alternatives

[lemonsqueezy/laravel

A package to easily integrate your Laravel application with Lemon Squeezy.

58596.1k](/packages/lemonsqueezy-laravel)[shetabit/multipay

PHP Payment Gateway Integration Package

291348.2k3](/packages/shetabit-multipay)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[telesign/telesign

TeleSign SDK

162.1M2](/packages/telesign-telesign)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)

PHPackages © 2026

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