diff options
Diffstat (limited to 'ng_selfservice/process_select_cust.php')
-rw-r--r-- | ng_selfservice/process_select_cust.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ng_selfservice/process_select_cust.php b/ng_selfservice/process_select_cust.php new file mode 100644 index 000000000..fe3612157 --- /dev/null +++ b/ng_selfservice/process_select_cust.php @@ -0,0 +1,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"); + +?> |