Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nadar/aspsms

Simple to use sms sending class for the aspsms.com gateway.
https://github.com/nadar/aspsms

aspsms gateway php sms sms-client

Last synced: 29 days ago
JSON representation

Simple to use sms sending class for the aspsms.com gateway.

Awesome Lists containing this project

README

        

# SMS wrapper class for ASPSMS

[![Latest Stable Version](https://poser.pugx.org/nadar/aspsms/v/stable)](https://packagist.org/packages/nadar/aspsms)
[![Total Downloads](https://poser.pugx.org/nadar/aspsms/downloads)](https://packagist.org/packages/nadar/aspsms)

A very simple to use sms sending class for the [aspsms.com](http://aspsms.com) gateway.

## Installation

The recommended way to install is through [Composer](http://getcomposer.org):

```sh
composer require nadar/aspsms
```

## Usage

```php
', '', array(
'Originator' => ''
));

// set message and recipients with tracking their individual tracking numbers.
// attention: verify your tracking numbers first with $aspsms->verifyTrackingNumber(..);
$send = $aspsms->sendTextSms('', array(
'' => '',
'' => '',
'' => ''
));

// the message was rejected by aspsms or your authentication credentials where wrong.
if (!$send) {
echo "[ASPSMS] Error while sending text message: " . $aspsms->getSendStatus();
}

// aspsms takes a little time to delivery your message. You can also send the message and
// store the tracking numbers in a database, so you could retrieve the delivery status later.
sleep(10);

// get deliver status response
$status1 = $aspsms->deliveryStatus('');
$status2 = $aspsms->deliveryStatus('');
$status3 = $aspsms->deliveryStatus('');

var_dump($status1, $status2, $status3);
```

## Contributing

#### Quick guide:

+ Fork the repo.
+ Install dependencies: `composer install`.
+ Make changes.
+ If you are adding functionality or fixing a bug - Please add a unit test!
+ Ensure coding standards.

#### Unit Tests

In order to run the test suite, install the development dependencies:

```sh
composer install
```

Rename the `phpunit.xml.dist` file to `phpunit.xml`, then uncomment the following lines and add your const values:

```xml




```

Test your code with the following command:

```sh
./vendor/bin/phpunit
```

Run the coding standard fixer before send a new pull request.

```sh
./vendor/bin/php-cs-fixer fix src/
```

You're done. Thanks!