From bb930ebb29f1a000ef096de937dc69cd9d83615b Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 2 Oct 2018 12:49:33 -0400 Subject: Revert "RT# 39340 - Created minimal selfservice that only allows payments to be made, authorization is based on ip and mac address. This is not done yet need to write routine to get mac address from radius server based on ip address." This reverts commit 7668262421ea253ffaf95e0233e037f2857f7071. --- min_selfservice/freeside.class.php | 74 -------------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 min_selfservice/freeside.class.php (limited to 'min_selfservice/freeside.class.php') diff --git a/min_selfservice/freeside.class.php b/min_selfservice/freeside.class.php deleted file mode 100644 index ee77ce016..000000000 --- a/min_selfservice/freeside.class.php +++ /dev/null @@ -1,74 +0,0 @@ -= 50400 ) { - - #php 5.4+ (deb 7+) - foreach ($hash as $key => $value) { - $flat[] = $key; - $flat[] = $value; - } - - } - - return($flat); -} - -#php 5.4+? -#function flatten($hash) { -# if ( !is_array($hash) ) return $hash; -# -# $flat = array(); -# -# foreach ($hash as $key => $value) { -# $flat[] = $key; -# $flat[] = $value; -# } -# -# return($flat); -#} - -class FreesideSelfService { - - //Change this to match the location of your selfservice xmlrpc.cgi or daemon - #var $URL = 'https://localhost/selfservice/xmlrpc.cgi'; - #var $URL = 'http://localhost/selfservice/xmlrpc.cgi'; - var $URL = 'http://localhost:8080/'; - - function FreesideSelfService() { - $this; - } - - public function __call($name, $arguments) { - - error_log("[FreesideSelfService] $name called, sending to ". $this->URL); - - $request = xmlrpc_encode_request("FS.ClientAPI_XMLRPC.$name", flatten($arguments[0])); - $context = stream_context_create( array( 'http' => array( - 'method' => "POST", - 'header' => "Content-Type: text/xml", - 'content' => $request - ))); - $file = file_get_contents($this->URL, false, $context); - $response = xmlrpc_decode($file); - // uncomment to trace everything - //error_log(print_r($response, true)); - if (xmlrpc_is_fault($response)) { - trigger_error("[FreesideSelfService] XML-RPC communication error: $response[faultString] ($response[faultCode])"); - } else { - //error_log("[FreesideSelfService] $response"); - return $response; - } - } - -} - -?> -- cgit v1.2.1