2017 © Pedro Peláez
 

library whmcs

WHMCS API for Laravel 5

image

gufy/whmcs

WHMCS API for Laravel 5

  • Saturday, April 14, 2018
  • by mgufron
  • Repository
  • 10 Watchers
  • 12 Stars
  • 1,256 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 11 Forks
  • 4 Open issues
  • 9 Versions
  • 3 % Grown

The README.md

Laravel WHMCS API

Important Notes

For Laravel 4, please refer to this notes. Click Here, (*1)

Laravel 5 - Simple package for WHMCS external API., (*2)

Installation

Run this to install on your current project, (*3)

$ composer require gufy/whmcs:~2

Or you can add this package to your composer.json file:, (*4)

"require": {
    "gufy/whmcs": "~2"
}

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

$ composer update

Configuration

Registering the Package

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

'Gufy\Whmcs\WhmcsServiceProvider'

Publish the configuration

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

php artisan vendor:publish gufy/whmcs

Setting you API URL

go to config/whmcs.php and set the parameters, (*8)

return array(

    'username'      =>  'api-username',
    'password'      =>  'api-password', // fill these if you want to use username password
    'auth_type'     =>  'password', // password or api_key
    'url'           =>  'http://www.site.com/whmcs/includes/api.php', // API url
    'response'  => 'object', // you can fill with either object or array
);

Usage

Basic usage

Logging a user to WHMCS, (*9)

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

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

// or

$login = Whmcs::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, (*10)

Dynamic Configuration

If your site has multiple whmcs configuration, you sure will do override configuration like this, (*11)

\Config::set('whmcs.url','http://whmcs.site.com/includes/api.php');
\Config::set('whmcs.password','your_password');
\Config::set('whmcs.username','your_username');

The Versions

14/04 2018

dev-master

9999999-dev https://github.com/mgufrone/whmcs-api.git

WHMCS API for Laravel 5

  Sources   Download

MIT

The Requires

 

by Mochamad Gufron
by Rodrigo Queiroz

laravel api php whmcs

02/07 2016

v2.1.0

2.1.0.0 https://github.com/mgufrone/whmcs-api.git

WHMCS API for Laravel 5

  Sources   Download

MIT

The Requires

 

by Mochamad Gufron
by Rodrigo Queiroz

laravel api php whmcs

10/03 2016

v2.0.5

2.0.5.0 https://github.com/mgufrone/whmcs-api.git

WHMCS API for Laravel 5

  Sources   Download

MIT

The Requires

 

by Mochamad Gufron
by Rodrigo Queiroz

laravel api php whmcs

04/03 2016

v2.0.4

2.0.4.0 https://github.com/mgufrone/whmcs-api.git

WHMCS API for Laravel 5

  Sources   Download

MIT

The Requires

 

by Mochamad Gufron
by Rodrigo Queiroz

laravel api php whmcs

16/01 2016

v2.0.3

2.0.3.0 https://github.com/mgufrone/whmcs-api.git

WHMCS API for Laravel 4

  Sources   Download

MIT

The Requires

 

by Mochamad Gufron
by Rodrigo Queiroz

laravel api php whmcs

11/01 2016

v2.0.1

2.0.1.0 https://github.com/mgufrone/whmcs-api.git

WHMCS API for Laravel 4

  Sources   Download

MIT

The Requires

 

by Mochamad Gufron
by Rodrigo Queiroz

laravel api php whmcs

20/05 2015

v2.0.0

2.0.0.0 https://github.com/mgufrone/whmcs-api.git

WHMCS API for Laravel 4

  Sources   Download

MIT

The Requires

 

by Mochamad Gufron
by Rodrigo Queiroz

laravel api php whmcs

21/07 2014

v1.0.1

1.0.1.0 https://github.com/mgufrone/whmcs-api.git

WHMCS API for Laravel 4

  Sources   Download

MIT

The Requires

 

by Mochamad Gufron
by Rodrigo Queiroz

laravel api php whmcs

18/07 2014

v1.0.0

1.0.0.0 https://github.com/mgufrone/whmcs-api.git

WHMCS API for Laravel 4

  Sources   Download

MIT

The Requires

 

by Mochamad Gufron
by Rodrigo Queiroz

laravel api php whmcs