Jump to content

Internal API Call to addorder does not set tld specific domainfields


Aita

Recommended Posts

We have an external system that sometimes calls whmcs through internal api to add a domainorder.

 

Since we are planing to upgrade to 7.1 we are testing out some functions.

 

For some reason when we call "AddOrder" it no longer sets the the domainfields.

This a part of the examplecode, for example a ".se" domain registration

 

$command = 'AddOrder';

$params=array();

$params["clientid"] = "31";

$params["domain"] = "sometestdomain.se";

$params["billingcycle"] = "annually";

$params["domaintype"] = "register";

$params["regperiod"] = "1";

$params["paymentmethod"] = "mailin";

$params["nameserver1"]="ns1.somenameserver.net";

$params["nameserver2"]="ns2.somenameserver.net";

$params["domainfields"]=base64_encode(serialize(array("Identification Number"=>"123456-7890","VAT"=>"")));

 

$results = localAPI($command, $params, $adminDATA);

print_r($results);

 

Everything works and no errors are reported, order is added by whmcs The order can even be accepted with "acceptorder" without issue.

 

The problem is is that the identification number in domainfields somehow goes missing and is not set in whmcs.

 

In 6.x we used $params["domainfields"]=base64_encode(serialize(array("0"=>"123456-7890")));

and this worked correctly

 

Is there some other way one has to pass the custom TLD specific variables to domainfields? (the docs still say base64 encoded serialized array)

We have tried the following ways and none worked, no errors are reported

 

$params["domainfields"]=base64_encode(serialize(array(".se" => array("Identification Number"=>"123456-7890","VAT"=>""))));

$params["domainfields"]=base64_encode(serialize(array("123456-7890","")));

$params["domainfields"]=base64_encode(serialize(array("0"=>"123456-7890","1"=>"")));

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