Hsphere get client credit card number

Head Surfer
October 9th, 2008

One of the frustrations with hsphere is that it’s nearly impossible to get your client’s credit card number. So I created the following shell script.

Login to your control panel server and create the following bash script:

vi /home/admin/ccnum

ccnum file:


if [ ! -n “$1” ]
echo -e “Usage: `basename $0` accountIDn you will be prompted for the postgres password.”;

echo “select c.name, c.type, c.cc_number, c.exp_month, c.exp_year from users u, user_billing_infos u_b, billing_info, credit_card c, user_account a where u.id = u_b.user_id and c.id = u_b.billing_info_id and u.id=a.user_id and a.account_id=$1 limit 1” |psql hsphere wwwuser;

The set the permissions on the file:
chmod 700 /home/admin/ccnum

Then run the script:
/home/admin/ccnum $accountid

It will prompt you for the postgres password. Enter in the password and it will display the credit card number for the accountid in question.

How To Host A Website is a Web Hosting Review service. We provide web hosting reviews for best hosting, server hosting, cheap hosting and more as we answer the most important website hosting question - How To Host Website pages successfully.

Words visitors used that found this page online:

Disclosure: We are a professional review site that receives compensation from the companies whose products we review. We are independently owned and the opinions expressed here are our own. Please contact us if you would like your web hosting company considered for a web hosting and support review.
Back to top Copyright 2012 © How To Host A Website, An OS Hosting, LLC Company