whmcs / developer-docs Goto Github PK
View Code? Open in Web Editor NEWDeveloper documentation portal content
Developer documentation portal content
I want to know where is User API...Not Admin...
On the 3D Secure Process page there is a link to a missing page:
"The return url should be a callback file to handle the response."
http://developers.whmcs.com/quick-start/ referred to in the documentation doesn't exist.
Hi,
We are not receiving the phone number or email address data within the transaction request on the BluePay gateway. Can you please verify which fields email address and phone number are mapped to within your whmcs software. The correct field names are below.
Email address = EMAIL
Phone number = PHONE
Please help me in getting this fixed. Your help will be highly appreciated.
Hello!
On page https://developers.whmcs.com/addon-modules/
Provisioning Modules (https://developers.whmcs.com/addon-modules/provisioning-modules) link doesn`t exist.
https://developers.whmcs.com/advanced/creating-pages/
Instructions are fine until this line:
"Now when ready to test, upload the PHP file to the root WHMCS directory and the template file to your active template directory. Then visit the PHP file in your browser to try it."
But this is confusing - nowhere in the example does it mention the need for both the PHP and a template file. I think what the instructions mean are; you need to create two files 1) a tpl page and 2) your custom php page - however, the article on really deals with creating one file (the example). It also doesn;t really explain how the two files are linked.
The page could be written more clearly with better instructions for creating both files (php file and the tpl file).
Thanks
There must be lots of things just like use WHMCS\ClientArea;
. But there is no documents about it.
Where is those documents?
For example: what method dose ClientArea had?
I am doing some maintenance on an existing project that uses WHMCS Third Party Gateways. In trying to research my issue, I came across the page located here. It says "...refer to the Refund section on page 7 of the sample module."
From my Googling "WHMCS sample module", it appears there are a whole lot of sample modules, none of which seem to have pages. Could you please link the correct sample module and page to this confusing part of the text? I only started working with WHMCS two days ago and I'm not sure how all of it works, but this looks like something I should be able to click a link on to refer to.
Thank you very much!
On page https://developers.whmcs.com/advanced/currency-formatting/, on bottom link "See http://docs.whmcs.com/classes/7.0/WHMCS/View/Formatter/Price.html for more information." - wrong.
On GetPromotions response json, replace:
"paymentmethods": { "paymentmethod": [ {
with:
"promotions":{"promotion":[{
From your sample registrar project.
http://developers.whmcs.com/domain-registrars/check-availability/
I receive a error message:
{
"result": "error",
"message": "Command Not Found"
}
It is mentioned on https://developers.whmcs.com/api-reference/domaingetnameservers/
That possible error condition responses include:
I get Registrar Error Message, It would be nice to have little explanation for what this error message is for.
In Hooks index,
AfterRegistrarTransfer
AfterRegistrarTransfer => this should be for (Executes after a successful domain transfer )
AfterRegistrarTransferFailed
On the Developer Provisioning Page are the images Broken.
https://developers.whmcs.com/provisioning-modules/simple-mode/
The Default value of "radio" does not work as described in the documentation. The Example provided does also not work:
"disk" => [
"FriendlyName" => "Disk Space",
"Type" => "radio", # Radio Selection of Options
"Options" => "100MB,200MB,300MB",
"Description" => "Radio Options Demo",
"Default" => "200MB",
],
Broken link
https://developers.whmcs.com/api-reference/updateinvoice/
The content on the update invoice page appears to be incorrect as per the pull request #10 it appears that Update has been replaced with Create but I am not familiar enough with the api to know.
Hi,
The hooks "Defining Priority" page generates an 404 error:
To reproduce:
Hello,
Guys I think UpdateInvoice Request Parameter newitemdescription
newitemamount
newitemtaxed
Description Need a update. It only accept array. For example
'newitemdescription' => 'Updated Invoice Item' , 'newitemamount' => 100, 'newitemtaxed' => false
Code above not work, then i try the following. And it working.
'newitemdescription' => array('0' => 'Updated Invoice Item' ), 'newitemamount' => array('0' => 100 ), 'newitemtaxed' => false
The documentation for AddOrder does not describe how to add standard fields - only custom and optional fields.
Such as:
Hi,
I would like to know if there is a way to update a product configurable option through the API?
I already looked into the API Index but could only find API to create a product and nothing related to edit configurable options.
Thanks
I noticed that that the following needs changed from:
use WHMCS\Module\Addon
use WHMCS\Module\Addon\
To:
use WHMCS\Modules\Addons
use WHMCS\Modules\Addons
also, when I configure the module, a name doesn't even show when I try and activate it from the admin console.
Please see link. Returns 404
https://developers.whmcs.com/provisioning-modules/3d-secure
Link originated from https://developers.whmcs.com/payment-gateways/merchant-gateway/
Here are some dead links I've found:
See: https://www.google.com.au/search?q=whmcs+hooks
Perhaps setup some 301 redirects for these?
I wroted a Provisioning Module called license and it works well. But i am confused with Custom Functions.
For example, i wroted this:
function license_reset($vars){
file_put_contents('/homw/wwwroot/leotome.org/a.txt','a');
die();
}
and the TPL file is like this:
<form method="post" action="clientarea.php?action=productdetails">
<input type="hidden" name="id" value="{$serviceid}" />
<input type="hidden" name="modop" value="custom" />
<input type="hidden" name="a" value="reset" />
<input class="btn btn-warning btn-xs" type="submit" value="Reset License" />
</form>
But once i click that button, i only get the page refreshed.
How can i deal with that?
https://developers.whmcs.com/provisioning-modules/single-sign-on/
has a link in the example code to:
http://docs.whmcs.com/Provisioning_Module_SDK_Parameters
which doesn't exist.
Also, the example code contains a syntax error,
$return = array(
'success' = false,
);
Should be either:
$return = array(
'success' => false,
);
or with PHP5.4+ short array syntax:
$return = [
'success' => false,
];
I am trying to do an API call with the GetClients action and it will only return 25 records regardless of the limitnum and limitstart params.
Hello,
When i clicked on Third Party gateway link then i'm getting page not found "https://developers.whmcs.com/payment-gateways/third-party-gateways".
Please resolve it.
Thanks
Harpreet Singh
In the list of Request parameters, it shows autoapplycredit; but in the code examples this is displayed as "autoappliedcredit". Need some clarity on which is correct.
Did GetClientCustomFields get dropped? If so, at what version was this removed? I do not see it listed in the (current) API Index.
in the footer
qiuck start --> https://developers.whmcs.com/quick-start/
Hey,
I've been working with WHMCS for quite some time now. Great job btw.
For the project I am working on right now, I am using the API a lot. But it has some shortcomings for what I am doing right now.
A quick sketch:
WHMCS will be used in this case as a pure client management system and provisioning system. All other tasks happen in a standalone laravel/angular web app. Basically, we are creating a whole new front end and backend on a separate system. The reason why we are doing this is that we started developing our own public and internal API and most of our modules are accessible trough this API, this is where WHMCS was giving me a headache. To let everything work well with each other we need some extra API functions in WHMCS. After a lot of experimenting and reading outdated blog posts, I managed to write custom API functions in WHMCS. Maybe it isn't a bad idea to include this in the documentation.
A quick and dirty example how I created a new API function in WHMCS to return some information about the company:
<?php
use Illuminate\Database\Capsule\Manager as Capsule;
if (!defined("WHMCS")) die("This file cannot be accessed directly");
function get_env($vars) {
$array = array('action' => array(), 'params' => array());
if(isset($vars['cmd'])) {
//Local API mode
$array['action'] = $vars['cmd'];
$array['params'] = (object)$vars['pid'];
$array['adminuser'] = $vars['adminuser'];
} else {
//Post CURL mode
$array['action'] = $vars['_POST']['action'];
unset($vars['_POST']['username']);
unset($vars['_POST']['password']);
unset($vars['_POST']['action']);
$array['params'] = (object)$vars['_POST'];
}
return (object)$array;
}
try {
// Get the arguments
$vars = get_defined_vars();
$postFields = getParam($vars);
$data = Capsule::table('tblconfiguration')->get();
$data = array(
'companyname' => $data{1}->value,
'email' => $data{2}->value,
'logo' => $data{4}->value,
'tos' => $data{24}->value,
'address' => str_replace("\r\n","<br>", $data{40}->value),
);
$apiresults = array(“result” => “success”, data => $data);
} catch (Exception $e) {
$apiresults = array(“result” => “error”, “message” => $e->getMessage());
}
?>
This works, but how can this be improved, what are some security measures that I have to include,... I would love to read more about creating custom API functions.
Keep up the good work,
Ilyas
Hello,
the provisioning Addon Module page is inaccessible.
Is there any way to implement the CapturePayment API to work with ACH payment gateways? Maybe even as a separate API.
missing https://developers.whmcs.com/api/sample-code/ in WHMCS developer guide, an other lot of pages but I needed this one
Hello,
Classes Reference links to no text page!
Link can be found at the footer in the Developer Docs
Thank you
Wasn't sure where else to provide this. Running the income forecast report in WHMCS 6.3.1 via
admin/reports.php?report=income_forecast produces a string of "mktime() expects parameter 6 to be long, string given in [...]" errors.
I identified the issue as an incorrect cast on line 40 of modules/reports/income_forecast.php. Replacing the original line:
$new_time = mktime(0,0,0,$month+$i,1,$year);
With this revision:
$new_time = mktime(0,0,0,$month+$i,1,(int) $year);
Resolves the error. Cheers.
From https://developers.whmcs.com/api-reference/addproduct/:
The cycle hyperlink under pricing points to this page: https://developers.whmcs.com/api-reference/addproduct/see%20example
Hello,
When I try to use :
https://developers.whmcs.com/api-reference/validatelogin/
Response isn't unusable and json_decode function return false, I find out you need to put :
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
to can curl return valid response and client can use.
Page Not Found
Oops! The requested page couldn't be found.
http://developers.whmcs.com/payment-gateways/meta-data-params/
The NEXT button at the bottom is pointing to a non-existent page.
It should point to
http://developers.whmcs.com/payment-gateways/configuration/
Cheers
Hi, WHMCS APIs usually error result type is;
{
result: "error",
message: "Client Not Found",
}
But GetEmails API show error result like that;
{
status: "error",
message: "Client ID Not Found",
}
For your information.
Best Regards
I'm finding it difficult to find any examples of how to use the internal classes outlined here. It also seems to be missing WHMCS\Database\Capsule
but has what I'm looking for here (these docs seem all over the place!).
Currently I'm trying to look for a method to create an invoice with the type AddFunds
. There doesn't seem to be any easy way to do this via the API or available methods.
Perhaps I can create a new invoice and use a new WHMCS\Billing\Invoice\Item
class on the WHMCS\Billing\Invoice
class? I can't even find information about the constructors, so these could just be 'dummy' classes for holding information. But again, there is no information available.
E.g. can I create an invoice like this:
$addFundsInvoice = new WHMCS\Billing\Invoice;
// there is no addLine()?
$addFundsLine = new WHMCS\Billing\Invoice\Item;
// ... something?
I've done heavy research online and have been made aware of the methods like createInvoices($userid);
but I feel these might be going away (are they?) because WHMCS seems to be stepping away from using functions and using classes.
This seems like a solution but it also doesn't seem like the safest way to go about it:
$userid = ...;
$amount = ...;
// I think true here = no email?
include_once(WHMCS_ROOT_PATH . "/includes/processinvoices.php");
$invoiceid = createInvoices(userid, true);
Capsule::table("tblinvoiceitems")
->insert([
"userid" => $userid,
"type" => "AddFunds",
"relid" => $invoiceid,
"description" => $_LANG['addfunds'],
"amount" => $amount,
"taxed" => "0",
"duedate" => "now()",
"paymentmethod" => "paypal"
]);
Looking forward to some help here :)
Hello,
In the Example request in the OpenTicket page, please change:
'password' => 'ADMIN_PASSWORD',
to:
'password' => md5('ADMIN_PASSWORD'),
thank you.
I am calling the WHMCS api "GetTLDPricing" but i am not getting any results. i am getting only response like {"result":"error","message":"Command Not Found"}.
what will be the issue?
I received a 404 for thsi URL http://developers.whmcs.com/quick-start/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.