Developer Center

__construct()

It is run Once the class is started, it defines the values on the settings page to the API class.

You can import the files of API service as in the example.

function __construct(){

    $this->config   = Modules::Config("Product",__CLASS__);
    $this->lang     = Modules::Lang("Product",__CLASS__);

    if(!class_exists("ExampleSSL_API")) include __DIR__.DS."api.php";

    $username   = $this->config["settings"]["username"];
    $password   = $this->config["settings"]["password"];
    $password   = Crypt::decode($password,Config::get("crypt/system"));
    $tmode      = (bool) $this->config["settings"]["test-mode"];

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

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

Do you have any questions?

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