Anyone having issue with Internal API? It stop working after 7.2.2 update. Getting "Call to undefined function localAPI()"
My Code:
/**
* WHMCS Sample Local API Call
*
* @package WHMCS
* @author WHMCS Limited <development@whmcs.com>
* @copyright Copyright (c) WHMCS Limited 2005-2016
* @license http://www.whmcs.com/license/ WHMCS Eula
* @version $Id$
* @link http://www.whmcs.com/
*/
// Define parameters
$command = 'AddClient';
$postData = array(
'firstname' => 'John',
'lastname' => 'Doe',
'email' => 'john.doe@example2.com',
'address1' => '123 Main Street',
'city' => 'Anytown',
'state' => 'ST',
'postcode' => '12345',
'country' => 'US',
'phonenumber' => '800-555-1234',
'password2' => 'password',
'cardtype' => 'Visa',
'cardnum' => '4111111111111111',
'expdate' => '0721',
'clientip' => '1.2.3.4',
);
$adminUsername = 'admin'; // Yes, the user name exist and assign to API permission..
$results = localAPI($command, $postData, $adminUsername);
print_r($results);