registrobr / whmcs-registrobr-epp

WHMCS Registrar Module for interfacing to Registro.br EPP
GNU General Public License v3.0
41 stars 21 forks source link

Set Environment Production #66

Closed scarniel closed 1 year ago

scarniel commented 8 years ago

In the file brdomaincheck.php exists the function:

function get_server() { include "configuration.php";

try {
    $link = mysqli_connect($db_host, $db_username, $db_password, $db_name);
    $query = "SELECT * FROM tblregistrars where registrar = 'registrobr' and setting = 'TestMode'";
    $result = $link->query($query);

    # se existe testmode entao vamos pro servidor de teste
    if (mysqli_num_rows($result) > 0) {
        return REGISTROBR_SERVER_TESTE;
    }
} catch (Exception $e) {
    die("error connection database");
}

return REGISTROBR_SERVER_PRODUCAO;

}

In the running version 6.2, when saving the data properties are encrypted in the database, ie there will be a record for the TestMode property even being "false". In this case, it will return a record for the query and not even be labeled the property will always be in the "TestMode" option. See below:

se existe testmode entao vamos pro servidor de teste

    if (mysqli_num_rows($result) > 0) {
        return REGISTROBR_SERVER_TESTE;
    }
rubenskuhl commented 8 years ago

For now we will try working with two branches instead of having it as a runtime option. Will see if that strategy works better or not in the longterm.

rubenskuhl commented 7 years ago

New module version will attempt to address both OT&E and production in a single branch.

rubenskuhl commented 1 year ago

It should be resolved, needs testing

rubenskuhl commented 1 year ago

Seems good.