Fix DNS retrieval to use active provider (Sectigo/Openprovider)#539
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the OpenProvider registrar integration so DNS zone retrieval chooses the active DNS provider for a domain, instead of always querying the default Openprovider zone. In the broader codebase, this affects the WHMCS-side DNS management flow that reads zone records through ApiHelper.
Changes:
- Fetch domain metadata before DNS retrieval to infer which provider owns the active zone.
- Pass the resolved provider into
retrieveZoneDnsRequest. - Add a helper that maps domain metadata to either
sectigooropenprovider.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
An additional domain lookup is required to determine the active DNS provider, as this information is not available from DNS zone APIs. This ensures correct handling of domains using Sectigo DNS instead of defaulting to Openprovider. Provider detection is handled internally within ApiHelper for consistency across retrieve, update, and delete operations. A fallback to Openprovider is used if domain lookup fails, to avoid blocking DNS operations due to temporary lookup issues. Zone creation intentionally does not use provider detection and defaults to Openprovider. |
…with-premium-name-servers-are-getting-duplicated-in-RCP-when-adding-zone-records
Fix DNS retrieval to use active provider instead of default Openprovider