Klangaroo Posted November 12, 2008 Share Posted November 12, 2008 How exactly do you parse an array to the customfields parameter in the API's "Add Order" action? I have these fields I need for people registering .com.au domains, in the MySQL database they are called: Registrant Name Registrant ID Registrant ID Type Eligibility Name Eligibility ID Eligibility ID Type Eligibility Type Eligibility Reason So anyway I tried this: $postfields["customfields"] = base64_encode(serialize(array("1"=>$_POST['domainfield_0'], "2"=>$_POST['domainfield_1'], "3"=>$_POST['domainfield_2'], "4"=>$_POST['domainfield_3'], "5"=>$_POST['domainfield_4'], "6"=>$_POST['domainfield_5'], "7"=>$_POST['domainfield_6'], "8"=>$_POST['domainfield_7']))); but it didnt parse anything, so I tried actually manually entering the array item names, like this: $postfields["customfields"] = base64_encode(serialize(array("Registrant Name"=>$_POST['domainfield_0']))); and that didn't work either, what am I meant to do? 0 Quote Link to comment Share on other sites More sharing options...
yabdab Posted July 15, 2009 Share Posted July 15, 2009 Figure out the id of the custom field and that is what the *number* should be. So say it is '2', then "2"=>$_POST['some_value'] I had to go to product config page and look at the html for the custom field to figure out the id for it. Hope this helps. 0 Quote Link to comment Share on other sites More sharing options...
JayB Posted June 30, 2011 Share Posted June 30, 2011 $postfields["domainfields"] = base64_encode(serialize(array("0"=>"RegName","1"=>"RegId123","2"=>"ACN","3"=>"EligName","4"=>"EligID123","5"=>"VIC Business Number","6"=>"Registered Business","7"=>"Domain name is an Exact Match Abbreviation or Acronym of your Entity or Trading Name."))); Well I hope this helps out there, as I see many people have asked, and not one has given an example nor result. Good luck to you all. If anyone finds out how to add Registrar via API, please let me know. Jay 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.