Jump to content

sample-registrar-module configuration values not saved


smarterdev

Recommended Posts

I'm trying the sample-registrar-module (https://github.com/WHMCS/sample-registrar-module) and when I do the configuration (and save changes) only the email field seems to be saved.

 

Example:

 

Activate for the first time:

 

API Username: 1024

API Key: <blank>

Test mode: <not checked>

Account Mode: Display Value 1

Email Preference: <no option selected>

Email: <blank>

 

Now key in/select something on every field and click save changes.

 

Once the page is reloaded all the values are reset to the default, except the Email field which is persistent. Any ideas on why I'm getting this error?

 

BRs

Link to comment
Share on other sites

I should probably add-on to the original post that the values are empty when passed through $params to the various methods as well

 

For example when registrarmodule_CheckAvailability($params) is called, I can see [whmcsVersion] => 7.1.1-release.1, [sld] => whateverdomainisearched, etc. But [API Key] and the other configured parameters are all blank. I did also check the tblregistrars table and it looks like values has been saved into the DB, but not propagated correctly for some reason.

Link to comment
Share on other sites

Looks like it is related to space in the key's name. I just realized that the email field was the only without a space in the name, and when I changed "API Key" to "APIKey" the value suddenly persist between saves.

 

Perhaps some developer @ whmcs can confirm this theory.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated