centralnicgroup-opensource / rtldev-middleware-whmcs

CentralNic's WHMCS Software Bundle
https://centralnicreseller.com
Other
35 stars 15 forks source link

WHMCS-IBS module: Test mode doesn't support premium domains #251

Closed tonnyorg closed 1 year ago

tonnyorg commented 1 year ago

Describe the bug So if InternetBS module has test-mode enabled, premium domains return as standard domains.

To Reproduce Steps to reproduce the behavior:

  1. Enable test-mode checkbox on WHMCS' registrars page
  2. Visit your WHMCS website as a guest
  3. Perform a search of a premium domain
  4. See error

I also checked the IBS API directly, and I've confirmed that the error came directly from the API. So the API is not handling premium names at all, which makes it difficult for us to test the premium domains/purchases.

Expected behavior The premium price should up in the lookup/checkout page.

Context (please complete the following information):

KaiSchwarz-cnic commented 1 year ago

@TonnyORG Good Morning!

Thanks so much for reporting.

I also checked the IBS API directly, and I've confirmed that the error came directly from the API. So the API is not handling premium names at all, which makes it difficult for us to test the premium domains/purchases.

Thanks for the analysis and pointing in that direction - safes time on our end.

I tested in the OT&E with my.ceo which is an available premium domain (tested it via hexonet and cnr apis).

transactid=...
status=FAILURE
message=Invalid value "my.ceo" for parameter "domain"!
code=100002

That's probably the error your received. Let me forward it to the Backend Technicians. From WHMCS integration perspective I cannot do more right now, ETA unknown for that Backend Patch. I'll keep you in the loop.

KaiSchwarz-cnic commented 1 year ago

@TonnyORG looks like it works via IBS API and that it is a matter of activating premium domains in your account under reseller settings.

tonnyorg commented 1 year ago

@KaiSchwarz-cnic actually my bad, looks like the problem is just with one specific domain (or kind-of domain) 040.xyz:

On prod Im get this:

status=AVAILABLE
domain=040.xyz
minregperiod=1Y
maxregperiod=10Y
registrarlockallowed=YES
privatewhoisallowed=YES
realtimeregistration=YES
price_ispremium=YES
price_currency=USD
price_registration_1=600.00
price_registration_2=452.75
price_registration_3=370.94
price_registration_4=317.76
price_registration_5=279.97
price_registration_6=251.50
price_registration_7=229.16
price_registration_8=211.09
price_registration_9=196.13
price_registration_10=183.50
price_renewal_1=11.21
price_renewal_2=11.21
price_renewal_3=11.21
price_renewal_4=11.21
price_renewal_5=11.21
price_renewal_6=11.21
price_renewal_7=11.21
price_renewal_8=11.21
price_renewal_9=11.21
price_renewal_10=11.21
price_transfer=11.21
price_restore=152.81

On test, I get this:

status=AVAILABLE
domain=040.xyz
minregperiod=1Y
maxregperiod=10Y
registrarlockallowed=YES
privatewhoisallowed=YES
realtimeregistration=YES
price_ispremium=NO
tonnyorg commented 1 year ago

@KaiSchwarz-cnic so this pattern/issue happens on .xyz domains with variable price (domains that you can buy for a premium price, but renew at regular price).

I get different responses on a couple of domains:

Prod for 0f.xyz

status=AVAILABLE
domain=0f.xyz
minregperiod=1Y
maxregperiod=10Y
registrarlockallowed=YES
privatewhoisallowed=YES
realtimeregistration=YES
price_ispremium=YES
price_currency=USD
price_registration_1=600.00
price_registration_2=452.75
price_registration_3=370.94
price_registration_4=317.76
price_registration_5=279.97
price_registration_6=251.50
price_registration_7=229.16
price_registration_8=211.09
price_registration_9=196.13
price_registration_10=183.50
price_renewal_1=11.21
price_renewal_2=11.21
price_renewal_3=11.21
price_renewal_4=11.21
price_renewal_5=11.21
price_renewal_6=11.21
price_renewal_7=11.21
price_renewal_8=11.21
price_renewal_9=11.21
price_renewal_10=11.21
price_transfer=11.21
price_restore=152.81

Test for 0f.xyz:

status=FAILURE
message=Invalid value "0f.xyz" for parameter "domain"!
code=100002

Prod for 040.xyz:

status=AVAILABLE
domain=040.xyz
minregperiod=1Y
maxregperiod=10Y
registrarlockallowed=YES
privatewhoisallowed=YES
realtimeregistration=YES
price_ispremium=YES
price_currency=USD
price_registration_1=600.00
price_registration_2=452.75
price_registration_3=370.94
price_registration_4=317.76
price_registration_5=279.97
price_registration_6=251.50
price_registration_7=229.16
price_registration_8=211.09
price_registration_9=196.13
price_registration_10=183.50
price_renewal_1=11.21
price_renewal_2=11.21
price_renewal_3=11.21
price_renewal_4=11.21
price_renewal_5=11.21
price_renewal_6=11.21
price_renewal_7=11.21
price_renewal_8=11.21
price_renewal_9=11.21
price_renewal_10=11.21
price_transfer=11.21
price_restore=152.81

Test for 040.xyz:

status=AVAILABLE
domain=040.xyz
minregperiod=1Y
maxregperiod=10Y
registrarlockallowed=YES
privatewhoisallowed=YES
realtimeregistration=YES
price_ispremium=NO

Also I've concerns about the price exposed in your API (not sure if this is expected)

A "regular" premium would look like this:

status=UNAVAILABLE
domain=premium.xyz
minregperiod=1Y
maxregperiod=10Y
registrarlockallowed=YES
privatewhoisallowed=YES
realtimeregistration=YES
price_ispremium=YES
price_currency=USD
price_registration_1=1200.00
price_registration_2=1200.00
price_registration_3=1200.00
price_registration_4=1200.00
price_registration_5=1200.00
price_registration_6=1200.00
price_registration_7=1200.00
price_registration_8=1200.00
price_registration_9=1200.00
price_registration_10=1200.00
price_renewal_1=1225.00
price_renewal_2=1225.00
price_renewal_3=1225.00
price_renewal_4=1225.00
price_renewal_5=1225.00
price_renewal_6=1225.00
price_renewal_7=1225.00
price_renewal_8=1225.00
price_renewal_9=1225.00
price_renewal_10=1225.00
price_transfer=1225.00
price_restore=1540.00

Notice how the price_registration_X it's consistent for year 2 and up to year 10

However the "special" premiums look like this:

status=UNAVAILABLE
domain=103.xyz
minregperiod=1Y
maxregperiod=10Y
registrarlockallowed=YES
privatewhoisallowed=YES
realtimeregistration=YES
price_ispremium=YES
price_currency=USD
price_registration_1=240.00
price_registration_2=182.75
price_registration_3=150.94
price_registration_4=130.26
price_registration_5=115.57
price_registration_6=104.50
price_registration_7=95.81
price_registration_8=88.79
price_registration_9=82.97
price_registration_10=78.06
price_renewal_1=11.21
price_renewal_2=11.21
price_renewal_3=11.21
price_renewal_4=11.21
price_renewal_5=11.21
price_renewal_6=11.21
price_renewal_7=11.21
price_renewal_8=11.21
price_renewal_9=11.21
price_renewal_10=11.21
price_transfer=11.21
price_restore=152.81

The price_registration_2 it's actually lower than year 1, and it keeps decreasing per year (again, not sure if this is expected or not).

Thank you for all your support here.

KaiSchwarz-cnic commented 1 year ago

@TonnyORG Let me add some in-depth clarification to this thread.

I checked the WHMCS Docs, and it sounds like multi-year term isn't supported and I am right with that: https://docs.whmcs.com/Premium_Domains

Hope that helps.

tonnyorg commented 1 year ago

@KaiSchwarz-cnic gotcha, tyvm for your complete explanation here, I really appreciate it 🙏

KaiSchwarz-cnic commented 1 year ago

@TonnyORG no problem, you're always welcome.