Skip to content

Manage dns records directly from whmcs admin dashboard#546

Open
YumeChaan wants to merge 6 commits into
masterfrom
INTGRTNS-345-WHMCS-Domain-Module-Ability-to-manage-DNS-records-directly-from-WHMCS-Admin-Dashboard-master
Open

Manage dns records directly from whmcs admin dashboard#546
YumeChaan wants to merge 6 commits into
masterfrom
INTGRTNS-345-WHMCS-Domain-Module-Ability-to-manage-DNS-records-directly-from-WHMCS-Admin-Dashboard-master

Conversation

@YumeChaan

Copy link
Copy Markdown
Collaborator

This PR contains the same changes as #425.

A new PR targeting master was created because the previous PR included Composer-related changes (composer.json, composer.lock, autoload files, and vendor folder updates) that were introduced as part of the rest-client-php library upgrade on the old branch.

Since master is now up to date with the required rest-client-php version, this new PR includes only the ticket-related changes and excludes those dependency and vendor file updates.

Changes:

  • Added new rest method getDnsDomainToken() in ApiHelper.
  • Replaced legacy XML create token call with new REST based token flow.
  • Refactored DNS helper to use REST API instead of deprecated XML API.
  • Updated DNS controller to handle REST token redirect for Admin area.
  • Updated client-side redirect logic to align with new REST Api flow.

Copilot AI review requested due to automatic review settings May 20, 2026 06:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds REST-based DNS domain-token generation and integrates a new “Manage DNS Zone” flow so WHMCS admins (and clients via existing hooks) can be redirected into Openprovider’s DNS management panel.

Changes:

  • Added REST command mapping + ApiHelper::getDnsDomainToken() to generate DNS domain tokens via the REST client.
  • Refactored DNS URL generation helper to use REST domain lookup + token creation (including Sectigo/Openprovider zone-provider selection).
  • Added an Admin-area custom button + system route/controller action to redirect admins to DNS management.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
modules/registrars/openprovider/routes/system.php Adds a new system route for the admin DNS management redirect action.
modules/registrars/openprovider/OpenProvider/API/CommandMapping.php Maps createDomainTokenRequest to the REST DomainTokenApi::createToken endpoint.
modules/registrars/openprovider/OpenProvider/API/ApiHelper.php Introduces getDnsDomainToken() wrapper around the new REST command.
modules/registrars/openprovider/openprovider.php Exposes a new WHMCS admin custom button and handler function.
modules/registrars/openprovider/helpers/DNS.php Refactors DNS redirect URL generation to use REST domain + token flow (non-static, DI-based).
modules/registrars/openprovider/Controllers/System/DnsController.php Adds Admin-area redirect action for “Manage DNS Zone”.
modules/registrars/openprovider/Controllers/Hooks/DnsAuthController.php Updates hook controller to use injected DNS helper (non-static).
modules/registrars/openprovider/Controllers/Hooks/ClientAreaPrimarySidebarController.php Updates client-area sidebar controller to use injected DNS helper (non-static).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/registrars/openprovider/Controllers/System/DnsController.php Outdated
Comment thread modules/registrars/openprovider/Controllers/System/DnsController.php Outdated
Comment thread modules/registrars/openprovider/Controllers/System/DnsController.php Outdated
Comment thread modules/registrars/openprovider/Controllers/System/DnsController.php Outdated
@YumeChaan YumeChaan requested a review from avishka-ra May 27, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants