3 require('freeside.class.php');
4 $freeside = new FreesideSelfService();
6 $response = $freeside->new_customer( array(
9 'first' => $_POST['first'],
10 'last' => $_POST['last'],
11 'address1' => $_POST['address1'],
12 'address2' => $_POST['address2'],
13 'city' => $_POST['city'],
14 'state' => $_POST['state'],
15 'zip' => $_POST['zip'],
17 'daytime' => $_POST['daytime'],
18 'fax' => $_POST['fax'],
21 'invoicing_list' => $_POST['email'],
24 'username' => strtolower($_POST['username']),
25 '_password' => strtolower($_POST['password'])
28 error_log("[new_customer] received response from freeside: $response");
29 $error = $response['error'];
35 $custnum = $response['custnum'];
37 error_log("[new_customer] signup up with custnum $custnum");
43 error_log("[new_customer] signup error:: $error");
45 // display error message to user