Hello,
I'm using the Sugar SOAP api to create new accounts remotely via a code block something like this
This works fine, but I need to add in a shipping and a billing address for each new account.HTML Code:require_once('lib/nusoap.php'); $client = new soapclient('http://myurl.com/soap.php?wsdl',true); $auth_array = array( 'user_auth' => array ( 'user_name' => 'my-name', 'password' => md5('my-password'), 'version' => '5.2.0', ) ); $login_results = $client->call('login',$auth_array); $session_id = $login_results['id']; echo "Login Result: ".$session_id; $create_user_data = array( 'user_name' => 'my-name', 'password' => md5('my-password'), 'name' => 'Test name '.rand(), 'phone' => '555-555-4321', 'website' => 'www.testing.com', ); echo "Creating account: \n"; echo $client->call('create_account', $create_user_data )."\n";
So is there a way I can do something like this?
Thanks!!!HTML Code:$create_user_data = array( 'user_name' => 'my-name', 'password' => md5('my-password'), 'name' => 'Test name '.rand(), 'phone' => '555-555-4321', 'website' => 'www.testing.com', 'billing_address' => arrray( 'address_1' => '101 pine street', 'address_2' => 'Apt 3', 'city' => 'My town', 'state' => 'My state', 'zip' => 'My Zip', ) 'shipping_address' => arrray( 'address_1' => '101 elm street', 'address_2' => 'Apt 3', 'city' => 'My town', 'state' => 'My state', 'zip' => 'My Zip', ) );


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks