rsupan/globelabs

There is no license information available for the latest version (0.0.5) of this package.

Composer Package for GlobeLabs

0.0.5 2015-08-07 04:06 UTC

This package is not auto-updated.

Last update: 2024-05-15 08:18:19 UTC


README

  • Simple PHP Wrapper for Globelabs SMS and Charging API

Usage

SMS API

  <?php
    require_once __DIR__ . '/../vendor/autoload.php';

    use Globelabs\SMS;

    $options = [
      'sender_address' => '{your_sender_address}',
      'access_token' => '{your_access_token}',
      'message' => 'hello',
      'address' => '0906xxxxxxx',
    ];

    var_dump(SMS::send_to($options));
  ?>

Charging API

  <?php
    require_once __DIR__ . '/../vendor/autoload.php';

    use Globelabs\Charging;

    $options = [
      'amount' => '0.00',
      'description' => 'Allowance',
      'msisdn' => '906xxxxxxxx',
      'transactionOperationStatus' => 'Charged',
      'reference_code' => '{reference_code_see_documentation}',
      'access_token' => '{access_token}',
    ];

    var_dump(Charging::charge_to($options));

  ?>

Help and docs

Globelabs API Documentation.

Installing Globelabs

The recommended way to install Globelabs is through Composer.

# Install Composer
  curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest stable version of Globelabs:

  composer.phar require rsupan/globelabs 0.0.5

or add

  "require": {
        "rsupan/globelabs": "0.0.5"
    }

to your composer.json file

After installing, you need to require Composer's autoloader:

  require 'vendor/autoload.php';

You can then later update Globelabs using composer:

 composer.phar update