Example #1
0
    }
} else {
    // User is logged in
    if (!empty($_GET['action']) and $_GET['action'] == 'logout') {
        // Logout action
        logout();
        redirect('index.php');
        exit;
    } else {
        if (!empty($_GET['action']) and $_GET['action'] == 'confirm') {
            // Rublon transaction confirmation
            include 'confirm.php';
        } else {
            if (!empty($_GET['action']) and $_GET['action'] == 'features') {
                try {
                    $client = new RublonAPIGetAvailableFeatures($rublon);
                    $client->perform();
                    echo '<pre>';
                    print_r($client->getFeatures());
                } catch (Exception $e) {
                    echo $e->getClient()->getRawRequestHeader();
                    echo $e->getClient()->getRawRequestBody();
                    echo $e->getClient()->getRawResponseHeader();
                    echo $e->getClient()->getRawResponseBody();
                    echo get_class($e);
                    echo $e->getMessage();
                }
                exit;
            } else {
                if (!empty($_GET['action']) and $_GET['action'] == 'notification' and !empty($_POST['url'])) {
                    try {
Example #2
0
 /**
  * Get the features list from Rublon server.
  * 
  * @return NULL|array
  */
 static function getFeaturesFromServer()
 {
     if (!RublonHelper::isSiteRegistered()) {
         return null;
     }
     try {
         $client = new RublonAPIGetAvailableFeatures(RublonHelper::getRublon());
         $client->perform();
         return $client->getFeatures();
     } catch (RublonException $e) {
         return null;
     }
 }