public static function convert_tokens_to_balance($id_customer, $tokens_to_convert, $desc)
 {
     global $cookie;
     ${"GLOBALS"}["npryqyeb"] = "sellerinfo";
     if (!Module::isInstalled("agileprepaidcredit")) {
         return;
     }
     if (!Module::isInstalled("agilesellercommission")) {
         return;
     }
     ${"GLOBALS"}["iastbvljzo"] = "sellerinfo";
     require_once _PS_ROOT_DIR_ . "/modules/agileprepaidcredit/agileprepaidcredit.php";
     ${"GLOBALS"}["aobnyhzxbgv"] = "cc";
     require_once _PS_ROOT_DIR_ . "/modules/agileprepaidcredit/CustomerCredit.php";
     ${"GLOBALS"}["nhztnsskqu"] = "tokens_to_convert";
     $ijweksqf = "id_customer";
     require_once _PS_ROOT_DIR_ . "/modules/agilesellercommission/SellerCommission.php";
     if (${${"GLOBALS"}["nhztnsskqu"]} <= 0) {
         return Tools::displayError("Invalid convert amount.");
     }
     $bzyvww = "tokens_balance";
     ${${"GLOBALS"}["iastbvljzo"]} = new SellerInfo(SellerInfo::getIdByCustomerId(${$ijweksqf}));
     $afbzteqnbcoj = "apcm";
     if (!Validate::isLoadedObject(${${"GLOBALS"}["npryqyeb"]})) {
         return Tools::displayError("Seller info can not be found.");
     }
     ${${"GLOBALS"}["wpfealxuhp"]} = AgilePrepaidCredit::GetTokenBalance($cookie->id_customer);
     ${"GLOBALS"}["blovivk"] = "currency";
     if (${$bzyvww} < ${${"GLOBALS"}["pxtzavr"]}) {
         return Tools::displayError("You do not have enough account balance.");
     }
     ${${"GLOBALS"}["blovivk"]} = new Currency(Configuration::get("ASC_COMMISSION_CURRENCY"));
     ${${"GLOBALS"}["cakizvgcl"]} = AgilePrepaidCredit::ConvertTokens2Price(${${"GLOBALS"}["pxtzavr"]}, $currency->id);
     ${${"GLOBALS"}["aobnyhzxbgv"]} = new CustomerCredit();
     $cc->id = 0;
     $cc->id_customer = $cookie->id_customer;
     $cc->id_order = 0;
     ${$afbzteqnbcoj} = new AgilePrepaidCredit();
     if (version_compare($apcm->version, "1.4.9", ">=")) {
         $cc->id_reason = AgilePrepaidCredit::CREDIT_REASON_TO_SELLERCOMMISSION;
     }
     $cc->units = 0 - ${${"GLOBALS"}["pxtzavr"]};
     $cc->date_add = date("Y-m-d H:i:s");
     $cc->add();
     SellerCommission::addCreditMemoRecord($sellerinfo->id_seller, SellerCommission::RECORD_TYPE_SELLER_CREDIT, ${${"GLOBALS"}["cakizvgcl"]}, ${${"GLOBALS"}["uzllxeigbbj"]});
     return "";
 }