Jump to content

Contacts relation db table


Ntan

Recommended Posts

Hi,

we are developing a plugin for register domains.

We have implement the basic functions for the plugin but we have a problem regarding contacts
that we need to solve it.

When we create a contact the plugin also create a contact to our database, but we dont know how
to save this relation, meaning that contact_id 1 of whmcs is the contact_id 123 to our database.

So we need to create a custom database table that will hold this relation and have our module maintain it 
during the various functions.

So we need some info on how to create this table and manage it through our module.

Any help, suggestion  or study material appreciated
 

Link to comment
Share on other sites

Hello @Ntan,

In this case, you would likely want to do all of this by interacting directly with the database. We have some information on how to do this with Capsule in our Developer's Documentation, found here: https://developers.whmcs.com/advanced/db-interaction/

You can definitely use this to create and manage your custom tables!

Link to comment
Share on other sites

Thanks

i set up the table and i can get the data i want and it seems to working, i have not finished the module but the relation is working.

When i was testing the module the function registrarmodule_RegisterDomain was  returning error because could not find the relationship

but whmcs show the screen of Complete Order and send me email about the registration, but the registration did not actually happened

because of the error.

I did return an error  array 

array(1) { ["error"]=> string(56) ". Contact _EPP_21522_95879 does not exist [Code: 1010]." }   

and whmcs ignore it and continue to complete the order.

 

I dont think that this is a normal behaviour

Am i doing something wrong?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • 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