summaryrefslogtreecommitdiff
path: root/ng_selfservice/process_select_cust.php
blob: fe361215775aea37eddd912f989d565b2246035d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?

require('freeside.class.php');
$freeside = new FreesideSelfService();

$response = $freeside->switch_cust( array( 
  'session_id' => $_COOKIE['session_id'],
  'custnum'    => $_POST['custnum'],
) );

#error_log("[switch_cust] received response from freeside: $response");

$error = $response['error'];

if ( $error ) {

  //this isn't well handled... but the only possible error is a session timeout?

  header('Location:index.php?username='. urlencode($username).
                           '&domain='.   urlencode($domain).
                           '&email='.    urlencode($email).
                           '&error='.    urlencode($error)
        );
  die();

}

// sucessful customer selection

header("Location:main.php");

?>