Customer registration in Magento using soap API

C

login(‘apiname’, ‘apikey’);

// Create new customer
$newCustomer = array(
‘firstname’ => $firstname,
‘lastname’ => $lastname,
’email’ => $user_email,
‘password’ => $password,
‘dob’ => $dob,
‘website_id’ => 1,
‘store_id’ => 1,
‘group_id’ => 1
);

$newCustomerId = $client->call($session, ‘customer.create’, array($newCustomer));
//var_dump($newCustomerId);

if(!$newCustomerId)
{
echo “Success”;
}
else
echo “Fail”;
$client->endSession($session);

?>

About the author

mayur.bhansali
By mayur.bhansali

Category