Author: whmcsisg8

10 Nov

Why no transaction data for a WHMCS order? Why the refund failing?

Even though order is complete, from Billing => Transactions List you might not see any transaction data related to the order.

If you go to admin/configgeneral.php, there is an option Auto Redirect on Checkout. Is the option ‘Automatically forward the user to the payment gateway’ selected? Then during the order, customer must have gone through the payment gateway module code. Even then why no transaction id and other data?

Go to ‘Manage Orders’ from admin side. Is the payment status of the order is complete? Is your refund failing for the invoice of the order? Are you getting the error ‘The refund attempt has failed. Please check the Gateway Log for more information’ when you try to refund?

It’s happening because the customer have some credit balance. The amount is deducted from that for the order.

If you are a developer and would like to test a refund for the payment gateway,you can simply reset the credit balance as zero for the customer.

Then place a new order and refund for that order will work.
To know credit balance of a customer with id [x],
go to the page clientssummary.php?userid=[x]
and search for Credit Balance.

9 Nov

Install Android Studio on CentOS 7

If you have installed CentOS7 on your computer, you can install android studio by just running two scripts. The scripts are given below. If you are not interested to install using the scripts, you can run the commands one by one.

For the installation you have to download jdk-8u101-linux-x64.rpm(for 64 bit) and JDK can be downloaded from the link
Assumed that you installed 64 bit version of CentOS.

Android studio zip file can be downloaded from

Take your terminal and login as root. Move the downloaded files to your /opt folder. Then create and in your /opt folder. Run them as

yum group install -y "Development Tools"
yum install -y glibc.i686
yum install -y
yum remove -y java
cd /opt
yum localinstall -y jdk-8u101-linux-x64.rpm
cd /opt
cd android-studio/bin

Oracle JDK is required for Android, because of that we are removing Open JDK and installing Oracle JDK.

See for more information about that.

5 Nov

How to hide a field from WHMCS register.php?

If you have to remove a form field from the WHMCS register file, How you can do it?

It can be done using a hook named ClientAreaFooterOutput.

Assume that the field’s id is  myfield. Then you can create a file named hook_register_hide.php and place it in include/hooks folder.

add_hook('ClientAreaFooterOutput', 1, function ($vars)
$filename = $vars['filename'];
if($filename == "register") {
$string = "<script type='text/javascript'>";
$string .=  "        $(function() {  ";
$string .= "$('#myfield').addClass('hidden')";
$string .=  "});";
$string .= "</script> ";
return $string;