3 require('freeside.class.php');
4 $freeside = new FreesideSelfService();
6 $session_id = $_POST['session_id'];
8 $response = $freeside->new_customer( array(
9 'session_id' => $session_id,
11 'first' => $_POST['first'],
12 'last' => $_POST['last'],
13 'address1' => $_POST['address1'],
14 'address2' => $_POST['address2'],
15 'city' => $_POST['city'],
16 'state' => $_POST['state'],
17 'zip' => $_POST['zip'],
19 'daytime' => $_POST['daytime'],
20 'fax' => $_POST['fax'],
23 'invoicing_list' => $_POST['email'],
26 'username' => strtolower($_POST['username']),
27 '_password' => strtolower($_POST['password'])
30 error_log("[new_customer] received response from freeside: $response");
31 $error = $response['error'];
37 $custnum = $response['custnum'];
39 error_log("[new_customer] signup up with custnum $custnum");
45 error_log("[new_customer] signup error:: $error");
47 // display error message to user