You have passed like this :
configoptions is send like this: array(base64_encode(serialize(array("2" => 2))), base64_encode(serialize(array("10" => 21)))); => ouput is [YToxOntpOjI7aToyO30=, YToxOntpOjEwO2k6MjE7fQ==]
But I have passed like this and its worked for me :
// Geting IDs for config options $operating_system = ["2" => 2]; $cpanel_cloud_license = ["10" => 21];
// Config Options Array Merge for multiple config options $configoptions_array_merge = $operating_system + $cpanel_cloud_license;
// Config Options Array Formatted for WHMCS API $configoptions_array[] = base64_encode(serialize($configoptions_array_merge));
// Sending to API 'configoptions' => isset($configoptions_array) ? $configoptions_array : '',
MUST Remember :
Your Output is : [YToxOntpOjI7aToyO30=, YToxOntpOjEwO2k6MjE7fQ==] But Correct Output will be only one always, doesn't matter how many arrays you have passed. Correct Output will be : [YToxOntpOjI7aToyO30=]