Download the PHP package gufy/whmcs without Composer

On this page you can find all versions of the php package gufy/whmcs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package whmcs

Laravel WHMCS API

Important Notes

For Laravel 4, please refer to this notes. Click Here

Laravel 5 - Simple package for WHMCS external API.

Installation

Run this to install on your current project

$ composer require gufy/whmcs:~2

Or you can add this package to your composer.json file:

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

Use composer to install this package.

$ composer update

Configuration

Registering the Package

register this service provider at the bottom of the $providers array: app.php

'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!

php artisan vendor:publish gufy/whmcs

Setting you API URL

go to config/whmcs.php and set the parameters

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

$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

Dynamic Configuration

If your site has multiple whmcs configuration, you sure will do override configuration like this

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

All versions of whmcs with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~5
guzzlehttp/guzzle Version ~6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gufy/whmcs contains the following files

Loading the files please wait ....