Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Premium Domain Issues (at Regular Price / Unavailable) #272

Closed
x011 opened this issue Nov 4, 2023 · 7 comments
Closed

Premium Domain Issues (at Regular Price / Unavailable) #272

x011 opened this issue Nov 4, 2023 · 7 comments
Assignees
Labels
misconfiguration Wrong System Configuration or related issue

Comments

@x011
Copy link

x011 commented Nov 4, 2023

Describe the bug
Premium Domains shown as available at regular price

To Reproduce
Steps to reproduce the behavior:
Search any premium domain.

Expected behavior
Create a setting on module to enable or disable premium domains. Show the correct price if enabled.

Context (please complete the following information):

  • OS: Ubuntu 22.04
  • WHMCS 8.8.0
  • PHP 8.1
  • RELEASE: v21.6.7

2023-11-04_23h45_26

2023-11-04_23h45_36

@DennisSkov
Copy link

Do you have premium domains enabled in WHMCS?
Premium domains have the correct pricing for us.

@x011
Copy link
Author

x011 commented Nov 4, 2023

Do you have premium domains enabled in WHMCS? Premium domains have the correct pricing for us.

Yes, we do have Premium Domains enabled.

2023-11-04_23h53_25

@DennisSkov
Copy link

Are you also using the module as the lookup provider?

@x011
Copy link
Author

x011 commented Nov 5, 2023

Hi Dennis,
After enabling CentralNic Reseller as Lookup Provider, premium domain queries return unavailable. Any idea why this may be happening?

2023-11-05_12h09_11

2023-11-05_12h10_52

@KaiSchwarz-cnic
Copy link
Contributor

KaiSchwarz-cnic commented Nov 6, 2023

Good Day @x011!

Thanks @DennisSkov for helping here with the initial step for premium domain support! :-)

Related Resources:

The last resource is pointing us to a sample registrar module/integration. Let me point you to the related lines of code for a better understanding regarding the technical mechanism behind all that:
https://github.com/WHMCS/sample-registrar-module/blob/master/modules/registrars/registrarmodule/registrarmodule.php#L907-L916

Here, WHMCS asks the underlying Registrar Module to include the premium domain pricing in the availability check which means we as registrar have to return a pricing with the related currency.

We cover that via CentralNic Reseller API in the following way using CheckDomains:
image

Here, you see that the premium price the respective reseller will pay, is returned and this is what we return to WHMCS.
WHMCS will then be adding additional costs (the configured premium domain markup, id protection / dns management / email forwarding addon pricing if applicable etc.) which corresponds finally to the pricing whmcs is displaying on client area and your clients would have to pay.

Let us come back to the pricing we return to WHMCS. You noticed that we are returning that pricing in a specific currency. Here it starts getting weird... If this currency is not configured in WHMCS, WHMCS will show it as available but for the regular pricing (and this will be ending in an error finally as the order will be about that price and about a non-premium domain, luckily that order won't be processed by the CNR API).
The currency returned corresponds to the account currency you have at CNR. Our expectation is that returning this currency is resulting in a higher chance for a match with the default currency in whmcs. So, if you enable the Module Log and check for command CheckDomains, you'll be able to identify the currency returned.

If it is returned as unavailable, then I guess there's something missing regarding the account settings in your CNR account.

The important points to cover are here:

  • ensure to use OUR registrar module (we can't offer support for the built-in registrar module for technical reasons) ✅
  • ensure the lookup provider is the CNR Module ✅
  • ensure Premium Domains are activated in WHMCS ✅
  • ensure to have the currency in question configured in WHMCS <----
  • ensure to activate the respective TLD your CNR account via CNR Frontend <----
  • ensure to activate Premiums Domains in your CNR account via CNR Frontend <----

Especially the last two points are different to other registrars like HEXONET and often not known / self-explaining.

Login in to your account and go to your account settings (click on your account name at top right):
image

TLDs can be configured in the CNR Frontend by selecting Domains > Domain Prices via the menu on the left.
There, ensure to have the respective TLD activated.

Hope that detailed information helps!
Still, if you need further help, please follow-up. Provide then the Response of CheckDomains from the Module Log please as well.

Kind Regards

@KaiSchwarz-cnic
Copy link
Contributor

KaiSchwarz-cnic commented Nov 6, 2023

Sorry for all the updates I made, but now the response is complete. 💯

@KaiSchwarz-cnic KaiSchwarz-cnic changed the title Premium Domain at Regular Price Premium Domain Issues (at Regular Price / Unavailable) Nov 6, 2023
@KaiSchwarz-cnic KaiSchwarz-cnic added the misconfiguration Wrong System Configuration or related issue label Nov 6, 2023
@KaiSchwarz-cnic KaiSchwarz-cnic self-assigned this Nov 6, 2023
@KaiSchwarz-cnic KaiSchwarz-cnic pinned this issue Nov 6, 2023
@x011
Copy link
Author

x011 commented Nov 6, 2023

I wasn't aware that I needed to activate the Premium Domains on the CentralNic Resellers dashboard. Once this was activated, the premium domain feature functioned properly on WHMCS. Thank you so much, @KaiSchwarz-cnic and @DennisSkov.

image

@x011 x011 closed this as completed Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
misconfiguration Wrong System Configuration or related issue
Projects
None yet
Development

No branches or pull requests

3 participants