EP-Dev Whois Buy Mode Examples
This page will show you how to utilize the EP-Dev Whois script along side your billing software, allowing you to use the whois script to pass in a domain to a billing script that will then handle the order process.
Before a few examples, it should be noted that you can configure the EP-Dev Whois script to work with nearly any kind of billing system that supports passing in the domain name. Since EP-Dev Whois script allows for you to edit domain results via templates, you can have nearly complete control over how the domains are handled.
The EP-Dev Whois script comes configured with a setup that passes the domain and extension as separate components to an external script. For PHP, the $_REQUEST['domain'] and $_REQUEST['ext'] hold the domain and extension of the domain respectively.
If you have reached this page as the result of clicking on the buy link in the EP-Dev Whois script, then below you should see details of the domain that you clicked on (otherwise, it will be blank):
DOMAIN:
EXTENSION:
FULL DOMAIN: .
The external script url is meant to point to a register script / hosting management script that you acquire from somewhere else. Usually these scripts will allow you to pass in domain names through some method. The most common method is to pass them in via url, such as register.php?domain=mydomain&ext=com .
Here are some examples:
EXAMPLE 1
Your external script requires you to use the format of register.php?domain_name=mydomain&domain_tld=com
Note that you now have to send to the script domain_name instead of domain and domain_tld instead of ext. To edit domain and ext to reflect this, you must edit the "Available Domains" template within the control panel:
- Edit the Available Domains template
- Find ?domain=[[domain]]&ext=[[ext]] and replace with ?domain_name=[[domain]]&domain_tld=[[ext]]
- Save Templates
EXAMPLE 2
Your external script requires you to use the format of register.php?domain=mydomain&ext=.com
Note that you now have to have a period before your extension (thus, ".com" instead of just "com"). To edit the extension to reflect this, you must edit the "Available Domains" template within the control panel:
- Edit the Available Domains template
- Find ?domain=[[domain]]&ext=[[ext]] and replace with ?domain=[[domain]]&ext=.[[ext]]
- Save Templates
Note that we have modified the default variable of just EXT to .EXT, making our com turn into .com
EXAMPLE 3 (ModernBill)
I have had requests to integrate this with Modernbill (
http://www.modernbill.com). In this example, I will show you how to integrate the script with Modernbill's Order Wizard (default modernbill install).
Modernbill is tricky, as it requires the domain and the tld to be passed in under one variable, in the format of orderwiz.php?submit_domain=register&domains[]=register|mydomain|com
Note the extra variable (submit_domain) as well as the modified variable (domains[]) and the combined domain structure (register|mydomain|com).
Here is how to configure the whois script to pass the variables into ModernBill in this fashion:
- Edit the Available Domains template
- Find external-script-example.php?domain=[[domain]]&ext=[[ext]] and replace with /order/orderwiz.php?submit_domain=register&domains[]=register|[[domain]]|[[ext]]
- Save Templates
Remember to modify /order/ to reflect the URL to orderwiz.php such as:
http://www.mydomain.com/modernbill/order/orderwiz.php
EXAMPLE 4 (ModernBill with checkboxes)
Like EXAMPLE 3, EXAMPLE 4 uses Modernbill (
http://www.modernbill.com). In this example, I will show you how to integrate the script with Modernbill's Order Wizard (default modernbill install) with checkboxes for multiple domain selection.
Edit the
Available Domains template found on the EP-Dev Whois Admin Panel's Edit Templates page:
REPLACE the entire template with:
Available Domains:
<form action="/order/orderwiz.php" method="GET">
[repeat]
<input type="checkbox" name="domains[]" value="[[domain]]|[[ext]]"> [[domain]].[[ext]]
[/repeat]
<input type="hidden" name="submit_package" value="domain">
<input type="hidden" name="coupon_code" value="">
<input type="hidden" name="submit_domain" value="register">
<input type="submit" name="submit">
</form>
Remember to modify /order/ to reflect the URL to orderwiz.php such as:
http://www.mydomain.com/modernbill/order/orderwiz.php