-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
eNom Domain Registrar Adapter #2339
Open
gmcsnetwork
wants to merge
7
commits into
FOSSBilling:main
Choose a base branch
from
gmcsnetwork:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Upon reviewing the AdapterAbstract class, noticed that all functions in eNom.php are currently set to return false in case of an error. To adhere to proper error handling practices and maintain consistency with the AdapterAbstract class, refactored the code to throw a Registrar_Exception instead of returning false. This change ensures that errors are handled more robustly and provides clearer feedback when something goes wrong.
This variable is supposed to contain the error message from the exception but it has not been defined. Instead, the exception's message should be used directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a quick look, this looks like a pretty good start.
A few critiques though:
- I would be hesitant to included errors messages in exceptions as those may be displayed in the client area. Depending on the error message, that might be problematic.
- There's a fair bit of CS oddities in the file. You could run rector and PHP-CS-Fixer which both have FOSSBilling specific configs for styling and code quality. This isn't strictly a blocker though as our repo is setup to periodically run these anyways.
- There's no copyright info / license in the file.
- These days we aren't super excited about merging 3rd party support into the main application just because we don't know if we can guarantee support for them. I don't think we have support for installing Registrars via the extension directory though. Ideally, we would have support for that and keep this in your own separate repo, but add it to the directory for easy installation.
Fixed file formatting and added copy right information
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces the eNom.php file for integrating eNom's API into FOSSBilling. The file includes the following functionalities:
API Configuration and Initialization:
The file sets up the necessary credentials and endpoints to connect with eNom's API.
It can be configured to use the production or test eNom API environments
Domain Management Functions:
Implements functions to check domain availability, register domains, renew domains, and transfer domains.
Provides error handling and response parsing to ensure smooth interactions with the API.
Utility Functions:
Contains helper functions to format requests, handle authentication, and log interactions with the API for debugging and auditing purposes.
Testing and Validation
The file has been tested in both production and test environments to verify the correctness of API interactions.
Unit tests have been added to cover the main functionalities, ensuring that domain management operations are performed accurately.
Documentation
Inline comments have been added to explain the purpose of functions and significant code blocks.