Developer Center

EN

__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?

We have a great team to answer your queries
Contact Us
Copyright © 2020. All rights reserved.
Join Our Discord Channel
Top