I'm adding a new order using WHMCS local API. Everything works fine except custom fields.
$command = 'AddOrder';
$postData = array(
'clientid' => $client_id,
'pid' => array($product_id),
'billingcycle' => array('monthly'),
'customfields' => array(base64_encode(serialize(array(1 => $site_id)))),
'paymentmethod' => 'stripe',
);
return localAPI($command, $postData);
My custom field ID is 53 but I set the key to 1 because of tutorials. Also I tried 53 as key array(base64_encode(serialize(array(53 => $site_id))))
but nothing changed.
Do you have any suggestion?