2017 © Pedro Peláez
 

library whmcs-api

Whmcs API for Laravel 4

image

queiroz/whmcs-api

Whmcs API for Laravel 4

  • Thursday, March 2, 2017
  • by queiroz
  • Repository
  • 5 Watchers
  • 12 Stars
  • 173 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

WHMCS-API

Laravel 4 - Simple package for WHMCS external API, (*1)

Installation

Add whmcs-api to your composer.json file:, (*2)

"require": {
    "queiroz/whmcs-api": "dev-master"
}

Use composer to install this package., (*3)

$ composer update

Configuration

Registering the Package

register this service provider at the bottom of the $providers array: app.php, (*4)

'Queiroz\WhmcsApi\WhmcsApiServiceProvider'

Setting you API URL

go to laravel/vendor/queiroz/whmcs-api/src/config/config.php and set the parameters, (*5)

return array(

    'username'  =>  'api-username',
    'password'  =>  'api-password',
    'url'       =>  'http://www.site.com/whmcs/includes/api.php', // API url

);

Publish the configuration

When this command is executed, the configuration files for your application will be copied to app/config/packages/queiroz/whmcs-api where they can be safely modified by the developer!, (*6)

php artisan config:publish queiroz/whmcs-api

Usage

Basic usage

Logging a user to WHMCS, (*7)

$username = 'client';   // Client Username
$password = 'password'; // Client Password

$login = Whmcs::execute('validatelogin', array('email' => $username, 'password2' => $password));

if($login->result == 'success') {
    echo 'User Logged In';
} elseif($login->result == 'error') {
    echo $login->message;
}

For reference on WHMCS API please follow http://docs.whmcs.com/API, (*8)

The Versions

02/03 2017

dev-master

9999999-dev https://github.com/queiroz/whmcs-api

Whmcs API for Laravel 4

  Sources   Download

MIT

The Requires

 

by Rodrigo Queiroz

laravel api php whmcs