billchalmers Posted June 6, 2009 Share Posted June 6, 2009 The opensrs module that ships with whmcs is very good, but if you have existing opensrs users you have a slight problem using the module as the normal module stores the domain username & password when it registers the domain - opensrs is unusual as it requires a different username / password combo for each domain, you cant just use the reseller details and there is nowhere to put an existing opensrs domain username & password (if you know them). I have created a module to allow integration with opensrs using the subscription field to store the username & password for the domain as I have no use of this field. The module uses the open source opensrs-php library which is the same libary used by whmcs within the normal opensrs module. Features supported: Get / save Nameservers Get / save Registrar lock Get / save Contact details Get EPP Code Renew NOT Implemented: Register - you should use the normal opensrs module for new domains All the DNS / Email Forwarding functionality Transfer The code is provided as is, dont blame me if it messes your system up, backup everything first. Install instructions: Create a new directory in your modules/registars directory called opensrsexisting and put the files in there. Put your live / test api keys in the config section Modify an existing domain - one which you have the opensrs domain username & password, put it into the subscription id field in the following format: username/password Bill Chalmers opensrsexisting.zip 0 Quote Link to comment Share on other sites More sharing options...
robin Posted June 17, 2009 Share Posted June 17, 2009 Hi Bill Can you re-post? I cannot open the attached, it appears to be a corrupt archive. I am interested in the fucntionality! 0 Quote Link to comment Share on other sites More sharing options...
robin Posted June 17, 2009 Share Posted June 17, 2009 Disregard... File extension should be RAR 0 Quote Link to comment Share on other sites More sharing options...
billchalmers Posted June 18, 2009 Author Share Posted June 18, 2009 My bad, sorry, this is a rar archive not a zip, please rename to .rar, it seems .rar files are not in the allowed file types to upload. 0 Quote Link to comment Share on other sites More sharing options...
zondotca Posted August 10, 2009 Share Posted August 10, 2009 (edited) Hi Bill Thanks for creating this, I am in desperate need but unable to unarchive the file with the zip or rar extension. A file called country_codes.php does come up but no place to put the api key. Help please. Lester Edited August 10, 2009 by zondotca 0 Quote Link to comment Share on other sites More sharing options...
websolve Posted September 1, 2009 Share Posted September 1, 2009 Any feedback guys, does this mod work? 0 Quote Link to comment Share on other sites More sharing options...
w1zard Posted September 9, 2009 Share Posted September 9, 2009 Any feedback guys, does this mod work? You do need to copy the Crypt & PEAR directories from the opensrs directory into the new opensrsexisting directory and it will work, yes. 0 Quote Link to comment Share on other sites More sharing options...
Strik Posted October 11, 2009 Share Posted October 11, 2009 it is possible to use this if domain registred at Resellone? 0 Quote Link to comment Share on other sites More sharing options...
gaillen Posted November 11, 2009 Share Posted November 11, 2009 So I have set this up following billchalmers instructions (thank you billchalmers) and added the Crypt & PEAR directories (thank you for the reminder w1zard). However I still get the following error when I save changes with the userid/password entered and opensrsexisting selected. Registrar Error Authentication Error. Any suggestions folks? 0 Quote Link to comment Share on other sites More sharing options...
oscarenzo Posted November 25, 2009 Share Posted November 25, 2009 i will do this method, i will say if get I work it, regards 0 Quote Link to comment Share on other sites More sharing options...
oscarenzo Posted November 25, 2009 Share Posted November 25, 2009 i have the follow error: Registrar Error Authentication Error. any suggestions 0 Quote Link to comment Share on other sites More sharing options...
oscarenzo Posted November 25, 2009 Share Posted November 25, 2009 who is the vendor, for this module? 0 Quote Link to comment Share on other sites More sharing options...
oscarenzo Posted November 25, 2009 Share Posted November 25, 2009 I could solve it, thanks 0 Quote Link to comment Share on other sites More sharing options...
oscarenzo Posted November 28, 2009 Share Posted November 28, 2009 The opensrs module that ships with whmcs is very good, but if you have existing opensrs users you have a slight problem using the module as the normal module stores the domain username & password when it registers the domain - opensrs is unusual as it requires a different username / password combo for each domain, you cant just use the reseller details and there is nowhere to put an existing opensrs domain username & password (if you know them). I have created a module to allow integration with opensrs using the subscription field to store the username & password for the domain as I have no use of this field. The module uses the open source opensrs-php library which is the same libary used by whmcs within the normal opensrs module. Features supported: Get / save Nameservers Get / save Registrar lock Get / save Contact details Get EPP Code Renew NOT Implemented: Register - you should use the normal opensrs module for new domains All the DNS / Email Forwarding functionality Transfer The code is provided as is, dont blame me if it messes your system up, backup everything first. Install instructions: Create a new directory in your modules/registars directory called opensrsexisting and put the files in there. Put your live / test api keys in the config section Modify an existing domain - one which you have the opensrs domain username & password, put it into the subscription id field in the following format: username/password Bill Chalmers hi, one doubt, with the default module opensrs can not do the function before say? 0 Quote Link to comment Share on other sites More sharing options...
pgesystems Posted December 6, 2009 Share Posted December 6, 2009 i have the follow error: Registrar Error Authentication Error. any suggestions I too am getting this error. Communication between the server and the Tucows API is successful. Any ideas? 0 Quote Link to comment Share on other sites More sharing options...
burnthost Posted December 24, 2009 Share Posted December 24, 2009 I could solve it, thanks What did you do? I'm getting the same results: "authentication error" 0 Quote Link to comment Share on other sites More sharing options...
Phile Posted December 24, 2009 Share Posted December 24, 2009 any one know how to fix the "authentication error" ? 0 Quote Link to comment Share on other sites More sharing options...
bigb Posted January 30, 2010 Share Posted January 30, 2010 what did you guys do to solve this i'm getting the same thing...? 0 Quote Link to comment Share on other sites More sharing options...
visbits Posted January 31, 2010 Share Posted January 31, 2010 I'm having the authentication error as well. Going to call OpenSRS tomorrow but wish there was some insight to this... Seems like absolutely 0 documentation is availabe. 0 Quote Link to comment Share on other sites More sharing options...
pciccone Posted February 2, 2010 Share Posted February 2, 2010 Aside from the authentication error - which I am hopeful for an answer, I don't understand how to actually get the domain name into WHMCS in the first place? When I go to add a domain under the client my only option is the register/transfer a new domain as a new order to get it into the database, which defeats the purpose of this great addon. What am I missing to add an existing domain without going through the register/transfer process? Thanks! Phil 0 Quote Link to comment Share on other sites More sharing options...
terraprime Posted February 19, 2010 Share Posted February 19, 2010 Hi, I am really interested in getting this to work! Has anyone had any luck? I get auth error and cant seem to fix it. 0 Quote Link to comment Share on other sites More sharing options...
Brian S Posted March 16, 2010 Share Posted March 16, 2010 I think I got this figured out guys. There seemed to be some problem with the code thinking the domainid for the session was good, so it wouldn't create a new one. I'm just forcing to always lookup the domain info. I commented out a couple lines in opensrsexisting.php and it's working, yay. Here's what I changed. Just look for the "#" in the code and do the same in yours: //If the passed param is different to the session domain id, then we need a new cookie #if($params['domainid'] != $_SESSION['domainid']) #{ /** Get domain details **/ $domainAuth = getDomainUserPass(); $domain_username = $domainAuth[0]; $domain_password = $domainAuth[1]; $fulldomain = $params['sld'].".".$params['tld']; /** Create command object **/ $cmd = array( 'action' => 'set', 'object' => 'cookie', 'attributes' => array( 'domain' => $fulldomain, 'reg_username' => $domain_username, 'reg_password' => $domain_password ) ); /** Get the global srs class **/ $O = $GLOBALS['OpenSRSExisting']; $result = $O->send_cmd($cmd); //write the current domain id into the session $_SESSION['domainid'] = $params['domainid']; /** If we get a sucsessful cookie from opensrs update the domain expiry and put the cookie into the session **/ if(isset($result)) { $exptime = strtotime($result['attributes']['expiredate']); if($exptime) { $expiredate = date("Y-m-d",$exptime); $query = "UPDATE tbldomains SET expirydate = '".$expiredate."', nextduedate = '".$expiredate."' WHERE id = ".$params['domainid']; mysql_query($query); } if(isset($result['attributes']['cookie'])) { $_SESSION['OpenSRSCookie'] = $result['attributes']['cookie']; } else { unset($_SESSION['OpenSRSCookie']); } } #} - Brian 0 Quote Link to comment Share on other sites More sharing options...
gerrybakker Posted April 12, 2010 Share Posted April 12, 2010 (edited) everyone - you will find the file at the beginning of this forum thread. Edited April 12, 2010 by gerrybakker 0 Quote Link to comment Share on other sites More sharing options...
jmasud Posted June 27, 2010 Share Posted June 27, 2010 Is anyone else is having a simular issue? I am using WHMCS 4.2.1, when i'm in the admin area I'm able to edit and manage a domain using the Opensrsexisting module assigned to the domain, but it seems when i'm logged in the client area lookups to OpenSRS don't seem to work correctly. I've modified the following code for client area to work correctly: #1 Change the call to the getDomainUserPass function. $domainAuth = getDomainUserPass($params['domainid']); #2 I modified the getDomainUserPass function to accept a param and do an SQL lookup of the domain to get the subscriptionid field which contains the user/pw. function getDomainUserPass($domainid) { /** Domain username & password from subscription id field**/ $query = "SELECT * FROM tbldomains WHERE id = ".$domainid; $result = mysql_query($query); $row = mysql_fetch_assoc($result); $user_pass = $row['subscriptionid']; #if(empty($_SESSION['data']['subscriptionid'])) #{ # $user_pass = $GLOBALS['subscriptionid']; #} #else #{ # $user_pass = $_SESSION['data']['subscriptionid']; #} $auth = explode("/", $user_pass); return $auth; } 0 Quote Link to comment Share on other sites More sharing options...
AzeDK Posted August 12, 2010 Share Posted August 12, 2010 Just add current username/password for the domain (which you get from the OpenSRS controlpanel) to the subscription ID field in the domain overview in WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.