Developer Center

setConfig()

When the “Test Connection” button on the "Admin Area > Services > Service Management > Module Settings > The Module" page is clicked, “controllers/test_connection.php” file that is in module directory is run. After editing the data coming from the form in this file, parameters are sent to setConfig() function and processed.

setconfig() defines the values it takes as parameters to the API class.

private function setConfig($username,$password,$tmode){
    $this->config["settings"]["username"] = $username;
    $this->config["settings"]["password"] = $password;
    $this->config["settings"]["test-mode"] = $tmode;

    $this->api =  new ExampleSSL_API($tmode);

    $this->api->set_credentials($username,$password);

    return $this;
}
set_order() testConnection()

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2024. All Rights Reserved.
Join Our Discord Channel
Top