#1 (permalink)  
Old 12-04-2008, 07:40 PM
Junior Member
 
Join Date: Oct 2008
Posts: 13
Default Domain Sales

I have an account at Planet Domain as a reseller, because it is free. I was just wondering if i could have assistance writing a module for nixbill for it or if someone could for me. Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old 12-06-2008, 12:24 PM
Administrator
 
Join Date: Apr 2008
Posts: 151
Default

I can help with that, you will there a manual for there API.
Also I could set you up with an enom account.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old 12-07-2008, 11:01 AM
Junior Member
 
Join Date: Oct 2008
Posts: 13
Default

Enom want $100 to start. I am interrested in free domain resellers like planetreseller.info
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old 12-07-2008, 11:06 AM
Junior Member
 
Join Date: Oct 2008
Posts: 13
Default

here is the api for planet domain it is a .pdf format.

http://www.planetdomain.com/media/do...Domain_API.pdf
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old 12-10-2008, 08:16 AM
Administrator
 
Join Date: Apr 2008
Posts: 151
Default

i am getting a tld module template ready, I will have it for you today. You can look at it and create the module. I will be able to assist you on it also if you need me to.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #6 (permalink)  
Old 12-10-2008, 04:10 PM
Junior Member
 
Join Date: Oct 2008
Posts: 13
Default

ok thanks, if you need to email it, email it to cjohnston08@gmail.com

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #7 (permalink)  
Old 12-10-2008, 07:47 PM
Administrator
 
Join Date: Apr 2008
Posts: 151
Default

Here is a template to use for the API. This is very similar to the enom api.
If you have any questions at all let me know.
To make it work upload the file to the tldmodules folder and name it the same as the class name. It will show up in the Tld section of the admin panel.

PHP Code:
<?php


class domaintemplate{
    var 
$host;
    var 
$username;
    var 
$password;
    var 
$nameserver1;
    var 
$nameserver2;
    var 
$serverid;
    var 
$PackageInformation = array();
    var 
$ClientInformation = array();
    var 
$DomainRegistrantInformation = array();
    var 
$sld;
    var 
$tld;
    function 
__construct(){
    
    }
    function 
ServerOptions(){
        
$options = array(
                            array(
'formtype' => 'text''description' => LANG_USERNAME'name' => 'username''value' => ''),
                            array(
'formtype' => 'text''description' => LANG_PASSWORD'name' => 'password''value' => ''),
                            array(
'formtype' => 'text''description' => 'NameServer 1''name' => 'nameserver1''value' => 'ns1.yourdomain.com'),
                            array(
'formtype' => 'text''description' => 'NameServer 2''name' => 'nameserver2''value' => 'ns2.yourdomain.com'),
                            array(
'formtype' => 'text''description' => 'API URL''name' => 'url''value' => 'api.url'),
                        );
        return 
$options;
    }
    function 
TldOptions(){
        
$tlds = array('com' => 'com''net' => 'net''org' => 'org''biz' => 'biz''info' => 'info''us' => 'us');
        
$options = array(
                        array(
'formtype' => 'select''description' => 'TLD''name' => 'tld'
                                
'value' => $tlds
                            
),
                    );
        return 
$options;
    }
    function 
SetServerInformation($data){
        
        
$this->host $data['NIXBILL'][0]['RESULT'][0]['OPTIONS'][0]['SERVER_URL'][0]['VALUE'];
        
$this->serverid $data['NIXBILL'][0]['RESULT'][0]['SERVERID'][0]['VALUE'];
        
$this->username $data['NIXBILL'][0]['RESULT'][0]['OPTIONS'][0]['SERVER_USERNAME'][0]['VALUE'];
        
$this->password $data['NIXBILL'][0]['RESULT'][0]['OPTIONS'][0]['SERVER_PASSWORD'][0]['VALUE'];
        
$this->ns1 $data['NIXBILL'][0]['RESULT'][0]['OPTIONS'][0]['SERVER_NAMESERVER1'][0]['VALUE'];
        
$this->ns2 $data['NIXBILL'][0]['RESULT'][0]['OPTIONS'][0]['SERVER_NAMESERVER2'][0]['VALUE'];
    }
    function 
SetPackageOptions($data){
        
$this->PackageInformation $data;
    }
    function 
SetClientInformation($data){
        
$this->ClientInformation $data;
    }
    function 
SetDomainRegistrantInformation($data){
        
$this->DomainRegistrantInformation $data;
    }
    function 
SetSLD($sld){
        
$this->sld $sld;
    }
    function 
SetTLD($tld){
        
$this->tld $tld;
    }
    function 
register(){
        
$years $this->Years($this->PackageInformation['cycle']);
        
        
$c = new Curl('get');
        
$c->SetUrl($this->host);
        
$c->AddField('Command','Purchase');
        
$c->AddField('UID',$this->username);
        
$c->AddField('PW',$this->password);
        
$c->AddField('SLD',$this->PackageInformation['sld']);
        
$c->AddField('TLD',$this->PackageInformation['tld']);
        
$c->AddField('NumYears',$years);
        
$c->AddField('NS1',$this->ns1);
        
$c->AddField('NS2',$this->ns2);
        
$c->AddField('RegistrantFirstName',$this->DomainRegistrantInformation['fname']);
        
$c->AddField('RegistrantLastName',$this->DomainRegistrantInformation['lname']);
        
$c->AddField('RegistrantAddress1',$this->DomainRegistrantInformation['address1']);
        
$c->AddField('RegistrantCity',$this->DomainRegistrantInformation['city']);
        
$c->AddField('RegistrantStateProvince',$this->DomainRegistrantInformation['state']);
        if(
$this->DomainRegistrantInformation['country'] == 'USA'){
            
$c->AddField('RegistrantStateProvinceChoice','S');
        }
        
$c->AddField('RegistrantPostalCode',$this->DomainRegistrantInformation['zipcode']);
        
$c->AddField('RegistrantCountry',$this->DomainRegistrantInformation['country']);
        
$c->AddField('RegistrantPhone','+1.'.$this->DomainRegistrantInformation['phone1']);
        
$c->AddField('RegistrantFax','+1.'.$this->DomainRegistrantInformation['fax']);
        
$c->AddField('RegistrantEmailAddress',$this->DomainRegistrantInformation['email']);
        if(
$this->DomainRegistrantInformation['us_nexus']){
            
$c->AddField('us_nexus',$this->DomainRegistrantInformation['us_nexus']);
        }
        if(
$this->DomainRegistrantInformation['us_purpose']){
            
$c->AddField('us_purpose',$this->DomainRegistrantInformation['us_purpose']);
        }
        if(
$this->DomainRegistrantInformation['uk_legal_type']){
            
$c->AddField('uk_legal_type',$this->DomainRegistrantInformation['uk_legal_type']);
        }
        if(
$this->DomainRegistrantInformation['registered_for']){
            
$c->AddField('registered_for',$this->DomainRegistrantInformation['registered_for']);
        }
        
$c->AddField('ResponseType','XML');
        
$result $c->Process();
        
$this->logcall('register '.$this->PackageInformation['sld'].'.'.$this->PackageInformation['tld'], $c->GetString(), $result);
        
$return $this->FormatReturn($result);
        
/**
         * The status is needed here to know if the domain was registered correctly.
         */
        
if($domainstatus == true){ //the $domainstatus needs to be evaluated by the return value from the registrar
            
            
$output = array(
                
'status'         => '1'/// status 1 shows the process completed correctly
                
'orderid'         => $orderid /// the $orderid will come from the registrar. this is for record keeping only, not required
                
'statusmessage'    => $statusmessage /// $statusmessage is what will be displayed on the status
                            
);
        }else{
            
$output = array(
                
'status'        => '0',
                
'error'            => '1',
                
'statusmessage'    => $statusmessage /// $statusmessage is what will be displayed on the status
                            
);
        }
        
        return 
$output;
        
//return $result;
    
}
    

    function 
renew(){
        
$years $this->Years($this->PackageInformation['cycle']);
        
$c = new Curl('get');
        
$c->SetUrl($this->host);
        
$c->AddField('Command','Extend');
        
$c->AddField('UID',$this->username);
        
$c->AddField('PW',$this->password);
        
$c->AddField('SLD',$this->PackageInformation['sld']);
        
$c->AddField('TLD',$this->PackageInformation['tld']);
        
$c->AddField('NumYears',$years);
        
$c->AddField('ResponseType','XML');
        
$result $c->Process();
        
$this->logcall('renew'$c->GetString(), $result);
        
$return $this->FormatReturn($result);
        
        
/**
         * The status is needed here to know if the domain was registered correctly.
         */
        
if($domainstatus == true){ //the $domainstatus needs to be evaluated by the return value from the registrar
            
            
$output = array(
                
'status'         => '1'/// status 1 shows the process completed correctly
                
'orderid'         => $orderid /// the $orderid will come from the registrar. this is for record keeping only, not required
                
'statusmessage'    => $statusmessage /// $statusmessage is what will be displayed on the status
                            
);
        }else{
            
$output = array(
                
'status'        => '0',
                
'error'            => '1',
                
'statusmessage'    => $statusmessage /// $statusmessage is what will be displayed on the status
                            
);
        }
        return 
$output;
    }
    
    function 
logcall($call$request$result){
        
mysql_query("INSERT INTO `hostingmodulelogs` (`call`, `request`, `result`, `serverid`)VALUES('".$call."', '".$request."', '".$result."', '".$this->serverid."')");
    }
    function 
FormatReturn($data){
        
$xml = new XML();
        
$array $xml->processXML($data);
        return 
$array;
    }
    function 
Years($cycle){
        
$cycleToYears[6] = 1;
        
$cycleToYears[7] = 2;
        
$cycleToYears[8] = 3;
        
$cycleToYears[9] = 4;
        
$cycleToYears[10] = 5;
        
$cycleToYears[11] = 6;
        
$cycleToYears[12] = 7;
        
$cycleToYears[13] = 8;
        
$cycleToYears[14] = 9;
        
$cycleToYears[15] = 10;
        
$years $cycleToYears[$cycle];
        return 
$years;
    }
}



?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #8 (permalink)  
Old 12-10-2008, 08:07 PM
Junior Member
 
Join Date: Oct 2008
Posts: 13
Default

yea, I am going to need some further instruction on this lol
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:34 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0