Jump to content

To add an order and domain registration/transfer...


goldenmaza

Recommended Posts

Hello

 

I would like to know if the process of domain registration/transfer happens automatically when addorder is called and processed? I have not tried this with my code, but I rather just ask here and get a good answer to how it works.

 

Or do I have to do something like this:

 

1. create the array for the current order

2. call addorder and send the array as data

3. call domain registration/transfer

 

Kind regards

Richard

Link to comment
Share on other sites

Another question: If I have an order with multiple domain registrations, how do I setup the postfields for the curl call?

Meaning the following example under the WHMCS documentations:

 

$postfields["nameserver1"] = "ns1.demo.com";

$postfields["nameserver2"] = "ns2.demo.com";

$postfields["nameserver3"] = "ns3.demo.com";

$postfields["nameserver4"] = "ns4.demo.com";

 

According to the example, this is how you are suppose to go by, if there are multiple products under the order. How does the WHMCS server know the difference? There is nothing on those four lines that tells the WHMCS system that they belong to the domain item 0 (domain[0]) or the item 1 (domain[1]). If we follow the example stated, shouldnt the system require the nameservers to be stated like: nameserver[0][0], nameserver[0][1] and for the second domain: nameserver[1][0], nameserver[1][1]?

 

If I have like 3 domains to register? The first domain has only one nameserver, second has none and third has two. How do I set these up the postfields? There doesnt seem to be a similiar setup for the nameserver registrations as there are for the product id, among others. Does it matter in which order they come in the postfields array? Like:

 

$postfields["domain[0]"] = "demo.com";

$postfields["nameserver1"] = "ns1.demo.com";

$postfields["nameserver2"] = "ns2.demo.com";

$postfields["nameserver3"] = "ns3.demo.com";

$postfields["nameserver4"] = "ns4.demo.com";

$postfields["domain[1]"] = "demos.com"; <= so if I placed this one after the last nameserver4, the system will abort?

$postfields["nameserver1"] = "ns1.demos.com";

$postfields["nameserver2"] = "ns2.demos.com";

$postfields["nameserver3"] = "ns3.demos.com";

$postfields["nameserver4"] = "ns4.demos.com";

 

Can anyone tell me how the rules are behind this part of the system?

 

Kind regards

Richard

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