Jump to content

Call to undefined function localAPI()


anup

Recommended Posts

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);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated