mramos Posted April 1, 2013 Share Posted April 1, 2013 Hi I'm using the whmcs (5.2.3) api and everything it's ok, but i have a few problems with the customfield, for example when i try with addclient action I have a few customfields (Not Required Field) as "Condicion de IVA" The first problem When i try to add client without customfields i receive error INPUT Array ( [username] => XXXXX [password] => XXXXX [action] => addclient [firstname] => Jose Maria 3333 [lastname] => Alonso0001 [companyname] => Ingreso API 22 => jl2133pejjj88wwjz1@picoypala.com.ar [address1] => 123 Demo Street [city] => Demo [state] => Florida [postcode] => AB123 [country] => AR [phonenumber] => 123456789 [password2] => demo [currency] => 3 [language] => Spanish ) OUTPUT <?xml version="1.0" encoding="utf-8"?> <whmcsapi version="5.2.3"> <action>addclient</action> <result>error</result> <message><![CDATA[Condicion de IVA Invalid Select Option</li>]]></message> </whmcsapi> --------------------------------------- 2nd Problem When i try to add the same data with customfield i receive the same error In the script i use the following line $postfields["customfields"] = base64_encode(serialize(array("1"=>"Google","15"=>"Monotributo","5"=>"0001"))); All the id of customfields are ok and the values of the custom fields are valid. In the frontend the customfields are ok. INPUT ( [username] => XXXXXX [password] => XXXXXX [action] => addclient [firstname] => Jose Maria 3333 [lastname] => Alonso0001 [companyname] => Ingreso API 22 => jl2133pejjj88wwjz1@picoypala.com.ar [address1] => 123 Demo Street [city] => Demo [state] => Florida [postcode] => AB123 [country] => AR [phonenumber] => 123456789 [password2] => demo [customfields] => YTozOntpOjE7czo2OiJHb29nbGUiO2k6MTU7czoxMToiTW9ub3RyaWJ1dG8iO2k6NTtzOjQ6IjAwMDEiO30= [currency] => 3 [language] => Spanish ) OUTPUT <?xml version="1.0" encoding="utf-8"?> <whmcsapi version="5.2.3"> <action>addclient</action> <result>error</result> <message><![CDATA[Condicion de IVA Invalid Select Option</li>]]></message> </whmcsapi> Considerations If I delete the custom field Condicion de IVA the scripts its fine If I change the custom field Condicion de IVA to the string (not DROPDONW) work ok. In the previous version 5.1. the script work fine. Tks Martin 0 Quote Link to comment Share on other sites More sharing options...
levelman Posted April 19, 2013 Share Posted April 19, 2013 And i have this error in version 5.2.3. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.