Jump to content

Custom Domain Registrar (help)


baymax

Recommended Posts

Hi Everyone,

So we're using WHMCS a bit differently than most since we're tracking domains that WE own as a company. I am trying to add a new registrar to the list of options that we can select in the Domains page.

Here's what I've done so far:

1. I downloaded the sample registrar module, made adjustments to the Title etc. and put the files into the \modules\registrars\ folder

2. The registrar shows up on the list of Domain Registars and I was able to activate it. I was also able to select the Registrar on a specific domain.

3. Here's when I encountered a problem. We don't really use hooks or API since we're doing things manually and clients don't need access to the system nor do renewals etc via WHMCS.

As soon as I make the domain's registrar to the new one I added, the domain page for that customer no longer works and produces the following error:

Oops!

Something went wrong and we couldn't process your request.

Please go back to the previous page and try again.

 

Please Note: I really just need it to show up on the list. I have it setup the same way for GoDaddy and left the API information blank. It produces an error upon loading the Domains page (this is fine as long as it loads the page). I am not sure what to add or remove from the sample registrar module files in order to fix this. I am no programmer by any means.

Any help would be really appreciated! Thank you.

Link to comment
Share on other sites

More information about the error:

Error: Class 'WHMCS\Module\Registrar\Registrarmodule\ApiClient' not found in /var/www/html/whmcs/modules/registrars/aliyun/aliyun.php:575
Stack trace:
#0 /var/www/html/whmcs/vendor/whmcs/whmcs-foundation/lib/Module/AbstractModule.php(0): aliyun_GetNameservers(Array)
#1 /var/www/html/whmcs/vendor/whmcs/whmcs-foundation/lib/Module/Registrar.php(0): WHMCS\Module\AbstractModule->call('GetNameservers', Array)
#2 /var/www/html/whmcs/vendor/whmcs/whmcs-foundation/lib/Domains.php(0): WHMCS\Module\Registrar->call('GetNameservers', Array)
#3 /var/www/html/whmcs/vendor/whmcs/whmcs-foundation/lib/Domains.php(0): WHMCS\Domains->moduleCall('GetNameservers')
#4 /var/www/html/whmcs/admin/clientsdomains.php(0): WHMCS\Domains->getDomainInformation()
#5 {main}

I tried editing those lines out of the aliyun.php file but I don't think I did it correctly. As mentioned, the new registrar just needs to be listed as a registrar option but does NOT need to communicate with the registrar.

Link to comment
Share on other sites

On 30/12/2019 at 06:37, baymax said:

3. Here's when I encountered a problem. We don't really use hooks or API since we're doing things manually and clients don't need access to the system nor do renewals etc via WHMCS.

if the blank registrar module has no functionality, you're processing manually and using this for your own domains, wouldn't it be easier just to use the Email registrar ?

https://docs.whmcs.com/Email

Link to comment
Share on other sites

17 hours ago, brian! said:

if the blank registrar module has no functionality, you're processing manually and using this for your own domains, wouldn't it be easier just to use the Email registrar ?

https://docs.whmcs.com/Email

Hi Brian! Yup, I saw and thought about using that but the thing is we need the name of the registrar because we have domains with various registrars. That and we run reports too so this function is very important.

Is there an easier way to add a custom module but no API functionality? Mine's just producing errors left and right.

Link to comment
Share on other sites

5 hours ago, baymax said:

Is there an easier way to add a custom module but no API functionality? Mine's just producing errors left and right.

if there is no functionality or automation needed, then i'd still stick with using the Email Registrar idea - but remember that this registrar module code isn't encrypted and therefore can be duplicated and modified. 😉

to duplicate the registrar, all you should need to do is...

  • copy the "email" folder in /modules/registrars - for the sake of argument, paste the duplicated folder and call it "brian" - still in /modules/registrars/
  • go into the duplicate folder, e.g brian, and rename email.php to brian.php - for consistency keep the folder and filenames the same (and just one word).
  • edit the brian.php file and replace occurrences of "email_" with "brian_" (there should be 6)... these functions need to be unique, so if email registrar is active, and this duplicate is active, you will get errors - so you have to rename the functions.
  • edit the Friendly name line of code to differentiate this from the default email registrar...
    "FriendlyName" => array("Type" => "System", "Value"=>"Email Notifications (Brian Registrar 1)"),

    ... so you know which registrar this is to be used with...

  • optionally change the logo.

  • repeat as necessary for other registrars.

on the Domain Registrars page, you will now have 2 different email registrars...

zNnvSCo.png

and in a client's domain profile, it will be available as an option...

HkzQd5u.png

in your case, what I would probably suggest is that you don't use the original Email Registrar module if you are going to rename it (e.g give it the name of a registrar) because a WHMCS update would probably overwrite any changes that you make to the module - so just use the duplicates that you make and the updater shouldn't touch them.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated