Difference between revisions of "Custom Modules"

From AWBS Wiki
Jump to: navigation, search
(Starting your Custom Module)
(Starting your Custom Module)
Line 76: Line 76:
 
=== Starting your Custom Module ===
 
=== Starting your Custom Module ===
  
Download the V3 devkit from [[http://www.awbs.com|AWBS]] or your authorized reseller.
+
Download the V3 devkit from http://www.awbs.com or your authorized reseller.
  
 
=== Package Specifics ===
 
=== Package Specifics ===

Revision as of 21:21, December 5, 2008

If you would like to create a module for a payment gateway, hosting control panel or registrar that is currently unsupported (not integrated) in AWBS, you will first need our devkit (available upon request).


Custom Payment Processors

Custom Offsite processors:

For custom offsite processors (processors that take the customer to their website to gather the credit card information), you will use the includes/cp3.php already in AWBS along with the samplecallback.zip from the devkit.

The cp3.php file is where you will edit the information that gets passed to the processor.

The samplecallback page can be renamed as desired and should be placed in your AWBS web directory. Setup the return url to point at this page at your processor or in the cp3.php file if the processor supports passing in the return page.

More information is given in the devkit....


Make sure you have selected 'custom offsite' module in the system setup, module setup of AWBS.


Custom Onsite processors:

For custom onsite processors (processors where the credit card information is gathered on your website), you will need to use the includes/cp2.php file already in AWBS along with the ccfunctions.php file in the devkit. The ccfunctions.php file goes in the includes/customonsite directory.

More information is in the devkit....


Make sure you have selected 'custom onsite' module in the system setup, module setup of AWBS.


Custom Registrar Module

Custom Hosting Control Panel Module

Built in Variables

Most available $params are set as:

  • $params['uname']= Username for new account (This is the username that will be used by the Hosting Panel)
  • $params['pass']= Password for new account (This is the password that will be assigned to the above username)
  • $params['ownerid']= Users AWBS username
  • $params['userid']= Users ID in users table
  • $params['term']= Term for new account
  • $params['seed']= Package identifier (OrderID)
  • $params['cTld']= TLD
  • $params['cSld']= SLD
  • $params['realdomain']= If idn, the encoded domain SLD (you should always use this variable);
  • $params['idn']= Is IDN ( 1 or 0 )
  • $params['idnname']= idn name;
  • $params['idndomain'] = "$idnname.$cTld";
  • $params['cpid']= Package ID
  • $params['plan']= Local plan name
  • $params['realplan']= Server plan name
  • $params['servernewip']= IP
  • $params['server']= Server
  • $params['servertype']= Server type
  • $params['domain']= Full domain name;
  • $params['dns1']= dns1
  • $params['dns2']= dns2
  • $params['dns3']= dns3
  • $params['dns4']= dns4
  • $params['uemail']= Users email;
  • $params['regtype']= Queue type

You can also create your own variables and pull information directly from the AWBS Database. Example:

$this_user = sqlarray("select id,fname,lname from users where username='".$params['ownerid']."'");

Starting your Custom Module

Download the V3 devkit from http://www.awbs.com or your authorized reseller.

Package Specifics

Using Custom Fields in Package Specifics

Example Functions

Custom Forum Module