Core Module Functions

The core module functions are Create, Suspend, Unsuspend, Terminate, Renew, ChangePassword, ChangePackage, ApiConfig and TestConnection.
Above mentioned functions instead of ApiConfig and TestConnection all operate in a similar manner. They can run both manually and automatically. Each expected to return either a success or error response.

Response Handling

Each of these functions instead of ApiConfig after running actions must either return a success or error as
return ["status"=>"success","message"=>"your message here"];
OR
return ["status"=>"error","message"=>"your message here"];

For a successful result the code must actually return the word “success” to end the function. When WHASOLS receives “success” it knows the function completed and continues on that basis.
Should the function fail, the return should be a user understandable error message, as it will display to staff users as return ["status"=>"error","message"=>"your message here"];.

Action Events

When a function is successful, there are various actions that run as follows:
  • CreateAccount - Changes status to Active + Sends Product Welcome Email
  • SuspendAccount - Changes status to Suspended
  • UnsuspendAccount - Changes status to Active
  • TerminateAccount - Changes status to Terminated
  • ChangePassword - Updates password in database
  • TestConnection - Check Connection Server or API
  • ApiConfig - Return API Configuration parameters in array (Set of Keys and Values)
Besides the above actions, admin users receive a confirmation of functions completing, or errors in the case of failure. Functions invoked through automation, such as payment of a new order, that notification can be via email. In the case of ChangePassword, any errors returned are also displayed to client users.