Web Hosting Talk







View Full Version : Automated billing/customer setup with ensim


Lirath
11-22-2002, 05:22 PM
Anyone know of a GOOD very customizable billing software thing that is automated with ensim webpliance 3.1?

I want to be able to customize a lot of it and I want it to set up accounts for me... or at least take off a good load...

I don't care about price.

HostInspect
11-23-2002, 01:04 AM
This is how we used to do it. But it worked with Modernbill, but you need to edit some files, this one in specific is in the modernbill signup things, so its:

/signup/cases/step_submit_process.case.inc.php

Add the following before ?>


$my_packages = array(1 => "Shared_Starter", 3 => "Shared_Value", 2 => "Shared_Standard", 4 => "Shared_Pro", 5 => "Shared_Adv");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://nameservers.eryxma.com/~cantguessthisdomain.org/newuser.php?serviceplan=$my_packages[$thegoodpackid]&hostname=$domain&tld=$tld_extension&email=$client_email&username=$client_username&password=$client_real_pass&tos=YES&submit=Submit");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "a=3&b=5");
//--- Start buffering
ob_start();
curl_exec ($ch);
//--- End buffering and clean output
ob_end_clean();
curl_close ($ch);


You get the idea on what to edit on the above plans.

Then when it does the curl directive, it will process to another php form which has root access to add these accounts using the tools under /usr/local/bin

So it works once the pasing is complete, it will do:

AddVirtDomain -p $sp -c siteinfo,$host,$admin,$pass,$xmail

So in the php script that runs as root:

$adddomain = "/usr/local/bin/AddVirtDomain";
$sp = $serviceplan;
$host = "domain=$hostname.$tld";
$admin = "admin_user=$username";
$pass = "tpasswd=$password";
$xmail= "email=$email";

system("$adddomain -p $sp -c siteinfo,$host,$admin,$pass,$xmail");

Its all simple, I can't get right down to step by step, unless many people are intrested, and I stole this idea from my boss Shiekron ;) But he let me post this as we aren't using modernbill any longer ;)

Hope it helps anyone.

Its simple.