Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /* ///-build_id: 2015011813.0147 /// This source file is subject to the Software L..

Decoded Output download

<?php /* 
///-build_id: 2015011813.0147 
/// This source file is subject to the Software License Agreement that is bundled with this  
/// package in the file license.txt, or you can get it here 
/// http://addons-modules.com/store/en/content/3-terms-and-conditions-of-use 
/// 
/// @copyright  2009-2012 Addons-Modules.com 
/// 
*/ 
${"GLOBALS"}["ntjoylrv"]="file_attachement";${"GLOBALS"}["arksblbgfdk"]="smarty";${"GLOBALS"}["ehetdnewmoi"]="price_wt";${"GLOBALS"}["geonzodiev"]="products_list";${"GLOBALS"}["btdvybwbsdi"]="customization_quantity";${"GLOBALS"}["wbxgzd"]="text";${"GLOBALS"}["owhhmmma"]="customization_text";${"GLOBALS"}["iyoehwfgqn"]="customized_datas";${"GLOBALS"}["rrmdtoynitd"]="virtual_product";${"GLOBALS"}["eoscahu"]="carrier";${"GLOBALS"}["xccvdnjvg"]="delivery_state";${"GLOBALS"}["tnuplwrvstwo"]="delivery";${"GLOBALS"}["iwdeooik"]="invoice";${"GLOBALS"}["wvpuadpetdk"]="secure_key";${"GLOBALS"}["qibqmayfwgkx"]="dont_touch_amount";${"GLOBALS"}["tmjqubolgf"]="extra_vars";${"GLOBALS"}["wlrjckorju"]="amount_paid";${"GLOBALS"}["byjcxkywgq"]="ret";${"GLOBALS"}["buezcngaesyc"]="name";${"GLOBALS"}["gertdzqqgem"]="id_category";${"GLOBALS"}["nhqysdxy"]="imageurl";${"GLOBALS"}["ggspfdnjdxq"]="id_cate";${"GLOBALS"}["swrxphdiynx"]="mycredit";${"GLOBALS"}["lmedvii"]="id_agile_randompin";${"GLOBALS"}["ldegzlkewhx"]="rp";${"GLOBALS"}["hjeiiyuiwdr"]="pinrec";${"GLOBALS"}["rmokmhhd"]="pin_code";${"GLOBALS"}["cbxeyblhch"]="confirmation";${"GLOBALS"}["fpkuqpvl"]="ord";${"GLOBALS"}["jgchehyjp"]="id_order_invoice";${"GLOBALS"}["pkrvmdzpadp"]="paypalPayment";${"GLOBALS"}["hhrhkxfvedgq"]="tokenPayment";${"GLOBALS"}["tiofkusptwk"]="total_discounts_tax_excl";${"GLOBALS"}["kbbebsgvgkcs"]="total_discounts_tax_incl";${"GLOBALS"}["xpyblkj"]="theCart";${"GLOBALS"}["xtbiuduhxm"]="tokens_value";${"GLOBALS"}["ybhsfu"]="total_paid";${"GLOBALS"}["kaxxbfgbsjs"]="tokens_used_in_cart";${"GLOBALS"}["ekvluum"]="turn_on";${"GLOBALS"}["hdtkvvokd"]="templateVars";${"GLOBALS"}["lhtowuxaj"]="first";${"GLOBALS"}["qoorppiynvcy"]="sql_custom_data";${"GLOBALS"}["nhqcywd"]="id_customization";${"GLOBALS"}["wplwxrqp"]="quantity";${"GLOBALS"}["mdwgcikb"]="id_product_attribute";${"GLOBALS"}["uhfhtmsupae"]="carttotal";${"GLOBALS"}["kivhelr"]="id_address";${"GLOBALS"}["richmfqvmqb"]="fieldName";${"GLOBALS"}["sxhhbypq"]="indexes";${"GLOBALS"}["pvdjddu"]="authorizedFileFields";${"GLOBALS"}["ocnibkywhpo"]="value";${"GLOBALS"}["fkeeniy"]="index";${"GLOBALS"}["zfvipvfar"]="authorizedTextFields";${"GLOBALS"}["ggblvkjrmb"]="fieldId";${"GLOBALS"}["vxxqswj"]="fieldIds";${"GLOBALS"}["vsunrh"]="customization";${"GLOBALS"}["anvxqnck"]="type";${"GLOBALS"}["xyvomf"]="id_product_download";${"GLOBALS"}["kgxkdfrvgq"]="isLogged";${"GLOBALS"}["ciqxghdy"]="redirect_url";${"GLOBALS"}["erkzouscbq"]="id_shop";${"GLOBALS"}["umktsnwp"]="qty";${"GLOBALS"}["mvxpaghvn"]="isresume";${"GLOBALS"}["qtnaunj"]="agile_paid";${"GLOBALS"}["rkouhblqi"]="agile_pid";${"GLOBALS"}["elggxxc"]="items";${"GLOBALS"}["nircndu"]="mapping";${"GLOBALS"}["nthasle"]="infoBlocks";${"GLOBALS"}["tkudhmxbjof"]="len";${"GLOBALS"}["rwsuozrb"]="nv";${"GLOBALS"}["wfrfljcm"]="item";${"GLOBALS"}["pbfbkw"]="data";${"GLOBALS"}["gkdlgkntx"]="datfile";${"GLOBALS"}["ulbsblvged"]="id_customer";${"GLOBALS"}["xfdoqzjyvsy"]="context";${"GLOBALS"}["bjdxbbuier"]="apcOrderTotal_tokens";${"GLOBALS"}["unsaohcp"]="balance";${"GLOBALS"}["cmzlzsyepu"]="val";${"GLOBALS"}["iicdrbtj"]="id_cart";${"GLOBALS"}["kyijkefuvt"]="id_currency";${"GLOBALS"}["dkoknnkf"]="currency";${"GLOBALS"}["mmgllcephouo"]="token_payment_done";${"GLOBALS"}["uwitzfbgsw"]="credits";${"GLOBALS"}["qcwdmdobg"]="id_customer_credit";${"GLOBALS"}["gkdjcr"]="token_paid";${"GLOBALS"}["tjlteqe"]="order_reference";${"GLOBALS"}["igdosfyu"]="rewards";${"GLOBALS"}["bmfikjl"]="id_reason";${"GLOBALS"}["eqlxnfdhqhof"]="key";${"GLOBALS"}["vmvckqp"]="products";${"GLOBALS"}["qplrklmxb"]="theOrder";${"GLOBALS"}["yirlhd"]="paid_by_tokens";${"GLOBALS"}["kzybiq"]="order";${"GLOBALS"}["kwdksx"]="msg";${"GLOBALS"}["dhappvhggiq"]="reffer";${"GLOBALS"}["ptunykznpqi"]="handle";${"GLOBALS"}["suatau"]="tokenpkgs";${"GLOBALS"}["mchvytslox"]="cover";${"GLOBALS"}["qnbsyuwzhlh"]="image";${"GLOBALS"}["kbeyebtqpwgu"]="k";${"GLOBALS"}["bxfznfdq"]="images";${"GLOBALS"}["tpscwipijflt"]="result";${"GLOBALS"}["joschbirchk"]="product";${"GLOBALS"}["covlofnth"]="results";${"GLOBALS"}["tsaegnnprl"]="category";${"GLOBALS"}["qujfnh"]="tokens_in_cart_value";${"GLOBALS"}["gdgwepyqsegk"]="total_discounts_value";${"GLOBALS"}["pfzyggsmycc"]="cfmmsg";${"GLOBALS"}["kcfqoy"]="pay_mode";${"GLOBALS"}["yuhaly"]="blocksettings";${"GLOBALS"}["bvuswe"]="repurchase";${"GLOBALS"}["cbwjbh"]="ispaid";${"GLOBALS"}["adtynxk"]="apc_atcartsummary";${"GLOBALS"}["xxkktp"]="pageName";${"GLOBALS"}["jsinll"]="contr";${"GLOBALS"}["eirkmjikcdjm"]="apc_atproductpage";${"GLOBALS"}["cqevctpn"]="hooks";${"GLOBALS"}["minpbznbs"]="attributes_combinations";${"GLOBALS"}["tucisd"]="showstate";${"GLOBALS"}["hipvxkj"]="tax_display";${"GLOBALS"}["gvjfmdgekt"]="rewardableprice";${"GLOBALS"}["uwukbrbchdl"]="reward_rate";${"GLOBALS"}["pqljgjodzqz"]="tokenunit_value_in_customer_currency";${"GLOBALS"}["rrcobwjses"]="price_token";${"GLOBALS"}["jixrmbwijv"]="tokens";${"GLOBALS"}["sodjyfngq"]="unitcurrency";${"GLOBALS"}["itpndpm"]="price_display";${"GLOBALS"}["ixxeushy"]="price";${"GLOBALS"}["qybkvwomin"]="id_product";${"GLOBALS"}["vxbrompklq"]="row";${"GLOBALS"}["mjctzd"]="id_order";${"GLOBALS"}["nytvzvadm"]="sql";${"GLOBALS"}["phhxheyictp"]="exists";${"GLOBALS"}["iiklmgjvq"]="orderStatus";${"GLOBALS"}["blmeqtyti"]="params";${"GLOBALS"}["utnksyc"]="total_vouchers";${"GLOBALS"}["ueouwmnpmi"]="tokens_in_cart";${"GLOBALS"}["xjoivrmt"]="reward_tokens";${"GLOBALS"}["rcixsxhjory"]="apc_processcredit_url";${"GLOBALS"}["vgysqitht"]="default_use_credit";${"GLOBALS"}["ttrikuxlbjp"]="reward_value";${"GLOBALS"}["jelfycmsyvn"]="apcOrderTotal";${"GLOBALS"}["sryhbklyx"]="is_tokens_only";${"GLOBALS"}["uirohyurf"]="prod";${"GLOBALS"}["mncddowfg"]="prods";${"GLOBALS"}["tjirhrgip"]="usecreditform";${"GLOBALS"}["qvelulmzfhr"]="mycredit_url";${"GLOBALS"}["jsoosoid"]="error";${"GLOBALS"}["qpnztlyok"]="nbErrors";${"GLOBALS"}["mewfmuns"]="conf";${"GLOBALS"}["yyuzyjnqn"]="conf_keys";${"GLOBALS"}["psdgkujd"]="lang";${"GLOBALS"}["wnaspofn"]="group_content";${"GLOBALS"}["hrcromck"]="currencies";${"GLOBALS"}["dprkmivxq"]="Token_fields_form";${"GLOBALS"}["ffawofxy"]="fields_form";${"GLOBALS"}["noapmaq"]="group_rewards";${"GLOBALS"}["xlnxtmaus"]="block";${"GLOBALS"}["paoqdtcbd"]="settings";${"GLOBALS"}["unstwrb"]="content";${"GLOBALS"}["wmoworrcph"]="cate";${"GLOBALS"}["pehvik"]="categories";${"GLOBALS"}["mhipca"]="category_nbr";${"GLOBALS"}["sytnvowmuby"]="objreward";${"GLOBALS"}["wiucbnndkjnv"]="id_group_reward";${"GLOBALS"}["tvdgafgmrd"]="group_reward";${"GLOBALS"}["opnwrbnrmjd"]="unitprice";${"GLOBALS"}["tihdgdt"]="pcredit_cid";${"GLOBALS"}["pzrpio"]="health_check";${"GLOBALS"}["sajtirjm"]="adminfolder";${"GLOBALS"}["glcqrxostpi"]="method";if(!class_exists("AgileInstaller")){include_once(_PS_ROOT_DIR_."/modules/agileprepaidcredit/install/".(_PS_VERSION_>"1.6"?"1.6x":"1.5x")."/classes/AgileInstaller.php");eval("class AgileInstaller extends AgileInstallerCore {}");}if(!class_exists("AgileModule")){include_once(_PS_ROOT_DIR_."/modules/agileprepaidcredit/install/".(version_compare(_PS_VERSION_,"1.6",">")?"1.6x":"1.5x")."/classes/module/AgileModule.php");eval("class AgileModule extends AgileModuleCore {}");}include_once(_PS_ROOT_DIR_."/modules/agileprepaidcredit/GroupReward.php");include_once(_PS_ROOT_DIR_."/modules/agileprepaidcredit/CustomerCredit.php");include_once(_PS_ROOT_DIR_."/modules/agileprepaidcredit/RandomPin.php");define("Agile_PrepaidCredit_Logging","off");class AgilePrepaidCredit extends PaymentModule{const INSTALL_SQL_FILE="install.sql";const PAY_MODE_ONECLICK=0;const PAY_MODE_NORMAL=1;const PAY_MODE_COMBINATION=2;const WAITING_STATE_NAME="Waiting Token Validation";const CREDIT_REASON_UNKNOWN=0;const CREDIT_REASON_PURCHASE=1;const CREDIT_REASON_ONE_CLICK_CHECKOUT_PAYMENT=2;const CREDIT_REASON_NORMAL_CHECKOUT_PAYMENT=3;const CREDIT_REASON_PURCHASE_REWARD=4;const CREDIT_REASON_AFFILIATE_COMMISSION=5;const CREDIT_REASON_ORDER_CANCELLATION=6;const CREDIT_REASON_TO_SELLERCOMMISSION=7;const CREDIT_REASON_FROM_SELLERCOMMISSION=8;const CREDIT_REASON_ADMIN_ADJUSTMENT=9;const SESSION_TOKEN_PROCESSING_MARKER="SESSION_TOKEN_PROCESSING_MARKER";private$agilemodule;private$_html='';private$_postErrors=array();function __construct(){$this->configs=Configuration::getMultiple(array("AGILE_PCREDIT_CID","AGILE_PCREDIT_WAITING_STATE","AGILE_PCREDIT_UNITPRICE","AGILE_PCREDIT_UNITCURRENCY","AGILE_PCREDIT_REPURCHASE","AGILE_PCREDIT_PAY_MODE","AGILE_PCREDIT_POSITION","AGILE_PCREDIT_HIDE_TOKENINFO","AGILE_PCREDIT_SUMMARY_POS","PS_BLOCK_CART_AJAX"),0,0);$this->newfiles=array("classes/AgileInstaller.php"=>array("1.6x"=>"classes/AgileInstaller.php","1.5x"=>"classes/AgileInstaller.php"),"classes/AgileHelper.php"=>array("1.6x"=>"classes/AgileHelper.php","1.5x"=>"classes/AgileHelper.php"),"classes/AgileSellerManager.php"=>array("1.6x"=>"classes/AgileSellerManager.php","1.5x"=>"classes/AgileSellerManager.php"),"classes/module/AgileModule.php"=>array("1.6x"=>"classes/module/AgileModule.php","1.5x"=>"classes/module/AgileModule.php"));$this->shared_override=array("override/classes/Mail.php","override/classes/Tools.php","override/classes/PaymentModule.php");$this->version_dependencies=array();$this->name="agileprepaidcredit";$this->tab="payments_gateways";$this->currencies=true;$this->author="addons-modules.com";$this->version="1.6.0.2";$this->dependencies=array();$this->ps_versions_compliancy=array("min"=>"1.6","max"=>_PS_VERSION_);$this->active=1;$this->bootstrap=true;parent::__construct();$this->displayName=$this->l('Agile Prepaid Credit module');$this->description=$this->l('Adds prepaid credit functionality to PrestaShop');$this->agilemodule=new AgileModule();$this->agilemodule->copyAgileExtendedData($this);}public function __call($method,$args){$fezciwcuwnd="args";return$this->agilemodule->executeMethod(${${"GLOBALS"}["glcqrxostpi"]},${$fezciwcuwnd});}function install(){$oyivvhavws="cate";if(!$this->preinstall()){$this->_errors=array_merge($this->_errors,$this->agilemodule->_errors);return false;}if(!AgileInstaller::sql_install(dirname(__FILE__)."/".self::INSTALL_SQL_FILE))return false;AgileInstaller::add_field_ifnotexists("customer_credit","memo","varchar(1024)","NULL");AgileInstaller::add_field_ifnotexists("customer_credit","id_reason","int","NULL");if(!parent::install())return false;${"GLOBALS"}["uktzwj"]="waitState";${${"GLOBALS"}["uktzwj"]}=AgileInstaller::createLinkedOrderState(self::WAITING_STATE_NAME);${$oyivvhavws}=$this->getModuleLinkedCategory();if(!Configuration::updateGlobalValue("AGILE_PCREDIT_CID",$cate->id)OR!Configuration::updateGlobalValue("AGILE_PCREDIT_WAITING_STATE",$waitState->id)OR!$this->setGlobalDefaultConfig("AGILE_PCREDIT_UNITPRICE",1)OR!$this->setGlobalDefaultConfig("AGILE_PCREDIT_UNITCURRENCY",(int)Configuration::get("PS_CURRENCY_DEFAULT",null,1))OR!$this->setGlobalDefaultConfig("AGILE_PCREDIT_REPURCHASE",0)OR!$this->setGlobalDefaultConfig("AGILE_PCREDIT_PAY_MODE",self::PAY_MODE_ONECLICK)OR!$this->setGlobalDefaultConfig("AGILE_PCREDIT_POSITION",0)OR!$this->setGlobalDefaultConfig("AGILE_PCREDIT_HIDE_TOKENINFO",0)OR!$this->setGlobalDefaultConfig("AGILE_PCREDIT_SUMMARY_POS",0)OR!$this->setGlobalDefaultConfig("PS_BLOCK_CART_AJAX",0))return false;if(!$this->registerHook("displayLeftColumn")OR!$this->registerHook("displayRightColumn")OR!$this->registerHook("displayShoppingCartFooter")OR!$this->registerHook("displayTop")OR!$this->registerHook("displayFooter")OR!$this->registerHook("displayRightColumnProduct")OR!$this->registerHook("displayCustomerAccount")OR!$this->registerHook("displayMyAccountBlock")OR!$this->registerHook("displayMyAccountBlockfooter")OR!$this->registerHook("displayPayment")OR!$this->registerHook("agiletokensummary")OR!$this->registerHook("actionValidateOrder")OR!$this->registerHook("actionOrderStatusUpdate")OR!$this->registerHook("actionOrderStatusPostUpdate"))return false;if(!AgileInstaller::create_tab("Token/Credits","AgileCustomerCredits","AdminParentCustomer",$this->name))return false;AgileInstaller::init_tab_prmission_for_existing_profiles("AgileCustomerCredits",1,1,1,1);if(!AgileInstaller::create_tab("Credit Balances","AgileCreditBalances","AdminParentCustomer",$this->name))return false;AgileInstaller::init_tab_prmission_for_existing_profiles("AgileCreditBalances",1,1,1,1);Autoload::getInstance()->generateIndex();return true;}public function uninstall(){Configuration::updateGlobalValue("PS_BLOCK_CART_AJAX",1);if(!parent::uninstall())return false;AgileInstaller::delete_tab("AgileCustomerCredits");AgileInstaller::delete_tab("AgileCreditBalances");return true;}public function getContent(){${"GLOBALS"}["oqjhivrp"]="health_check";global$cookie;$mfhuev="health_check";$this->_html="<h2>".$this->displayName."</h2>";${${"GLOBALS"}["sajtirjm"]}=AgileInstaller::detect_admin_folder($_SERVER["SCRIPT_FILENAME"]);${$mfhuev}=AgileInstaller::install_health_check($this->newfiles,$this->name,${${"GLOBALS"}["sajtirjm"]});if(!empty(${${"GLOBALS"}["oqjhivrp"]}))$this->_html.=${${"GLOBALS"}["pzrpio"]};$this->_html.=AgileInstaller::show_agile_links();if(Tools::isSubmit("submitSetting")){$lpbqxoi="unitprice";${"GLOBALS"}["wwygxhbes"]="unitprice";${$lpbqxoi}=floatval(Tools::getValue("unitprice"));if(!${${"GLOBALS"}["wwygxhbes"]})$this->_postErrors[]="<div class=\"alert error">".$this->l('You must set the "Unit Price" field')."</div>";${${"GLOBALS"}["tihdgdt"]}=floatval(Tools::getValue("pcredit_cid"));if(!${${"GLOBALS"}["tihdgdt"]})$this->_postErrors[]="<div class=\"alert error">".$this->l('You must select the "Credit Product Category" field')."</div>";if(!sizeof($this->_postErrors)){Configuration::updateGlobalValue("AGILE_PCREDIT_UNITPRICE",${${"GLOBALS"}["opnwrbnrmjd"]});Configuration::updateGlobalValue("AGILE_PCREDIT_UNITCURRENCY",intval(Tools::getValue("unitcurrency")));Configuration::updateGlobalValue("AGILE_PCREDIT_CID",${${"GLOBALS"}["tihdgdt"]});$gdmsmkynymn="group_rewards";Configuration::updateGlobalValue("PS_BLOCK_CART_AJAX",0);Configuration::updateGlobalValue("AGILE_PCREDIT_POSITION",intval(Tools::getValue("prepaidcredit_pos")));Configuration::updateGlobalValue("AGILE_PCREDIT_REPURCHASE",intval(Tools::getValue("repurchase")));Configuration::updateGlobalValue("AGILE_PCREDIT_PAY_MODE",intval(Tools::getValue("pay_mode")));Configuration::updateGlobalValue("AGILE_PCREDIT_SUMMARY_POS",intval(Tools::getValue("summary_pos")));Configuration::updateGlobalValue("AGILE_PCREDIT_HIDE_TOKENINFO",intval(Tools::getValue("hide_tokeninfo")));${"GLOBALS"}["ibduuk"]="group_rewards";${$gdmsmkynymn}=GroupReward::get_group_rewards($cookie->id_lang);foreach(${${"GLOBALS"}["ibduuk"]} AS${${"GLOBALS"}["tvdgafgmrd"]}){$txpgpxuvlbk="group_reward";$emwbawdii="id_group_reward";${${"GLOBALS"}["wiucbnndkjnv"]}=(int)${$txpgpxuvlbk}["id_group_reward"];${${"GLOBALS"}["sytnvowmuby"]}=new GroupReward(${$emwbawdii});$objreward->id_group=(int)${${"GLOBALS"}["tvdgafgmrd"]}["id_group"];$objreward->reward_rate=(float)Tools::getValue("reward_rate_".$objreward->id_group);$objreward->exclude_pids=Tools::getValue("exclude_pids_".$objreward->id_group);$objreward->save();}$this->saveBlockSettings();$this->displayConf();}else$this->displayErrors();}$this->displayForm();return$this->_html;}public function displayConf(){$this->_html.=$this->displayConfirmation($this->l('Settings updated'));}public function displayForm(){${"GLOBALS"}["mfbqcqjxho"]="category_nbr";${"GLOBALS"}["kumtqiqrncf"]="content";$pyiuzozqpwf="mapping";global$cookie;${"GLOBALS"}["uhsdmysqsneu"]="currencies";${"GLOBALS"}["tvslyyd"]="fields_form";$hpveryobvul="Token_fields_form";${${"GLOBALS"}["mfbqcqjxho"]}=(int)Db::getInstance()->getValue("SELECT COUNT(*) AS cnt FROM "._DB_PREFIX_."category");${"GLOBALS"}["qxrkzrdbubl"]="block";${"GLOBALS"}["eijsekctuonm"]="helper";if(${${"GLOBALS"}["mhipca"]}<1000){${${"GLOBALS"}["pehvik"]}=Category::getCategories($cookie->id_lang,true,false);$nfscwpj="categories";$gmmcks="categories";${$gmmcks}=AgileHelper::getSortedFullnameCategory(${$nfscwpj});}else{${${"GLOBALS"}["wmoworrcph"]}=new Category(2);$ynupfkifhkt="categories";${$ynupfkifhkt}=$cate->getSubCategories($cookie->id_lang,false);}${${"GLOBALS"}["uhsdmysqsneu"]}=Currency::getCurrencies(false,false);${${"GLOBALS"}["unstwrb"]}="<table class=\"table-responsive table">";$zyeevlpds="group_content";${${"GLOBALS"}["paoqdtcbd"]}=self::getBlockSettings();foreach($this->getInfoBlocks()AS${${"GLOBALS"}["qxrkzrdbubl"]}=>${$pyiuzozqpwf}){${"GLOBALS"}["hhcctldoylz"]="mapping";${"GLOBALS"}["blfewrlz"]="block";$lqwtvdqcdzx="block";${"GLOBALS"}["rvmgekeyyy"]="settings";${"GLOBALS"}["vpicwouhvjl"]="block";$wbewkm="block";${${"GLOBALS"}["unstwrb"]}.="<tr><td>".${${"GLOBALS"}["hhcctldoylz"]}."</td>
                <td><input type=\"radio" name=\"visibility_".${$lqwtvdqcdzx}."\" value="0" ".(${${"GLOBALS"}["paoqdtcbd"]}[${$wbewkm}]==0?"checked":"")." />".$this->l('Always hidden')."</td>
                <td><input type="radio\" name=\"visibility_".${${"GLOBALS"}["blfewrlz"]}."\" value=\"1" ".(${${"GLOBALS"}["paoqdtcbd"]}[${${"GLOBALS"}["xlnxtmaus"]}]==1?"checked":"")." />".$this->l('Always visible')."</td>
                <td><input type="radio\" name="visibility_".${${"GLOBALS"}["xlnxtmaus"]}."" value="2\" ".(${${"GLOBALS"}["rvmgekeyyy"]}[${${"GLOBALS"}["vpicwouhvjl"]}]==2?"checked":"")." />".$this->l('Visible after paid')."</td>
                </tr>";}${${"GLOBALS"}["kumtqiqrncf"]}.="</table>";${${"GLOBALS"}["noapmaq"]}=GroupReward::get_group_rewards($cookie->id_lang);${"GLOBALS"}["rbqkdqiemypv"]="group_content";${$zyeevlpds}="<table  class="table-responsive table\"><tr><th>".$this->l('Group')."</th><th>".$this->l('Reward Rate(%)')."</th><th>".$this->l('Products exclude from rewards(comma separated ID list, e.g. 12,34)')."</th></tr>";foreach(${${"GLOBALS"}["noapmaq"]} as${${"GLOBALS"}["tvdgafgmrd"]}){${"GLOBALS"}["jicibyc"]="group_content";${"GLOBALS"}["fimhkkuuhud"]="group_reward";${"GLOBALS"}["entwdcpt"]="group_reward";${${"GLOBALS"}["jicibyc"]}.="<tr>
				<td>".${${"GLOBALS"}["entwdcpt"]}["name"]."</td>
				<td><input type=\"text" name="reward_rate_".${${"GLOBALS"}["tvdgafgmrd"]}["id_group"]."" value=\"".${${"GLOBALS"}["tvdgafgmrd"]}["reward_rate"]."\"></td>
				<td><textarea rows=1 cols=60 name="exclude_pids_".${${"GLOBALS"}["tvdgafgmrd"]}["id_group"]."\">".${${"GLOBALS"}["fimhkkuuhud"]}["exclude_pids"]."</textarea></td>
				</tr>";}${${"GLOBALS"}["rbqkdqiemypv"]}.="</table>";${${"GLOBALS"}["ffawofxy"]}=array("form"=>array("legend"=>array("title"=>$this->l('Field Settings'),"image"=>$this->_path."logo.gif",),"input"=>array("type"=>"html","html_content"=>${${"GLOBALS"}["unstwrb"]}),));${${"GLOBALS"}["dprkmivxq"]}=array("form"=>array("legend"=>array("title"=>$this->l('Token Settings'),"image"=>$this->_path."logo.gif",),"description"=>$this->l('1. Please make sure you have applied the required changes to the applicable files according to the instructions described in the installation guide install_en.txt (found in ZIP file).')."<br />".$this->l('2. A new order status ')." [<font color="blue">".self::WAITING_STATE_NAME."</font>] ".$this->l('has been created for this module, please DO NOT delete this order status')."<br />".$this->l('3. You need create a new category for tokens package products that you will sell to customers')."<br />"."&nbsp;&nbsp;&nbsp;&nbsp;".$this->l('If you have more than 1000 category, please create that category under your Root category')."<br />".$this->l('4. For PrestaShop original mutishop, you have to define token value based on the same currency. And the Tokens category must be sahred for all shops that uses this module'),"input"=>array(array("type"=>"text","label"=>$this->l('Linked order status'),"name"=>"linkstatename","size"=>80,"readonly"=>"readonly"),array("type"=>"radio","label"=>$this->l('Product Repurchase'),"name"=>"repurchase","desc"=>$this->l('Allow to purchase the same product multiple times'),"values"=>array(array("id"=>"allow_yes","value"=>1,"label"=>$this->l('Yes')),array("id"=>"allow_no","value"=>0,"label"=>$this->l('No'),),),),array("type"=>"radio","label"=>$this->l('Checkout Mode'),"name"=>"pay_mode","values"=>array(array("id"=>"oneclick","value"=>self::PAY_MODE_ONECLICK,"label"=>$this->l('One click checkout'),"p"=>$this->l('If user has enough tokens to purchase selected products, then checkout immediately and pay by tokens.')."<br />".$this->l('Otherwise the user will be redirected to the Token category to purcahse tokens/credits.')),array("id"=>"normal","value"=>self::PAY_MODE_NORMAL,"label"=>$this->l('Normal checkout'),"p"=>$this->l('User always adds products to shopping cart, user can pay with combination of tokens and other payment methods at normal checkout.')),array("id"=>"combinatioon","value"=>self::PAY_MODE_COMBINATION,"label"=>$this->l('Combination'),"p"=>$this->l('If user has enough tokens to purchase selected products, then checkout immediately and pay by tokens.')."<br />".$this->l('Otherwise the user will be able to do a normal checkout with a combination of tokens and other payment methods.')),),"desc"=>"<span style=\"color:red">".$this->l('Note: Shopping Cart block module Ajax mode will be disbaled if you coose Pay Mode at "Onc Click Checkout" or "Combination"')."</span>"),array("type"=>"agile_text_select","label"=>$this->l('Token Unit Price'),"name"=>"unitprice","size"=>3,"desc"=>array(Shop::isFeatureActive()?"<span style=\"color:red;\">".$this->l('Please choose a currency that used in all shops.')."</span><br />":"".$this->l('If you change this currency, the value of tokens already purchased will be based on this setting.')),"select_name"=>"unitcurrency","options"=>array("query"=>${${"GLOBALS"}["hrcromck"]},"id"=>"id_currency","name"=>"name"),),array("type"=>"select","label"=>$this->l('Credit Product Category'),"name"=>"pcredit_cid","options"=>array("query"=>${${"GLOBALS"}["pehvik"]},"id"=>"id_category","name"=>"name"),"desc"=>array($this->l('Please select the category which contains all products for credits.'))),array("type"=>"radio","label"=>$this->l('Token Package Block'),"name"=>"prepaidcredit_pos","values"=>array(array("id"=>"noDisplay","value"=>0,"label"=>$this->l('Do Not Display'),),array("id"=>"onLeft","value"=>1,"label"=>$this->l('On Left Column'),),array("id"=>"onRight","value"=>2,"label"=>$this->l('On Right Column'),),),"desc"=>$this->l('You can adjust the position through the "Modules"->"Positions" option.')),array("type"=>"radio","label"=>$this->l('Token summary location'),"name"=>"summary_pos","values"=>array(array("id"=>"summary_noDisplay","value"=>0,"label"=>$this->l('Page Top'),),array("id"=>"summary_onLeft","value"=>1,"label"=>$this->l('On Left Column'),),array("id"=>"summary_onRight","value"=>2,"label"=>$this->l('On Right Column'),),),"desc"=>$this->l('You can adjust the position through the "Modules"->"Positions" option.')),array("type"=>"radio","label"=>$this->l('Hide token info'),"name"=>"hide_tokeninfo","values"=>array(array("id"=>"hide_yes","value"=>1,"label"=>$this->l('Yes'),),array("id"=>"hide_no","value"=>0,"label"=>$this->l('No'),),),"desc"=>$this->l('Hide token informaiton on product page')),array("type"=>"html","label"=>$this->l('Group Rewards'),"name"=>"group_reward","html_content"=>${${"GLOBALS"}["wnaspofn"]},"desc"=>array($this->l('You can give reward credit to customers based on the purchase of amount.'),$this->l('The % reward is based on total of product price after applicable discount(price rules, but not cart rules), does not include tax.'))),array("type"=>"innerpanel","label"=>$this->l('Field Visibility'),"name"=>"field_settings","values"=>${${"GLOBALS"}["tvslyyd"]}),),"submit"=>array("name"=>"submitSetting","title"=>$this->l('Save'))));${${"GLOBALS"}["eijsekctuonm"]}=new HelperForm();$helper->show_toolbar=false;$helper->table=$this->table;${${"GLOBALS"}["psdgkujd"]}=new Language((int)Configuration::get("PS_LANG_DEFAULT"));$helper->default_form_language=$lang->id;$helper->allow_employee_form_lang=Configuration::get("PS_BO_ALLOW_EMPLOYEE_FORM_LANG")?Configuration::get("PS_BO_ALLOW_EMPLOYEE_FORM_LANG"):0;$this->fields_form=array();$helper->identifier=$this->identifier;$helper->submit_action="submitSetting";$helper->fields_value=$this->getConfigFieldsValues();$helper->currentIndex=$this->context->link->getAdminLink("AdminModules",false)."&configure=".$this->name."&tab_module=".$this->tab."&module_name=".$this->name;$helper->token=Tools::getAdminTokenLite("AdminModules");$helper->languages=$this->context->controller->getLanguages();$helper->default_form_language=(int)$this->context->language->id;$helper->module=$this;$this->_html.=$helper->generateForm(array(${$hpveryobvul}));}public function getConfigFieldsValues(){${"GLOBALS"}["bidnfcdjtcnl"]="conf";$zvpipwflfsot="conf";$ktyrftauxlx="conf";global$cookie;$ftcicbtru="conf";$wpstntzl="conf";${${"GLOBALS"}["yyuzyjnqn"]}=array("AGILE_PCREDIT_REPURCHASE","AGILE_PCREDIT_PAY_MODE","AGILE_PCREDIT_UNITPRICE","AGILE_PCREDIT_UNITCURRENCY","AGILE_PCREDIT_CID","AGILE_PCREDIT_POSITION","AGILE_PCREDIT_SUMMARY_POS","AGILE_PCREDIT_HIDE_TOKENINFO");${"GLOBALS"}["rfmtvuyxgq"]="conf";${"GLOBALS"}["qfiohmvyvhqu"]="conf";$uiekdkjl="conf_keys";${${"GLOBALS"}["mewfmuns"]}=Configuration::getMultiple(${$uiekdkjl});${"GLOBALS"}["fgmdrjg"]="linkedstate";$triwerrvn="conf";${${"GLOBALS"}["fgmdrjg"]}=new OrderState(intval(Configuration::getGlobalValue("AGILE_PCREDIT_WAITING_STATE")),intval($cookie->id_lang));$luwfrh="conf";$trgkwrnplej="conf";return array("linkstatename"=>Tools::getValue("linkstatename",$linkedstate->name),"repurchase"=>Tools::getValue("repurchase",array_key_exists("AGILE_PCREDIT_REPURCHASE",${${"GLOBALS"}["mewfmuns"]})?${${"GLOBALS"}["rfmtvuyxgq"]}["AGILE_PCREDIT_REPURCHASE"]:""),"pay_mode"=>Tools::getValue("pay_mode",array_key_exists("AGILE_PCREDIT_PAY_MODE",${${"GLOBALS"}["mewfmuns"]})?${$wpstntzl}["AGILE_PCREDIT_PAY_MODE"]:""),"unitprice"=>floatval(Tools::getValue("unitprice",array_key_exists("AGILE_PCREDIT_UNITPRICE",${$ktyrftauxlx})?${$ftcicbtru}["AGILE_PCREDIT_UNITPRICE"]:"")),"unitcurrency"=>intval(Tools::getValue("unitcurrency",array_key_exists("AGILE_PCREDIT_UNITCURRENCY",${${"GLOBALS"}["mewfmuns"]})?${${"GLOBALS"}["mewfmuns"]}["AGILE_PCREDIT_UNITCURRENCY"]:"")),"pcredit_cid"=>intval(Tools::getValue("pcredit_cid",array_key_exists("AGILE_PCREDIT_CID",${$triwerrvn})?${$zvpipwflfsot}["AGILE_PCREDIT_CID"]:"")),"prepaidcredit_pos"=>intval(Tools::getValue("prepaidcredit_pos",array_key_exists("AGILE_PCREDIT_POSITION",${${"GLOBALS"}["mewfmuns"]})?${${"GLOBALS"}["qfiohmvyvhqu"]}["AGILE_PCREDIT_POSITION"]:"")),"summary_pos"=>intval(Tools::getValue("summary_pos",array_key_exists("AGILE_PCREDIT_SUMMARY_POS",${$luwfrh})?${${"GLOBALS"}["mewfmuns"]}["AGILE_PCREDIT_SUMMARY_POS"]:"")),"hide_tokeninfo"=>intval(Tools::getValue("hide_tokeninfo",array_key_exists("AGILE_PCREDIT_HIDE_TOKENINFO",${$trgkwrnplej})?${${"GLOBALS"}["bidnfcdjtcnl"]}["AGILE_PCREDIT_HIDE_TOKENINFO"]:"")),);}public function displayErrors(){${"GLOBALS"}["qgokljtgd"]="nbErrors";${"GLOBALS"}["stxedyxh"]="nbErrors";$dowksxmn="nbErrors";${${"GLOBALS"}["qpnztlyok"]}=sizeof($this->_postErrors);$ifyhsyi="error";$this->_html.="
		<div class=\"alert alert-danger\">
			<h3>".(${${"GLOBALS"}["qgokljtgd"]}>1?$this->l('There are'):$this->l('There is'))." ".${$dowksxmn}." ".(${${"GLOBALS"}["stxedyxh"]}>1?$this->l('errors'):$this->l('error'))."</h3>
			<ol>";foreach($this->_postErrors AS${$ifyhsyi})$this->_html.="<li>".${${"GLOBALS"}["jsoosoid"]}."</li>";$this->_html.="
			</ol>
		</div>";}public function hookDisplayMyAccountBlock($params){$mmssxlojbaq="params";return$this->hookDisplayCustomerAccount(${$mmssxlojbaq});}public function hookDisplayMyAccountBlockFooter($params){$jseqaqeru="params";return$this->hookDisplayCustomerAccount(${$jseqaqeru});}public function hookDisplayCustomerAccount($params){global$smarty;if(!$this->active)return;require_once(dirname(__FILE__)."/RandomPin.php");${${"GLOBALS"}["qvelulmzfhr"]}=Context::getContext()->link->getModuleLink("agileprepaidcredit","mycredit",array(),true);$smarty->assign(array("mycredit_url"=>${${"GLOBALS"}["qvelulmzfhr"]}));return$this->display(__FILE__,"views/templates/hook/myaccount.tpl");}function hookDisplayShoppingCartFooter($params){$this->prepareToekenApplyFormData(false);${${"GLOBALS"}["tjirhrgip"]}=$this->display(__FILE__,"views/templates/hook/usecreditform.tpl");return${${"GLOBALS"}["tjirhrgip"]}.$this->display(__FILE__,"views/templates/hook/shoppingcart.tpl");}private function prepareToekenApplyFormData($isatpaymentpage=false){${"GLOBALS"}["hsqzqkuk"]="apc_processcredit_url";global$cart,$cookie,$smarty;${"GLOBALS"}["sgpvhjg"]="reward_value";${"GLOBALS"}["leqdtwbmzok"]="apcCreditBalance";${"GLOBALS"}["svyygwbzglf"]="apcOrderTotal";${"GLOBALS"}["bzffaypvidi"]="is_tokens_only";${${"GLOBALS"}["mncddowfg"]}=$cart->getProducts();${"GLOBALS"}["nxbcgyuhrz"]="cart";$rrktwvijn="apcCreditBalance";${${"GLOBALS"}["bzffaypvidi"]}=true;foreach(${${"GLOBALS"}["mncddowfg"]} AS${${"GLOBALS"}["uirohyurf"]}){${"GLOBALS"}["wpkovfa"]="prod";if(!self::IsProductInLinkedCategory(${${"GLOBALS"}["wpkovfa"]}["id_product"])){$yhkxdkttkdx="is_tokens_only";${$yhkxdkttkdx}=false;break;}}if(${${"GLOBALS"}["sryhbklyx"]})return false;${${"GLOBALS"}["jelfycmsyvn"]}=$cart->getOrderTotal();${"GLOBALS"}["jshwgggookft"]="default_use_credit";${"GLOBALS"}["kqxjghbfpw"]="apcOrderTotal_tokens";$kqvqlsysrmb="apcOrderTotal_tokens";${"GLOBALS"}["nbcmjhn"]="apcCreditBalance";$kredwilypkc="isatpaymentpage";$ijzjdswihx="reward_tokens";${${"GLOBALS"}["kqxjghbfpw"]}=AgilePrepaidCredit::ConvertPrice2Tokens($cart->id_currency,${${"GLOBALS"}["svyygwbzglf"]});${$rrktwvijn}=self::GetTokenBalance($cookie->id_customer);${${"GLOBALS"}["jshwgggookft"]}=min(${${"GLOBALS"}["nbcmjhn"]},${$kqvqlsysrmb}+self::tokens_used_in_cart($cart->id));${${"GLOBALS"}["hsqzqkuk"]}=Context::getContext()->link->getModuleLink("agileprepaidcredit","processcredit",array(),true);include_once(_PS_ROOT_DIR_."/modules/agileprepaidcredit/GroupReward.php");${${"GLOBALS"}["sgpvhjg"]}=GroupReward::getCartRewardableValue(${${"GLOBALS"}["nxbcgyuhrz"]});${$ijzjdswihx}=AgilePrepaidCredit::ConvertPrice2Tokens($cart->id_currency,${${"GLOBALS"}["ttrikuxlbjp"]});$smarty->assign(array("apcOrderTotal"=>${${"GLOBALS"}["jelfycmsyvn"]},"apcCreditBalance"=>${${"GLOBALS"}["leqdtwbmzok"]},"default_use_credit"=>${${"GLOBALS"}["vgysqitht"]},"apc_processcredit_url"=>${${"GLOBALS"}["rcixsxhjory"]},"reward_value"=>Tools::displayPrice(${${"GLOBALS"}["ttrikuxlbjp"]}),"reward_tokens"=>${${"GLOBALS"}["xjoivrmt"]},"isatpaymentpage"=>(${$kredwilypkc}?1:0)));}public function get_discounts_override_label($total_discounts,$tokens_in_cart){$frvkvedmusg="total_vouchers";${"GLOBALS"}["lgopqjcij"]="tokens_in_cart";${"GLOBALS"}["hzatetpk"]="tokens_in_cart";$kpxgeocushb="label";${"GLOBALS"}["tfxhqbjre"]="total_vouchers";$ldlqrqv="label";$rlvvhlvuiyxt="label";$lmaofdoiigv="tokens_in_cart";$sjvtmjdyc="tokens_in_cart";$egeuoejvdx="total_discounts";${$frvkvedmusg}=${$egeuoejvdx}-${${"GLOBALS"}["ueouwmnpmi"]};if(${${"GLOBALS"}["utnksyc"]}<=0 AND${${"GLOBALS"}["hzatetpk"]}<=0)return$this->l('Total Vouchers');if(${${"GLOBALS"}["tfxhqbjre"]}>0 AND${${"GLOBALS"}["lgopqjcij"]}<=0)return$this->l('Total Vouchers');if(${${"GLOBALS"}["utnksyc"]}<=0 AND${$sjvtmjdyc}>0)return$this->l('Total Credits');${$rlvvhlvuiyxt}=$this->l('Total Voucher and Credits');${$ldlqrqv}.=" - ".$this->l('Voucher:').Tools::displayPrice(${${"GLOBALS"}["utnksyc"]})."&nbsp;&nbsp;&nbsp;".$this->l('Credits:').Tools::displayPrice(${$lmaofdoiigv});return${$kpxgeocushb};}function hookActionValidateOrder($params){${"GLOBALS"}["clpubxdb"]="params";${"GLOBALS"}["nxuecfegi"]="params";if(!$this->active)return;${"GLOBALS"}["bhlxxvcohlu"]="params";if(!isset(${${"GLOBALS"}["clpubxdb"]}["order"]))return;$cxzgshoipuvu="params";$qoxfkbdcir="params";$this->processTokenPurchaseOrOneClickCheckoutTokens(${${"GLOBALS"}["bhlxxvcohlu"]}["order"]->id,${${"GLOBALS"}["nxuecfegi"]}["orderStatus"]);$this->processTokensUsageInNormalCheckout(${${"GLOBALS"}["blmeqtyti"]}["order"]->id);$this->procesTokenRewards(${$qoxfkbdcir}["order"]->id,${$cxzgshoipuvu}["orderStatus"]);}function hookActionOrderStatusPostUpdate($params){${"GLOBALS"}["pnsfunbdy"]="params";if(!$this->active)return;return$this->hookActionOrderStatusUpdate(${${"GLOBALS"}["pnsfunbdy"]});}function hookActionOrderStatusUpdate($params){${"GLOBALS"}["ahbmwkwjbovr"]="params";$xeskvhgrg="params";if(!$this->active)return"";$fmhrfvm="params";$this->processTokenPurchaseOrOneClickCheckoutTokens(${$xeskvhgrg}["id_order"],${$fmhrfvm}["newOrderStatus"]);$this->procesTokenRewards(${${"GLOBALS"}["blmeqtyti"]}["id_order"],${${"GLOBALS"}["blmeqtyti"]}["newOrderStatus"]);$this->processOrderCancellation(${${"GLOBALS"}["ahbmwkwjbovr"]}["id_order"],${${"GLOBALS"}["blmeqtyti"]}["newOrderStatus"]);return"";}function processOrderCancellation($id_order,$orderStatus){$pcxvoefud="id_order";${"GLOBALS"}["rmpeyy"]="rows";$lcertzvijm="sql";${"GLOBALS"}["orzwjyoex"]="exists";$javxigjaolxt="id_order";if(!isset(${${"GLOBALS"}["iiklmgjvq"]}))return;if(!intval(${$pcxvoefud}))return;${"GLOBALS"}["mmuedpqeuhhc"]="sql";if($orderStatus->id!=_PS_OS_CANCELED_ AND$orderStatus->id!=_PS_OS_REFUND_)return;${$lcertzvijm}="SELECT id_order FROM `"._DB_PREFIX_."customer_credit` WHERE id_order=".${$javxigjaolxt}." AND id_reason IN (".AgilePrepaidCredit::CREDIT_REASON_ORDER_CANCELLATION.")";${${"GLOBALS"}["phhxheyictp"]}=Db::getInstance()->getValue(${${"GLOBALS"}["mmuedpqeuhhc"]});${"GLOBALS"}["ywovlhy"]="rows";${"GLOBALS"}["vhtzxq"]="rows";if(${${"GLOBALS"}["orzwjyoex"]}>0)return;${${"GLOBALS"}["nytvzvadm"]}="SELECT id_customer_credit FROM  `"._DB_PREFIX_."customer_credit` WHERE id_order=".${${"GLOBALS"}["mjctzd"]};${${"GLOBALS"}["rmpeyy"]}=Db::getInstance()->ExecuteS(${${"GLOBALS"}["nytvzvadm"]});if(empty(${${"GLOBALS"}["vhtzxq"]}))return;foreach(${${"GLOBALS"}["ywovlhy"]} as${${"GLOBALS"}["vxbrompklq"]}){$saddcbsqjlu="cc";$gkzqtgwf="cc";${$gkzqtgwf}=new CustomerCredit((int)${${"GLOBALS"}["vxbrompklq"]}["id_customer_credit"]);if(!Validate::isLoadedObject(${$saddcbsqjlu}))continue;$cc->id=0;$cc->id_reason=AgilePrepaidCredit::CREDIT_REASON_ORDER_CANCELLATION;$cc->units=-$cc->units;$cc->memo=$this->l('Order Cancellation');$cc->save();}}public function hookDisplayTop($params){global$cart;self::set_token_payment_processing_marker($cart->id,false);if(intval(Configuration::getGlobalValue("AGILE_PCREDIT_SUMMARY_POS"))==0){return$this->hookAgiletokensummary(${${"GLOBALS"}["blmeqtyti"]});}return;}public function hookAgiletokensummary($params){global$cookie,$smarty;if(!$this->active)return;if(intval(Configuration::getGlobalValue("AGILE_PCREDIT_PAY_MODE"))==self::PAY_MODE_NORMAL){Configuration::updateValue("PS_BLOCK_CART_AJAX",1);}else{Configuration::updateValue("PS_BLOCK_CART_AJAX",0);}$smarty->assign(array("balance"=>self::GetTokenBalance($cookie->id_customer),"is_apc_installed"=>"1","apc_module_folder"=>_PS_ROOT_DIR_."/modules/agileprepaidcredit"));return$this->display(__FILE__,"views/templates/hook/top.tpl");}public function hookDisplayRightColumnProduct($params){global$cookie,$smarty;$qgeddii="id_product";if(!$this->active)return;${$qgeddii}=(int)Tools::getValue("id_product");return$this->getHookExtraRight(${${"GLOBALS"}["qybkvwomin"]},1);}public function getHookExtraRight($id_product,$showstate){$gkirwhmj="id_product";$qsyjjxgs="price_token";$bpeqmlud="product_taxrate";${"GLOBALS"}["cydgfdol"]="unitprice";${"GLOBALS"}["xpbdywnfocqt"]="id_product";$qwkrufv="reward_rate";$tnesfdqexik="repurchase";${"GLOBALS"}["ggjbqse"]="unitprice";${"GLOBALS"}["jfdava"]="id_product";${"GLOBALS"}["bqprhmiy"]="istoken";$gjixdpwxqll="price_display";${"GLOBALS"}["xhsrcysj"]="currency";${"GLOBALS"}["etyccmmlpqs"]="ispaid";global$cookie,$smarty;$ushxhouqp="unitprice";$fhbjbmekrro="tax_display";${"GLOBALS"}["yujlizhhrr"]="istoken";if(${$gkirwhmj}<=0)return;$cdcpxtden="reward_tokens";${${"GLOBALS"}["xhsrcysj"]}=new Currency($cookie->id_currency);$wqjbdeccy="istoken";${"GLOBALS"}["utyuxdthiu"]="ispaid";${"GLOBALS"}["opfxcshwr"]="tokenunit_value_in_customer_currency";$hsxqouzmf="id_product";$hqzxheug="reward_tokens";${$gjixdpwxqll}=Product::getTaxCalculationMethod($cookie->id_customer);${"GLOBALS"}["fvnhpqsg"]="id_product";${${"GLOBALS"}["ixxeushy"]}=Tools::ps_round(Product::getPriceStatic(${${"GLOBALS"}["xpbdywnfocqt"]},(${${"GLOBALS"}["itpndpm"]}!=PS_TAX_EXC),NULL,6,NULL,false,true,1,false,$cookie->id_customer),2);${"GLOBALS"}["oqshsrwbmx"]="reward_rate";$zngpyufnbxs="repurchase";${$qsyjjxgs}=Product::getPriceStatic(${$hsxqouzmf},false,NULL,6,NULL,false,false,true,$cookie->id_customer);${${"GLOBALS"}["ggjbqse"]}=floatval(Configuration::getGlobalValue("AGILE_PCREDIT_UNITPRICE"));if(${$ushxhouqp}==0)${${"GLOBALS"}["cydgfdol"]}=1;$bldsdghxwf="unitprice";${${"GLOBALS"}["yujlizhhrr"]}=self::IsProductInLinkedCategory(${${"GLOBALS"}["jfdava"]});${${"GLOBALS"}["sodjyfngq"]}=AgilePrepaidCredit::get_unitcurrency();${${"GLOBALS"}["opfxcshwr"]}=${$bldsdghxwf}/($unitcurrency->conversion_rate/$currency->conversion_rate);${${"GLOBALS"}["jixrmbwijv"]}=Tools::ps_round((${${"GLOBALS"}["bqprhmiy"]}?${${"GLOBALS"}["rrcobwjses"]}:${${"GLOBALS"}["ixxeushy"]})/${${"GLOBALS"}["pqljgjodzqz"]},2);${${"GLOBALS"}["etyccmmlpqs"]}=self::IsProductPaidByCustomer(${${"GLOBALS"}["qybkvwomin"]},$cookie->id_customer);${$zngpyufnbxs}=intval(Configuration::getGlobalValue("AGILE_PCREDIT_REPURCHASE"));require_once(_PS_ROOT_DIR_."/modules/agileprepaidcredit/GroupReward.php");${"GLOBALS"}["msroidq"]="id_product";$fupwgmsurn="attributes_combinations";${"GLOBALS"}["rvqfyofnjnt"]="product_taxrate";${${"GLOBALS"}["uwukbrbchdl"]}=GroupReward::getProductRewardableRate(${${"GLOBALS"}["qybkvwomin"]},0);${${"GLOBALS"}["gvjfmdgekt"]}=Tools::ps_round(Product::getPriceStatic(${${"GLOBALS"}["fvnhpqsg"]},false,null,6,null,false,true,1),2);${${"GLOBALS"}["ttrikuxlbjp"]}=${${"GLOBALS"}["gvjfmdgekt"]}*(float)${${"GLOBALS"}["oqshsrwbmx"]}/100;${$bpeqmlud}=0;${"GLOBALS"}["xrbjpkyiv"]="reward_value";${${"GLOBALS"}["hipvxkj"]}=Group::getPriceDisplayMethod(Group::getCurrent()->id);if(${$fhbjbmekrro}==PS_TAX_INC AND!Tax::excludeTaxeOption()){$bddejxegf="id_product";$iqeyogom="product_taxrate";${$iqeyogom}=Tax::getProductTaxRate(${$bddejxegf});}${$hqzxheug}=AgilePrepaidCredit::ConvertPrice2Tokens($cookie->id_currency,${${"GLOBALS"}["xrbjpkyiv"]});${$fupwgmsurn}=Product::getAttributesInformationsByProduct(${${"GLOBALS"}["msroidq"]});$smarty->assign(array("tokens"=>${${"GLOBALS"}["jixrmbwijv"]},"repurchase"=>${$tnesfdqexik},"istoken"=>${$wqjbdeccy},"ispaid"=>${${"GLOBALS"}["utyuxdthiu"]},"showstate"=>intval(${${"GLOBALS"}["tucisd"]}),"hide_tokeninfo"=>intval(Configuration::getGlobalValue("AGILE_PCREDIT_HIDE_TOKENINFO")),"product_taxrate"=>${${"GLOBALS"}["rvqfyofnjnt"]},"tokenunit_value_in_customer_currency"=>${${"GLOBALS"}["pqljgjodzqz"]},"reward_rate"=>${$qwkrufv},"reward_tokens"=>${$cdcpxtden},"has_combinations"=>((is_array(${${"GLOBALS"}["minpbznbs"]})&&count(${${"GLOBALS"}["minpbznbs"]}))?1:0)));return$this->display(__FILE__,"views/templates/hook/extra_right.tpl");}public function hookDisplayLeftColumn($params){${"GLOBALS"}["itmyxiikp"]="hooks";if(!$this->active)return;${${"GLOBALS"}["itmyxiikp"]}="";if(intval(Configuration::getGlobalValue("AGILE_PCREDIT_SUMMARY_POS"))==1){${"GLOBALS"}["lbglfgitev"]="hooks";${${"GLOBALS"}["lbglfgitev"]}.=$this->hookAgiletokensummary(${${"GLOBALS"}["blmeqtyti"]});}if(intval(Configuration::getGlobalValue("AGILE_PCREDIT_POSITION"))==1){${${"GLOBALS"}["cqevctpn"]}.=$this->hookLeftOrRight();}return${${"GLOBALS"}["cqevctpn"]};}public function hookDisplayRightColumn($params){$zvoqqsmogz="hooks";if(!$this->active)return;${$zvoqqsmogz}="";if(intval(Configuration::getGlobalValue("AGILE_PCREDIT_SUMMARY_POS"))==2){${${"GLOBALS"}["cqevctpn"]}.=$this->hookAgiletokensummary(${${"GLOBALS"}["blmeqtyti"]});}if(intval(Configuration::getGlobalValue("AGILE_PCREDIT_POSITION"))==2){${"GLOBALS"}["kgasnmqq"]="hooks";${${"GLOBALS"}["kgasnmqq"]}.=$this->hookLeftOrRight();}${"GLOBALS"}["hxdfmgfqpu"]="hooks";return${${"GLOBALS"}["hxdfmgfqpu"]};}public function hookDisplayFooter($params){$oexpgcs="pageName";${"GLOBALS"}["ylhnkrw"]="cfmmsg";$rurejshbp="apc_atproductpage";${"GLOBALS"}["xkrcjkbaw"]="ispaid";${"GLOBALS"}["mcxsqevm"]="ispaid";${"GLOBALS"}["dkkjcsn"]="blocksettings";global$smarty,$cookie,$cart;$lofuxv="apc_atcartsummary";if(!$this->active)return;${${"GLOBALS"}["eirkmjikcdjm"]}=0;$utlkgffdw="blocksettings";$cimhuvgmjdg="pageName";${$lofuxv}=0;${"GLOBALS"}["pjopicr"]="pageName";${$cimhuvgmjdg}="";if(isset($_GET["controller"])){$tuluvg="pageName";${"GLOBALS"}["woxtcxbt"]="contr";${${"GLOBALS"}["jsinll"]}=Tools::getValue("controller");${$tuluvg}=strtolower(${${"GLOBALS"}["woxtcxbt"]});}${"GLOBALS"}["umucpqvedfc"]="blocksettings";$pgcpxuymdsee="pay_mode";$mcrjgql="cfmmsg";if(${${"GLOBALS"}["xxkktp"]}=="product")${$rurejshbp}=1;${"GLOBALS"}["bhvjylgwke"]="ispaid";if(${${"GLOBALS"}["pjopicr"]}=="order"||${$oexpgcs}=="orderopc"||${${"GLOBALS"}["xxkktp"]}=="order-opc")${${"GLOBALS"}["adtynxk"]}=1;${${"GLOBALS"}["cbwjbh"]}=self::IsProductPaidByCustomer(intval(Tools::getValue("id_product")),$cookie->id_customer);${${"GLOBALS"}["bvuswe"]}=intval(Configuration::getGlobalValue("AGILE_PCREDIT_REPURCHASE"));${${"GLOBALS"}["yuhaly"]}=$this->getBlockSettings();${${"GLOBALS"}["kcfqoy"]}=intval(Configuration::getGlobalValue("AGILE_PCREDIT_PAY_MODE"));${"GLOBALS"}["hilxlnqh"]="ispaid";${${"GLOBALS"}["ylhnkrw"]}="";${"GLOBALS"}["egpxtgeqmks"]="ispaid";${$pgcpxuymdsee}=intval(Configuration::getGlobalValue("AGILE_PCREDIT_PAY_MODE"));switch(${${"GLOBALS"}["kcfqoy"]}){case AgilePrepaidCredit::PAY_MODE_NORMAL:break;case AgilePrepaidCredit::PAY_MODE_ONECLICK:${${"GLOBALS"}["pfzyggsmycc"]}=$this->l('Required tokens will be deducted from you account. If you do not have enough tokens, you will be redirected to the tokens category to purchase additional tokens. Are you sure want to proceed to purchase the products?');break;case AgilePrepaidCredit::PAY_MODE_COMBINATION:${$mcrjgql}=$this->l('Required tokens will be deducted from your account. If you do not have enough tokens, you will be able to use a combination of tokens and other payment methods. Are you sure want to proceed with product purchases?');break;}$smarty->assign(array("ps_version"=>_PS_VERSION_,"carttotalamount"=>$cart->getOrderTotal(),"pay_mode"=>intval(Configuration::getGlobalValue("AGILE_PCREDIT_PAY_MODE")),"repurchase"=>${${"GLOBALS"}["bvuswe"]}?"true":"false","hideImages"=>(${${"GLOBALS"}["yuhaly"]}["Images"]==1 OR(${${"GLOBALS"}["egpxtgeqmks"]} AND${${"GLOBALS"}["dkkjcsn"]}["Images"]==2))?"false":"true","hideShortDesc"=>(${${"GLOBALS"}["yuhaly"]}["ShortDesc"]==1 OR(${${"GLOBALS"}["xkrcjkbaw"]} AND${${"GLOBALS"}["yuhaly"]}["ShortDesc"]==2))?"false":"true","hideColorPicker"=>(${${"GLOBALS"}["yuhaly"]}["ColorPicker"]==1 OR(${${"GLOBALS"}["cbwjbh"]} AND${${"GLOBALS"}["yuhaly"]}["ColorPicker"]==2))?"false":"true","hideBuyBlock"=>(${$utlkgffdw}["BuyBlock"]==1 OR(${${"GLOBALS"}["cbwjbh"]} AND${${"GLOBALS"}["yuhaly"]}["BuyBlock"]==2))?"false":"true","hideQuantityDiscount"=>(${${"GLOBALS"}["yuhaly"]}["QuantityDiscount"]==1 OR(${${"GLOBALS"}["hilxlnqh"]} AND${${"GLOBALS"}["umucpqvedfc"]}["QuantityDiscount"]==2))?"false":"true","hideMoreInfo"=>(${${"GLOBALS"}["yuhaly"]}["MoreInfo"]==1 OR(${${"GLOBALS"}["bhvjylgwke"]} AND${${"GLOBALS"}["yuhaly"]}["MoreInfo"]==2))?"false":"true","cfmmsg"=>${${"GLOBALS"}["pfzyggsmycc"]},"apc_atproductpage"=>${${"GLOBALS"}["eirkmjikcdjm"]},"apc_atcartsummary"=>${${"GLOBALS"}["adtynxk"]},"cur_prod_ispaid"=>${${"GLOBALS"}["mcxsqevm"]}?"true":"false","cur_prod_istoken"=>self::IsProductInLinkedCategory(intval(Tools::getValue("id_product")))?"true":"false","total_voucher_label"=>$this->get_discounts_override_label($cart->getOrderTotal(true,CART::ONLY_DISCOUNTS),self::tokens_used_in_cart($cart->id))));return$this->display(__FILE__,"views/templates/hook/footer.tpl");}public function hookTotalVoucher(){$oqmmept="tokens_in_cart_value";$nvqwilvo="total_discounts_value";global$cart,$smarty;${${"GLOBALS"}["gdgwepyqsegk"]}=$cart->getOrderTotal(true,CART::ONLY_DISCOUNTS);${${"GLOBALS"}["qujfnh"]}=self::tokens_used_in_cart($cart->id);$smarty->assign(array("total_voucher_label"=>$this->get_discounts_override_label(${$nvqwilvo},${$oqmmept}),"total_discounts_value"=>${${"GLOBALS"}["gdgwepyqsegk"]}));return$this->display(__FILE__,"views/templates/hook/hooktotaldiscount.tpl");}private function hookLeftOrRight(){${"GLOBALS"}["klsjthhpy"]="tokenpkgs";$lowmkrdn="results";global$smarty,$cookie,$cart;${${"GLOBALS"}["tsaegnnprl"]}=new Category(intval(Configuration::getGlobalValue("AGILE_PCREDIT_CID")));${$lowmkrdn}=$category->getProducts($cookie->id_lang,1,10);${"GLOBALS"}["hfazncl"]="result";${${"GLOBALS"}["klsjthhpy"]}=array();foreach(${${"GLOBALS"}["covlofnth"]} AS${${"GLOBALS"}["hfazncl"]}){${"GLOBALS"}["lwmwzmkpcvyy"]="images";${"GLOBALS"}["pnchgltu"]="tokenpkgs";${${"GLOBALS"}["joschbirchk"]}=new Product(${${"GLOBALS"}["tpscwipijflt"]}["id_product"],true,intval($cookie->id_lang));${${"GLOBALS"}["bxfznfdq"]}=$product->getImages(intval($cookie->id_lang));$tsezhflwohb="cover";$okplueyvsu="cover";foreach(${${"GLOBALS"}["lwmwzmkpcvyy"]} AS${${"GLOBALS"}["kbeyebtqpwgu"]}=>${${"GLOBALS"}["qnbsyuwzhlh"]}){$uvcvxb="image";if(${$uvcvxb}["cover"]){${"GLOBALS"}["jjrkve"]="image";$efuhpyh="cover";${"GLOBALS"}["ficrtvsau"]="image";$tmpovhbbgbz="cover";${$tmpovhbbgbz}=${${"GLOBALS"}["ficrtvsau"]};$wtpfwrhlf="cover";${${"GLOBALS"}["mchvytslox"]}["id_image"]=intval($product->id)."-".${$wtpfwrhlf}["id_image"];${$efuhpyh}["id_image_only"]=intval(${${"GLOBALS"}["jjrkve"]}["id_image"]);}}if(!isset(${$tsezhflwohb}))${${"GLOBALS"}["mchvytslox"]}=array("id_image"=>Language::getIsoById($cookie->id_lang)."-default","legend"=>$this->l('No picture'),"title"=>$this->l('No picture'));${${"GLOBALS"}["pnchgltu"]}[]=array("product"=>${${"GLOBALS"}["joschbirchk"]},"cover"=>${$okplueyvsu});}$smarty->assign(array("tokenpkgs"=>${${"GLOBALS"}["suatau"]}));return$this->display(__FILE__,"views/templates/hook/agileprepaidcredit.tpl");}public static function log_message($msg){$mfpeucj="handle";if(Agile_PrepaidCredit_Logging!="on")return;${$mfpeucj}=fopen(dirname(__FILE__)."/debug.log","a+");if(!${${"GLOBALS"}["ptunykznpqi"]})return;$lojwilisxft="handle";${${"GLOBALS"}["dhappvhggiq"]}="";if(isset($_SERVER["HTTP_REFERER"]))${${"GLOBALS"}["dhappvhggiq"]}=$_SERVER["HTTP_REFERER"];fwrite(${$lojwilisxft},date("H:i:s").",".${${"GLOBALS"}["dhappvhggiq"]}.",".${${"GLOBALS"}["kwdksx"]}."
");fclose(${${"GLOBALS"}["ptunykznpqi"]});}function processTokenPurchaseOrOneClickCheckoutTokens($id_order,$orderStatus){$iribuhylzdp="sql";if(!isset(${${"GLOBALS"}["iiklmgjvq"]}))return;if(!intval(${${"GLOBALS"}["mjctzd"]}))return;${"GLOBALS"}["nxlvexmdmhr"]="paid_by_tokens";${"GLOBALS"}["yjgveknn"]="order";if($orderStatus->id!=_PS_OS_PAYMENT_ AND$orderStatus->id!=_PS_OS_WS_PAYMENT_)return;$nhtcsx="exists";${"GLOBALS"}["gykjbiwnw"]="tokens";${"GLOBALS"}["lenfvikv"]="id_order";$dshhlqep="id_order";${${"GLOBALS"}["yjgveknn"]}=new Order(${$dshhlqep});if(!Validate::isLoadedObject(${${"GLOBALS"}["kzybiq"]}))return;${"GLOBALS"}["cywmgamvm"]="exists";$ngbhjacdem="id_order";${$iribuhylzdp}="SELECT id_order FROM `"._DB_PREFIX_."customer_credit` WHERE id_order=".${${"GLOBALS"}["lenfvikv"]}." AND id_customer=".$order->id_customer." AND id_reason IN (".AgilePrepaidCredit::CREDIT_REASON_ONE_CLICK_CHECKOUT_PAYMENT.",".AgilePrepaidCredit::CREDIT_REASON_PURCHASE.")";${${"GLOBALS"}["cywmgamvm"]}=Db::getInstance()->getValue(${${"GLOBALS"}["nytvzvadm"]});$fvccprwvj="tokens";if(${$nhtcsx}>0)return;${${"GLOBALS"}["nytvzvadm"]}="SELECT id_order FROM `"._DB_PREFIX_."order_tokenmode` WHERE id_order=".${$ngbhjacdem};${${"GLOBALS"}["nxlvexmdmhr"]}=intval(Db::getInstance()->getValue(${${"GLOBALS"}["nytvzvadm"]}));${${"GLOBALS"}["gykjbiwnw"]}=0;if(${${"GLOBALS"}["yirlhd"]}){${"GLOBALS"}["mtigwlbm"]="id_reason";${${"GLOBALS"}["qplrklmxb"]}=new Order(${${"GLOBALS"}["mjctzd"]});${${"GLOBALS"}["mtigwlbm"]}=AgilePrepaidCredit::CREDIT_REASON_ONE_CLICK_CHECKOUT_PAYMENT;${${"GLOBALS"}["jixrmbwijv"]}=${${"GLOBALS"}["jixrmbwijv"]}-AgilePrepaidCredit::ConvertPrice2Tokens($order->id_currency,$theOrder->total_paid);}else{${"GLOBALS"}["glkntogrrhdg"]="products";$apcuola="id_reason";${"GLOBALS"}["dvrgirumac"]="sql";${$apcuola}=AgilePrepaidCredit::CREDIT_REASON_PURCHASE;${${"GLOBALS"}["nytvzvadm"]}="SELECT product_id, product_price, product_quantity 
                FROM `"._DB_PREFIX_."order_detail`
                WHERE `id_order` = ".$order->id;${${"GLOBALS"}["vmvckqp"]}=Db::getinstance()->ExecuteS(${${"GLOBALS"}["dvrgirumac"]});foreach(${${"GLOBALS"}["glkntogrrhdg"]} AS${${"GLOBALS"}["eqlxnfdhqhof"]}=>${${"GLOBALS"}["joschbirchk"]}){if(self::IsProductInLinkedCategory(intval(${${"GLOBALS"}["joschbirchk"]}["product_id"]))){${"GLOBALS"}["idivtspoxap"]="product_value";${"GLOBALS"}["thycpdifnl"]="product";${"GLOBALS"}["hmwgvmchtc"]="product_value";${${"GLOBALS"}["idivtspoxap"]}=${${"GLOBALS"}["joschbirchk"]}["product_price"]*intval(${${"GLOBALS"}["thycpdifnl"]}["product_quantity"]);${${"GLOBALS"}["jixrmbwijv"]}=${${"GLOBALS"}["jixrmbwijv"]}+AgilePrepaidCredit::ConvertPrice2Tokens($order->id_currency,${${"GLOBALS"}["hmwgvmchtc"]});}}}if(${$fvccprwvj}!=0){${"GLOBALS"}["cidhtbmgvv"]="memo";$trokvflxue="sql";$nxlrstmi="sql";$uqcpqfkdfw="memo";${${"GLOBALS"}["cidhtbmgvv"]}=(${${"GLOBALS"}["jixrmbwijv"]}>0)?$this->l('Token/Credit Purchase'):$this->l('Token/Credit Payment');${$trokvflxue}="INSERT INTO `"._DB_PREFIX_."customer_credit` (id_customer,id_order,id_reason,units,date_add, memo) VALUES (".$order->id_customer.",".$order->id.",".(int)${${"GLOBALS"}["bmfikjl"]}.",".${${"GLOBALS"}["jixrmbwijv"]}.",'".date("Y-m-d H:i:s")."','".${$uqcpqfkdfw}."')";Db::getInstance()->Execute(${$nxlrstmi});}return"";}public function procesTokenRewards($id_order,$orderStatus){$immimstso="id_order";$pkoxrwfzn="id_order";if(!${$immimstso})return;if($orderStatus->id!=_PS_OS_PAYMENT_ AND$orderStatus->id!=_PS_OS_WS_PAYMENT_)return;$pomgumksgvei="order";$xqyfimujx="rewards";${"GLOBALS"}["ktsizi"]="sql";${$pomgumksgvei}=new Order(${${"GLOBALS"}["mjctzd"]});$wdlnqivlc="cart";$ymwcubhpck="sql";if(!Validate::isLoadedObject(${${"GLOBALS"}["kzybiq"]}))return;${$ymwcubhpck}="SELECT id_order FROM `"._DB_PREFIX_."customer_credit` WHERE id_order=".${$pkoxrwfzn}." AND id_customer=".$order->id_customer." AND id_reason IN (".AgilePrepaidCredit::CREDIT_REASON_PURCHASE_REWARD.")";${"GLOBALS"}["xmenbsmmxrx"]="exists";${${"GLOBALS"}["phhxheyictp"]}=Db::getInstance()->getValue(${${"GLOBALS"}["ktsizi"]});if(${${"GLOBALS"}["xmenbsmmxrx"]}>0)return;${$wdlnqivlc}=new Cart($order->id_cart);${"GLOBALS"}["wheojtgvlhz"]="cart";include_once(_PS_ROOT_DIR_."/modules/agileprepaidcredit/GroupReward.php");${$xqyfimujx}=AgilePrepaidCredit::ConvertPrice2Tokens($cart->id_currency,GroupReward::getCartRewardableValue(${${"GLOBALS"}["wheojtgvlhz"]}));if(${${"GLOBALS"}["igdosfyu"]}>0){${"GLOBALS"}["ygkvpyydljif"]="sql";${${"GLOBALS"}["nytvzvadm"]}="INSERT INTO `"._DB_PREFIX_."customer_credit` (id_customer,id_order,id_reason,units,date_add, memo) VALUES (".$order->id_customer.",".$order->id.",".AgilePrepaidCredit::CREDIT_REASON_PURCHASE_REWARD.",".${${"GLOBALS"}["igdosfyu"]}.",'".date("Y-m-d H:i:s")."','".$this->l('Tokens/Credit Rewards')."')";Db::getInstance()->Execute(${${"GLOBALS"}["ygkvpyydljif"]});}}public static function tokenValueHasBennPaid($order_reference){${"GLOBALS"}["sffvriivhsu"]="sql";${${"GLOBALS"}["sffvriivhsu"]}="SELECT amount FROM "._DB_PREFIX_."order_payment WHERE order_reference='".${${"GLOBALS"}["tjlteqe"]}."' AND transaction_id='agileprepaidcredit'";${${"GLOBALS"}["gkdjcr"]}=floatval(Db::getInstance()->getValue(${${"GLOBALS"}["nytvzvadm"]}));return${${"GLOBALS"}["gkdjcr"]};}public function processTokensUsageInNormalCheckout($id_order){global$cookie;$avtgbtnjm="total_token_value";$jkyouepkl="order";$eeobvvp="sql";if(!${${"GLOBALS"}["mjctzd"]})return;$ocvtrrrp="id_customer_credit";${${"GLOBALS"}["nytvzvadm"]}="SELECT id_customer_credit FROM "._DB_PREFIX_."customer_credit WHERE id_order=".(int)${${"GLOBALS"}["mjctzd"]}." AND id_reason = ".AgilePrepaidCredit::CREDIT_REASON_NORMAL_CHECKOUT_PAYMENT;${"GLOBALS"}["lzcpoqitxv"]="sql";${${"GLOBALS"}["qcwdmdobg"]}=intval(DB::getInstance()->getValue(${${"GLOBALS"}["lzcpoqitxv"]}));if(${$ocvtrrrp}>0)return;${"GLOBALS"}["rnqjei"]="credits";${$jkyouepkl}=new Order(${${"GLOBALS"}["mjctzd"]});if(!Validate::isLoadedObject(${${"GLOBALS"}["kzybiq"]}))return;${"GLOBALS"}["cfilljfy"]="credits";$vmvzpilh="sql";${${"GLOBALS"}["uwitzfbgsw"]}=floatval(self::tokens_used_in_cart($order->id_cart));${"GLOBALS"}["vbsdsvidgs"]="sql";if(${${"GLOBALS"}["uwitzfbgsw"]}<=0)return;${$vmvzpilh}="INSERT INTO `"._DB_PREFIX_."customer_credit` (id_customer,id_order, id_reason ,units, date_add, memo) VALUES 
                (".$order->id_customer.",".$order->id.",".AgilePrepaidCredit::CREDIT_REASON_NORMAL_CHECKOUT_PAYMENT.",-".${${"GLOBALS"}["rnqjei"]}.",'".date("Y-m-d H:i:s")."','".$this->l('Token/Credit payment')."') 
                 ";Db::getInstance()->Execute(${$eeobvvp});${$avtgbtnjm}=AgilePrepaidCredit::ConvertTokens2Price(${${"GLOBALS"}["cfilljfy"]},$order->id_currency);${${"GLOBALS"}["vbsdsvidgs"]}="SELECT amount FROM "._DB_PREFIX_."order_payment WHERE order_reference='".$order->reference."' AND transaction_id='agileprepaidcredit'";${${"GLOBALS"}["mmgllcephouo"]}=floatval(Db::getInstance()->getValue(${${"GLOBALS"}["nytvzvadm"]}));if(${${"GLOBALS"}["mmgllcephouo"]}<=0){$vwlxsswdjc="orderpayment";$dklmfhwis="total_token_value";${${"GLOBALS"}["dkoknnkf"]}=new Currency($order->id_currency);${$vwlxsswdjc}=new OrderPayment();$orderpayment->payment_method=$this->l('Paid by token');$orderpayment->amount=${$dklmfhwis};$orderpayment->id_currency=$order->id_currency;$orderpayment->order_reference=$order->reference;$orderpayment->conversion_rate=$currency->conversion_rate;$orderpayment->transaction_id="agileprepaidcredit";$orderpayment->save();}}public static function GetTokenBalance($id_customer){$xylmqypyuf="id_customer";${"GLOBALS"}["nbgzdir"]="id_customer";${"GLOBALS"}["nvjivabih"]="result";if(!intval(${${"GLOBALS"}["nbgzdir"]}))return 0;${${"GLOBALS"}["nytvzvadm"]}="SELECT SUM(units) AS balance FROM `"._DB_PREFIX_."customer_credit` WHERE id_customer=".${$xylmqypyuf};${${"GLOBALS"}["nvjivabih"]}=Db::getInstance()->getRow(${${"GLOBALS"}["nytvzvadm"]});if(isset(${${"GLOBALS"}["tpscwipijflt"]}["balance"])AND floatval(${${"GLOBALS"}["tpscwipijflt"]}["balance"])>0)return floatval(${${"GLOBALS"}["tpscwipijflt"]}["balance"]);return 0;}public static function get_unitcurrency(){${"GLOBALS"}["qmexqhtyamka"]="id_currency";$fkcelgejoslw="id_currency";${${"GLOBALS"}["qmexqhtyamka"]}=(int)Configuration::getGlobalValue("AGILE_PCREDIT_UNITCURRENCY");${${"GLOBALS"}["sodjyfngq"]}=new Currency(${$fkcelgejoslw});if(Validate::isLoadedObject(${${"GLOBALS"}["sodjyfngq"]})&&$unitcurrency->conversion_rate!=0)return${${"GLOBALS"}["sodjyfngq"]};return new Currency((int)Configuration::get("PS_CURRENCY_DEFAULT"));}public static function ConvertPrice2Tokens($id_currency,$amount){$uybtrocxrqc="amount";$xeecrgosthe="unitprice";${"GLOBALS"}["xpehhhjv"]="unitprice";${"GLOBALS"}["tbumfxrsq"]="currency";$tysieqihl="id_currency";${"GLOBALS"}["znjpimxbdhx"]="unitprice";${$xeecrgosthe}=floatval(Configuration::getGlobalValue("AGILE_PCREDIT_UNITPRICE"));if(${${"GLOBALS"}["opnwrbnrmjd"]}==0)${${"GLOBALS"}["xpehhhjv"]}=1;${${"GLOBALS"}["tbumfxrsq"]}=new Currency(${$tysieqihl});${${"GLOBALS"}["sodjyfngq"]}=AgilePrepaidCredit::get_unitcurrency();${${"GLOBALS"}["jixrmbwijv"]}=${$uybtrocxrqc}/${${"GLOBALS"}["znjpimxbdhx"]}/($currency->conversion_rate/$unitcurrency->conversion_rate);return${${"GLOBALS"}["jixrmbwijv"]};}public static function ConvertTokens2Price($tokens,$id_currency){$mdtsvjco="value";${"GLOBALS"}["tmfvlvnohyj"]="unitprice";${"GLOBALS"}["pyqndpvlymq"]="tokens";${${"GLOBALS"}["tmfvlvnohyj"]}=floatval(Configuration::getGlobalValue("AGILE_PCREDIT_UNITPRICE"));${"GLOBALS"}["gnfqbnsetvvg"]="unitcurrency";${"GLOBALS"}["hfeltceb"]="value";if(${${"GLOBALS"}["opnwrbnrmjd"]}==0)${${"GLOBALS"}["opnwrbnrmjd"]}=1;$iweqap="unitprice";$zlnled="value";${${"GLOBALS"}["dkoknnkf"]}=new Currency(${${"GLOBALS"}["kyijkefuvt"]});${"GLOBALS"}["fjoivoxwh"]="value";${${"GLOBALS"}["gnfqbnsetvvg"]}=new Currency((int)Configuration::getGlobalValue("AGILE_PCREDIT_UNITCURRENCY"));${${"GLOBALS"}["hfeltceb"]}=(${${"GLOBALS"}["pyqndpvlymq"]}*${$iweqap});${$mdtsvjco}=${${"GLOBALS"}["fjoivoxwh"]}*($currency->conversion_rate/$unitcurrency->conversion_rate);return${$zlnled};}public static function tokens_used_in_cart($id_cart){${"GLOBALS"}["eihnjlxib"]="val";$lcvfbvi="id_cart";$wktlulko="val";$jzpgdgmhm="sql";if(!${$lcvfbvi})return 0;${$jzpgdgmhm}="SELECT tokens FROM "._DB_PREFIX_."cart_tokens WHERE id_cart=".intval(${${"GLOBALS"}["iicdrbtj"]});${${"GLOBALS"}["eihnjlxib"]}=Db::getInstance()->getValue(${${"GLOBALS"}["nytvzvadm"]});return floatval(${$wktlulko});}public static function has_tokens_contained_in_cart($id_cart){$bpuescmjsjyh="id_cart";${"GLOBALS"}["equbdfs"]="val";if(!${$bpuescmjsjyh})return false;${${"GLOBALS"}["nytvzvadm"]}="SELECT max(ct.id_product) 
				FROM "._DB_PREFIX_."cart_product ct
					LEFT JOIN "._DB_PREFIX_."category_product cy ON (ct.id_product=cy.id_product)
				 WHERE id_cart=".intval(${${"GLOBALS"}["iicdrbtj"]})."
					 AND IFNULL(cy.id_category,0) = ".intval(Configuration::getGlobalValue("AGILE_PCREDIT_CID"));${${"GLOBALS"}["equbdfs"]}=intval(Db::getInstance()->getValue(${${"GLOBALS"}["nytvzvadm"]}));return(${${"GLOBALS"}["cmzlzsyepu"]}>0);}function addCreditsToCart(){${"GLOBALS"}["xjfckls"]="credits";${"GLOBALS"}["psgvhelxx"]="sql";global$cookie,$cart;$qxnkuwnqdcvd="credits";${"GLOBALS"}["kgvkligvrw"]="credits";${"GLOBALS"}["vnvlapwy"]="sql";$zujtxioadxf="apcOrderTotal";$cuppdhgtt="apcOrderTotal";if(!Tools::isSubmit("submitAddCredits"))return$this->l('Invalid data posted');$ydmjyfgqqn="sql";${"GLOBALS"}["olipcldy"]="credits";${$qxnkuwnqdcvd}=floatval(Tools::getValue("credits_to_use"));if(${${"GLOBALS"}["xjfckls"]}<0)return$this->l('Invalid credit value entered');if(self::has_tokens_contained_in_cart($cart->id)){return$this->l('You can not buy tokens using tokens.');}${"GLOBALS"}["euvmplfgydj"]="apcOrderTotal_tokens";${${"GLOBALS"}["unsaohcp"]}=self::GetTokenBalance($cookie->id_customer);if(${${"GLOBALS"}["uwitzfbgsw"]}>${${"GLOBALS"}["unsaohcp"]})return$this->l('You can not enter a credit value that is more than your available credits.');${$ydmjyfgqqn}="DELETE FROM "._DB_PREFIX_."cart_tokens WHERE id_cart=".intval($cart->id);Db::getInstance()->Execute(${${"GLOBALS"}["nytvzvadm"]});${$cuppdhgtt}=$cart->getOrderTotal();${${"GLOBALS"}["euvmplfgydj"]}=AgilePrepaidCredit::ConvertPrice2Tokens($cart->id_currency,${$zujtxioadxf});if((float)(${${"GLOBALS"}["olipcldy"]}-${${"GLOBALS"}["bjdxbbuier"]})>0.00001){return$this->l('You can not enter a credit value that is more than the order total amount.');}${${"GLOBALS"}["vnvlapwy"]}="INSERT INTO "._DB_PREFIX_."cart_tokens (id_cart, tokens) VALUES (".intval($cart->id).",".floatval(${${"GLOBALS"}["kgvkligvrw"]}).")";Db::getInstance()->Execute(${${"GLOBALS"}["psgvhelxx"]});return"";}public static function adjustCreditsInCart(){$wehwgpomrszk="cart";${"GLOBALS"}["xjgvkrw"]="sql";${${"GLOBALS"}["xfdoqzjyvsy"]}=Context::getContext();$fgkddebegi="apcOrderTotal";${$wehwgpomrszk}=$context->cart;$xwcufna="tokens";${"GLOBALS"}["ueypfkn"]="apcOrderTotal_tokens";$hehdcekdmg="tokens";${${"GLOBALS"}["nytvzvadm"]}="SELECT tokens FROM "._DB_PREFIX_."cart_tokens WHERE id_cart=".(int)$cart->id;${${"GLOBALS"}["jixrmbwijv"]}=(float)Db::getInstance()->getValue(${${"GLOBALS"}["nytvzvadm"]});if(${${"GLOBALS"}["jixrmbwijv"]}==0)return;$aooeiizuu="apcOrderTotal";Db::getInstance()->Execute("DELETE FROM "._DB_PREFIX_."cart_tokens WHERE id_cart=".(int)$cart->id);${$fgkddebegi}=$cart->getOrderTotal();${${"GLOBALS"}["bjdxbbuier"]}=AgilePrepaidCredit::ConvertPrice2Tokens($cart->id_currency,${$aooeiizuu});if((${$hehdcekdmg}-${${"GLOBALS"}["bjdxbbuier"]})>0)${${"GLOBALS"}["jixrmbwijv"]}=${${"GLOBALS"}["ueypfkn"]};${${"GLOBALS"}["xjgvkrw"]}="INSERT INTO "._DB_PREFIX_."cart_tokens (id_cart, tokens) VALUES (".intval($cart->id).",".floatval(${$xwcufna}).")";Db::getInstance()->Execute(${${"GLOBALS"}["nytvzvadm"]});}public static function IsProductPaidByCustomer($id_product,$id_customer){${"GLOBALS"}["rdczwhebutw"]="id_customer";${"GLOBALS"}["ikiowvrctns"]="id_product";if(!intval(${${"GLOBALS"}["qybkvwomin"]}))return false;$cqckbjwivl="result";if(!intval(${${"GLOBALS"}["rdczwhebutw"]}))return false;${"GLOBALS"}["uhplmbby"]="result";${${"GLOBALS"}["nytvzvadm"]}="SELECT COUNT(*) AS paid 
                    FROM "._DB_PREFIX_."customer_credit a
                       LEFT JOIN "._DB_PREFIX_."order_detail pd ON a.id_order = pd.id_order
                    WHERE a.id_customer = ".intval(${${"GLOBALS"}["ulbsblvged"]})." AND pd.product_id =".intval(${${"GLOBALS"}["ikiowvrctns"]});${${"GLOBALS"}["tpscwipijflt"]}=Db::getInstance()->getRow(${${"GLOBALS"}["nytvzvadm"]});if(isset(${$cqckbjwivl}["paid"])AND intval(${${"GLOBALS"}["uhplmbby"]}["paid"])>0)return true;return false;}public static function IsProductInLinkedCategory($id_product){$mqwmmaytnm="id_product";$qkcmfqvwlzp="result";${${"GLOBALS"}["nytvzvadm"]}="SELECT `id_category` from `"._DB_PREFIX_."category_product` WHERE `id_category`=".(int)Configuration::getGlobalValue("AGILE_PCREDIT_CID")." AND id_product =".${$mqwmmaytnm};${"GLOBALS"}["sjsaxu"]="result";${${"GLOBALS"}["sjsaxu"]}=Db::getInstance()->getRow(${${"GLOBALS"}["nytvzvadm"]});if(isset(${${"GLOBALS"}["tpscwipijflt"]}["id_category"])AND intval(${$qkcmfqvwlzp}["id_category"])>0)return true;return false;}public function getBlockSettings(){${"GLOBALS"}["xakkkhtbc"]="items";$ilxlho="settings";$egiglurqjrif="items";${"GLOBALS"}["ymneel"]="datfile";$erqspjbmfm="items";${"GLOBALS"}["ckvyyz"]="item";${$ilxlho}=array();${${"GLOBALS"}["ymneel"]}=dirname(__FILE__)."/blocksettings.dat";${"GLOBALS"}["pxphxejihq"]="data";$ojvwdsb="data";${$ojvwdsb}=file_exists(${${"GLOBALS"}["gkdlgkntx"]})?file(${${"GLOBALS"}["gkdlgkntx"]}):array();${$erqspjbmfm}=$this->getInitSetting();if(!empty(${${"GLOBALS"}["pxphxejihq"]}))${${"GLOBALS"}["xakkkhtbc"]}=explode(",",${${"GLOBALS"}["pbfbkw"]}[0]);foreach(${$egiglurqjrif} AS${${"GLOBALS"}["ckvyyz"]}){${"GLOBALS"}["yikijst"]="settings";${"GLOBALS"}["gvcoroiybm"]="nv";$jiekkguz="len";$nedmiwmt="nv";${${"GLOBALS"}["gvcoroiybm"]}=explode(":",${${"GLOBALS"}["wfrfljcm"]});if(empty(${${"GLOBALS"}["rwsuozrb"]}))continue;${$jiekkguz}=count(${${"GLOBALS"}["rwsuozrb"]});if(${${"GLOBALS"}["tkudhmxbjof"]}==1)${${"GLOBALS"}["paoqdtcbd"]}[${$nedmiwmt}[0]]=1;else${${"GLOBALS"}["yikijst"]}[${${"GLOBALS"}["rwsuozrb"]}[0]]=${${"GLOBALS"}["rwsuozrb"]}[1];}return${${"GLOBALS"}["paoqdtcbd"]};}private function saveBlockSettings(){$ngdkibs="block";${"GLOBALS"}["cimylplrdr"]="data";${${"GLOBALS"}["cimylplrdr"]}="";${"GLOBALS"}["yqkdppri"]="handle";${"GLOBALS"}["hmilqvfxoo"]="mapping";$yehuksvu="handle";foreach($this->getInfoBlocks()AS${$ngdkibs}=>${${"GLOBALS"}["hmilqvfxoo"]}){${"GLOBALS"}["xxpjtkt"]="data";${"GLOBALS"}["qzggstr"]="block";if(!empty(${${"GLOBALS"}["pbfbkw"]}))${${"GLOBALS"}["pbfbkw"]}=${${"GLOBALS"}["pbfbkw"]}.",";${${"GLOBALS"}["xxpjtkt"]}=${${"GLOBALS"}["pbfbkw"]}.${${"GLOBALS"}["qzggstr"]}.":".$_POST["visibility_".${${"GLOBALS"}["xlnxtmaus"]}];}${$yehuksvu}=fopen(dirname(__FILE__)."/blocksettings.dat","w");if(!${${"GLOBALS"}["yqkdppri"]})return;fwrite(${${"GLOBALS"}["ptunykznpqi"]},${${"GLOBALS"}["pbfbkw"]});fclose(${${"GLOBALS"}["ptunykznpqi"]});}public function getInfoBlocks(){${"GLOBALS"}["gdwsqxlj"]="infoBlocks";$glidsxieo="infoBlocks";${"GLOBALS"}["unvakrrzc"]="infoBlocks";${${"GLOBALS"}["gdwsqxlj"]}=array();${"GLOBALS"}["xwnqefpu"]="infoBlocks";${${"GLOBALS"}["nthasle"]}["Images"]=$this->l('Product Image Block');${${"GLOBALS"}["nthasle"]}["ShortDesc"]=$this->l('Short Description Block');${$glidsxieo}["BuyBlock"]=$this->l('Price Buy Block');${${"GLOBALS"}["nthasle"]}["ColorPicker"]=$this->l('Color Picker Block');$vmifaihjtam="infoBlocks";${${"GLOBALS"}["xwnqefpu"]}["QuantityDiscount"]=$this->l('Quantity Discount Block');${${"GLOBALS"}["unvakrrzc"]}["MoreInfo"]=$this->l('More Info Block');return${$vmifaihjtam};}private function getInitSetting(){${"GLOBALS"}["ovnfogxcqtne"]="block";$cuwokuhubf="items";${$cuwokuhubf}=array();foreach($this->getInfoBlocks()AS${${"GLOBALS"}["ovnfogxcqtne"]}=>${${"GLOBALS"}["nircndu"]}){${"GLOBALS"}["wmkihgpfimf"]="block";${${"GLOBALS"}["elggxxc"]}[]=${${"GLOBALS"}["wmkihgpfimf"]}.":1";}return${${"GLOBALS"}["elggxxc"]};}public static function add_to_cart_handler(){${"GLOBALS"}["iequctsy"]="available";$rgzkpb="qty";$huktsrkmpnm="pay_mode";${"GLOBALS"}["ljmyrkp"]="agile_pid";${"GLOBALS"}["qfbvjaqzt"]="ispaid";global$cart,$cookie;if(Tools::getValue("delete")==1)return;${"GLOBALS"}["ilmwrwhi"]="agile_paid";$xfssiflmy="agile_paid";${$huktsrkmpnm}=intval(Configuration::getGlobalValue("AGILE_PCREDIT_PAY_MODE"));${"GLOBALS"}["ibiduqoowzsq"]="prod";$ftjktnolqp="pay_mode";${"GLOBALS"}["khvgyiv"]="qty";if(${${"GLOBALS"}["kcfqoy"]}==AgilePrepaidCredit::PAY_MODE_NORMAL)return;if(${$ftjktnolqp}==AgilePrepaidCredit::PAY_MODE_COMBINATION AND$cart->getOrderTotal()>0)return;$byhmftjr="qty";$uulrmihbcu="repurchase";${${"GLOBALS"}["rkouhblqi"]}=intval(Tools::getValue("id_product"));${$xfssiflmy}=intval(Tools::getValue("id_product_attribute"));${${"GLOBALS"}["ibiduqoowzsq"]}=new Product(${${"GLOBALS"}["rkouhblqi"]});${"GLOBALS"}["twkoovotqvb"]="repurchase";${"GLOBALS"}["kepeehenbosd"]="agile_pid";if(self::any_empty_required_file_customization_field(${${"GLOBALS"}["uirohyurf"]},${${"GLOBALS"}["qtnaunj"]})OR self::any_empty_required_text_customization_field(${${"GLOBALS"}["uirohyurf"]},${${"GLOBALS"}["qtnaunj"]})){return;}${${"GLOBALS"}["mvxpaghvn"]}=!agileprepaidcredit::IsProductInLinkedCategory(${${"GLOBALS"}["rkouhblqi"]});$ecojfs="sql";${"GLOBALS"}["yweodday"]="available";${"GLOBALS"}["rwjoyzfak"]="isLogged";${${"GLOBALS"}["qfbvjaqzt"]}=agileprepaidcredit::IsProductPaidByCustomer(${${"GLOBALS"}["rkouhblqi"]},$cookie->id_customer);${${"GLOBALS"}["twkoovotqvb"]}=intval(Configuration::getGlobalValue("AGILE_PCREDIT_REPURCHASE"));${$byhmftjr}=intval(Tools::getValue("qty"));if(!${$uulrmihbcu} OR${${"GLOBALS"}["umktsnwp"]}<1)${${"GLOBALS"}["khvgyiv"]}=1;${${"GLOBALS"}["erkzouscbq"]}=Context::getContext()->shop->id;${${"GLOBALS"}["nytvzvadm"]}="SELECT quantity FROM `"._DB_PREFIX_."stock_available` WHERE id_product=".${${"GLOBALS"}["rkouhblqi"]}." AND `id_shop` =".${${"GLOBALS"}["erkzouscbq"]};if(${${"GLOBALS"}["ilmwrwhi"]}>0)${$ecojfs}="SELECT quantity FROM `"._DB_PREFIX_."stock_available`  WHERE `id_product` =".${${"GLOBALS"}["ljmyrkp"]}." AND `id_product_attribute` =".${${"GLOBALS"}["qtnaunj"]}." AND `id_shop` =".${${"GLOBALS"}["erkzouscbq"]};${${"GLOBALS"}["yweodday"]}=intval(Db::getInstance()->getValue(${${"GLOBALS"}["nytvzvadm"]}));if(${${"GLOBALS"}["iequctsy"]}<${$rgzkpb}){${"GLOBALS"}["ohtxqcaltc"]="redirect_url";${"GLOBALS"}["owzakilo"]="agile_pid";${${"GLOBALS"}["ohtxqcaltc"]}=Context::getContext()->link->getModuleLink("agileprepaidcredit","outofstock",array("id_product"=>${${"GLOBALS"}["owzakilo"]}),true);Tools::redirect(${${"GLOBALS"}["ciqxghdy"]});}${${"GLOBALS"}["rwjoyzfak"]}=Context::getContext()->customer->isLogged();if(${${"GLOBALS"}["mvxpaghvn"]} AND${${"GLOBALS"}["kepeehenbosd"]}){$kdjywtk="agile_paid";$bjpbmhdy="qty";$kweqrryz="price";if(!${${"GLOBALS"}["kgxkdfrvgq"]}){Tools::redirect("index.php?controller=authentication");}$jfujse="tokens";${${"GLOBALS"}["unsaohcp"]}=agileprepaidcredit::GetTokenBalance($cookie->id_customer);$golbunx="id_product_download";$gmjlxrpyen="productDownload";${${"GLOBALS"}["ixxeushy"]}=$prod->getPrice(true,${$kdjywtk},6)*${$bjpbmhdy};${"GLOBALS"}["rliihgv"]="ispaid";${${"GLOBALS"}["jixrmbwijv"]}=AgilePrepaidCredit::ConvertPrice2Tokens($cookie->id_currency,${$kweqrryz});if(floatval(${${"GLOBALS"}["unsaohcp"]})<floatval(${$jfujse})){$nmxxplhzode="pay_mode";if(${$nmxxplhzode}==AgilePrepaidCredit::PAY_MODE_COMBINATION)return;Tools::redirect("index.php?id_category=".Configuration::getGlobalValue("AGILE_PCREDIT_CID")."&controller=category");}if(!${${"GLOBALS"}["rliihgv"]} OR${${"GLOBALS"}["bvuswe"]}){${"GLOBALS"}["myomibsy"]="agile_pid";${"GLOBALS"}["rhxlfdhhj"]="agile_paid";${${"GLOBALS"}["vmvckqp"]}[]=array("id_product"=>${${"GLOBALS"}["myomibsy"]},"id_product_attribute"=>${${"GLOBALS"}["rhxlfdhhj"]},"quantity"=>${${"GLOBALS"}["umktsnwp"]});if(!self::one_click_checkout(${${"GLOBALS"}["vmvckqp"]}))Tools::redirect("index.php?id_category=".Configuration::getGlobalValue("AGILE_PCREDIT_CID")."&controller=category");}${$gmjlxrpyen}=new ProductDownload();if(${$golbunx}=$productDownload->getIdFromIdProduct($prod->id)){$yndvoygwrvx="productDownload";${"GLOBALS"}["wwjyye"]="productDownload";${${"GLOBALS"}["wwjyye"]}=new ProductDownload(${${"GLOBALS"}["xyvomf"]});if(Validate::isLoadedObject(${$yndvoygwrvx})AND!empty($productDownload->display_filename)){include_once(_PS_ROOT_DIR_."/modules/agileprepaidcredit/download.php");}}Tools::redirect("index.php?controller=history");}}private static function get_requred_fields_15x($id_prod,$attr_id,$type,$index){$rvuedjlncu="attr_id";$kihzup="index";$kttldwte="customization";$bxtbdmoijr="id_prod";global$cart;${${"GLOBALS"}["nytvzvadm"]}="
				SELECT cu.`id_customization`, cd.`index`, cd.`value` AS value, cd.`type` FROM `"._DB_PREFIX_."customization` cu
				LEFT JOIN `"._DB_PREFIX_."customized_data` cd
				ON cu.`id_customization` = cd.`id_customization`
				WHERE cu.id_cart = ".(int)$cart->id."
				AND cu.id_product = ".(int)${$bxtbdmoijr}."
				AND cu.id_product_attribute = ".(int)${$rvuedjlncu}."
				AND cd.type = ".(int)${${"GLOBALS"}["anvxqnck"]}."
				AND cd.index = ".(int)${$kihzup}."
				AND in_cart = 0
				";${${"GLOBALS"}["vsunrh"]}=Db::getInstance()->getRow(${${"GLOBALS"}["nytvzvadm"]});if(!isset(${${"GLOBALS"}["vsunrh"]}))return"";if(!isset(${$kttldwte}["value"]))return"";return${${"GLOBALS"}["vsunrh"]}["value"];}private static function any_empty_required_text_customization_field($prod,$attrid){global$cookie;${"GLOBALS"}["kxgfhtsbbl"]="authorizedTextFields";$teqnufrjrc="fieldIds";${"GLOBALS"}["txxpvgk"]="authorizedTextFields";if(!${${"GLOBALS"}["vxxqswj"]}=$prod->getCustomizationFieldIds())return false;${"GLOBALS"}["trjbesufdjkj"]="indexes";$ythwqgxy="fieldName";${${"GLOBALS"}["kxgfhtsbbl"]}=array();foreach(${$teqnufrjrc} AS${${"GLOBALS"}["ggblvkjrmb"]}){$etybzrkkcw="fieldId";$swoeexrqhb="authorizedTextFields";if(${${"GLOBALS"}["ggblvkjrmb"]}["type"]==_CUSTOMIZE_TEXTFIELD_)${$swoeexrqhb}[(int)(${${"GLOBALS"}["ggblvkjrmb"]}["id_customization_field"])]="textField".(int)(${$etybzrkkcw}["id_customization_field"]);}${${"GLOBALS"}["trjbesufdjkj"]}=array_flip(${${"GLOBALS"}["txxpvgk"]});foreach(${${"GLOBALS"}["zfvipvfar"]} as${$ythwqgxy}){${"GLOBALS"}["sdirxxny"]="indexes";$olyvldnbl="fieldName";$krsvdh="attrid";${${"GLOBALS"}["fkeeniy"]}=${${"GLOBALS"}["sdirxxny"]}[${$olyvldnbl}];${"GLOBALS"}["gjfkivhr"]="value";${${"GLOBALS"}["gjfkivhr"]}=self::get_requred_fields_15x($prod->id,${$krsvdh},_CUSTOMIZE_TEXTFIELD_,${${"GLOBALS"}["fkeeniy"]});if(empty(${${"GLOBALS"}["ocnibkywhpo"]}))return true;}return false;}private static function any_empty_required_file_customization_field($prod,$attrid){global$cookie;$jxtvztb="authorizedFileFields";if(!${${"GLOBALS"}["vxxqswj"]}=$prod->getCustomizationFieldIds())return false;${${"GLOBALS"}["pvdjddu"]}=array();foreach(${${"GLOBALS"}["vxxqswj"]} AS${${"GLOBALS"}["ggblvkjrmb"]}){$mkazyx="authorizedFileFields";$rorrjsnhbvpi="fieldId";$biagyo="fieldId";${"GLOBALS"}["prtyxceh"]="fieldId";if(${${"GLOBALS"}["prtyxceh"]}["type"]==_CUSTOMIZE_FILE_)${$mkazyx}[(int)(${$biagyo}["id_customization_field"])]="file".(int)(${$rorrjsnhbvpi}["id_customization_field"]);}${${"GLOBALS"}["sxhhbypq"]}=array_flip(${$jxtvztb});foreach(${${"GLOBALS"}["pvdjddu"]} as${${"GLOBALS"}["richmfqvmqb"]}){${"GLOBALS"}["tvbvtbxesw"]="varName";$msztnplumgo="value";${"GLOBALS"}["jcdcyhjg"]="attrid";${"GLOBALS"}["gflehyfae"]="indexes";${${"GLOBALS"}["fkeeniy"]}=${${"GLOBALS"}["gflehyfae"]}[${${"GLOBALS"}["richmfqvmqb"]}];${${"GLOBALS"}["tvbvtbxesw"]}="pictures_".(int)($prod->id)."_".(int)(${${"GLOBALS"}["fkeeniy"]});${$msztnplumgo}=self::get_requred_fields_15x($prod->id,${${"GLOBALS"}["jcdcyhjg"]},_CUSTOMIZE_FILE_,${${"GLOBALS"}["fkeeniy"]});if(empty(${${"GLOBALS"}["ocnibkywhpo"]}))return true;}return false;}public static function one_click_checkout($items){$rfdlipyijvi="sql";$crrklehyto="id_address";global$cookie;$optdfhqxoi="newcart";${$crrklehyto}=Address::getFirstCustomerAddressId($cookie->id_customer);${$optdfhqxoi}=new Cart();$newcart->id_customer=$cookie->id_customer;$newcart->id_lang=$cookie->id_lang;${"GLOBALS"}["tihcikgsl"]="id_address";$newcart->id_carrier=0;$newcart->id_address_delivery=${${"GLOBALS"}["tihcikgsl"]};${"GLOBALS"}["ehksxjqco"]="pmodule";$newcart->id_address_invoice=${${"GLOBALS"}["kivhelr"]};$newcart->id_currency=$cookie->id_currency;$bpwgfvq="tokens";${"GLOBALS"}["rmypouh"]="customer_cart_id";$newcart->id_guest=0;$newcart->recyclable=0;$kdqgxdxamjob="item";$newcart->gift=0;$newcart->gift_message="";$dgxnnayxaml="sql";$newcart->add();$vfustrearww="carttotal";foreach(${${"GLOBALS"}["elggxxc"]} as${$kdqgxdxamjob}){${"GLOBALS"}["tcltvnmdf"]="item";${"GLOBALS"}["ciinwb"]="item";${"GLOBALS"}["svlkgkm"]="sql";${${"GLOBALS"}["nytvzvadm"]}="INSERT INTO `"._DB_PREFIX_."cart_product` (id_cart,id_product,id_product_attribute,quantity,date_add) VALUES (".$newcart->id.",".${${"GLOBALS"}["ciinwb"]}["id_product"].",".${${"GLOBALS"}["wfrfljcm"]}["id_product_attribute"].",".${${"GLOBALS"}["wfrfljcm"]}["quantity"].",'".date("Y-m-d H:i:s")."')";$qxyuuypy="item";Db::getInstance()->Execute(${${"GLOBALS"}["svlkgkm"]});self::save_customization_data($newcart->id,${$qxyuuypy}["id_product"],${${"GLOBALS"}["wfrfljcm"]}["id_product_attribute"],${${"GLOBALS"}["tcltvnmdf"]}["quantity"],${${"GLOBALS"}["kivhelr"]});}${$vfustrearww}=$newcart->getOrderTotal();${${"GLOBALS"}["unsaohcp"]}=agileprepaidcredit::GetTokenBalance($cookie->id_customer);${${"GLOBALS"}["jixrmbwijv"]}=AgilePrepaidCredit::ConvertPrice2Tokens($cookie->id_currency,${${"GLOBALS"}["uhfhtmsupae"]});${"GLOBALS"}["cgyxnjnglr"]="customer_cart_id";$wgjiibyffn="cart";if(${${"GLOBALS"}["unsaohcp"]}<${$bpwgfvq}){$newcart->delete();return false;}global$cart;${${"GLOBALS"}["rmypouh"]}=$cart->id;${${"GLOBALS"}["ehksxjqco"]}=new AgilePrepaidCredit();$pmodule->validateOrder($newcart->id,intval(Configuration::getGlobalValue("AGILE_PCREDIT_WAITING_STATE")),$newcart->getOrderTotal(),NULL,NULL,array(),NULL,false);${$wgjiibyffn}=new cart(${${"GLOBALS"}["cgyxnjnglr"]});${$rfdlipyijvi}="INSERT INTO `"._DB_PREFIX_."order_tokenmode` (id_order, use_token) VALUES (".$pmodule->currentOrder.",1)";Db::getInstance()->Execute(${$dgxnnayxaml});self::update_order_state($pmodule->currentOrder,Configuration::getGlobalValue("PS_OS_PAYMENT"));return$pmodule->currentOrder;}private static function save_customization_data($id_cart,$id_product,$id_product_attribute,$quantity,$id_address){$dypspaj="sql";${"GLOBALS"}["xcarrmprp"]="first";global$cookie;${"GLOBALS"}["elyjhcltfboa"]="prod";${"GLOBALS"}["xtllcsjypg"]="id_product";${${"GLOBALS"}["nytvzvadm"]}="INSERT INTO `"._DB_PREFIX_."customization` (id_cart, id_address_delivery, id_product_attribute, id_product, quantity, in_cart)
			VALUES(".(int)${${"GLOBALS"}["iicdrbtj"]}.",".(int)${${"GLOBALS"}["kivhelr"]}.", ".(int)${${"GLOBALS"}["mdwgcikb"]}.", ".(int)${${"GLOBALS"}["qybkvwomin"]}.", ".(int)${${"GLOBALS"}["wplwxrqp"]}.",1)";${"GLOBALS"}["qhsbnood"]="first";Db::getInstance(_PS_USE_SQL_SLAVE_)->Execute(${$dypspaj});${${"GLOBALS"}["nhqcywd"]}=Db::getInstance(_PS_USE_SQL_SLAVE_)->Insert_ID();${"GLOBALS"}["nlgughvk"]="fieldIds";${${"GLOBALS"}["xcarrmprp"]}=true;${${"GLOBALS"}["qoorppiynvcy"]}="INSERT INTO "._DB_PREFIX_."customized_data (`id_customization`, `type`, `index`, `value`) VALUES ";${${"GLOBALS"}["elyjhcltfboa"]}=new Product(${${"GLOBALS"}["xtllcsjypg"]});if(${${"GLOBALS"}["nlgughvk"]}=$prod->getCustomizationFieldIds()){$smkpaimuiv="authorizedTextFields";$kdxmbndug="authorizedTextFields";$itnjirmrrf="indexes";${"GLOBALS"}["lgetjhr"]="authorizedTextFields";$nuyggpbne="fieldIds";$vddmwwqci="authorizedFileFields";${"GLOBALS"}["szalqhkebuna"]="fieldId";${"GLOBALS"}["wieuohv"]="fieldIds";$lisqqle="authorizedFileFields";${$lisqqle}=array();$jjelgwht="fieldName";foreach(${${"GLOBALS"}["wieuohv"]} AS${${"GLOBALS"}["szalqhkebuna"]}){$jaumfvozm="fieldId";if(${${"GLOBALS"}["ggblvkjrmb"]}["type"]==_CUSTOMIZE_FILE_)${${"GLOBALS"}["pvdjddu"]}[(int)(${${"GLOBALS"}["ggblvkjrmb"]}["id_customization_field"])]="file".(int)(${$jaumfvozm}["id_customization_field"]);}${${"GLOBALS"}["sxhhbypq"]}=array_flip(${$vddmwwqci});foreach(${${"GLOBALS"}["pvdjddu"]} as${${"GLOBALS"}["richmfqvmqb"]}){$fuhjyyt="value";$ytqpbweeran="id_product";$xmoeah="varName";$ubtfndzghb="indexes";$zgcnfnhvqn="id_product_attribute";${${"GLOBALS"}["fkeeniy"]}=${$ubtfndzghb}[${${"GLOBALS"}["richmfqvmqb"]}];${"GLOBALS"}["rofcanzf"]="sql_custom_data";${$xmoeah}="pictures_".(int)($prod->id)."_".(int)(${${"GLOBALS"}["fkeeniy"]});${$fuhjyyt}=self::get_requred_fields_15x(${$ytqpbweeran},${$zgcnfnhvqn},_CUSTOMIZE_FILE_,${${"GLOBALS"}["fkeeniy"]});if(!${${"GLOBALS"}["lhtowuxaj"]})${${"GLOBALS"}["qoorppiynvcy"]}.=",";else${${"GLOBALS"}["lhtowuxaj"]}=false;${${"GLOBALS"}["rofcanzf"]}.="(".(int)${${"GLOBALS"}["nhqcywd"]}.", "._CUSTOMIZE_FILE_.", ".(int)${${"GLOBALS"}["fkeeniy"]}.", '".pSQL(${${"GLOBALS"}["ocnibkywhpo"]})."')";}${$smkpaimuiv}=array();foreach(${$nuyggpbne} AS${${"GLOBALS"}["ggblvkjrmb"]}){${"GLOBALS"}["hyxhvqmr"]="fieldId";if(${${"GLOBALS"}["ggblvkjrmb"]}["type"]==_CUSTOMIZE_TEXTFIELD_)${${"GLOBALS"}["zfvipvfar"]}[(int)(${${"GLOBALS"}["ggblvkjrmb"]}["id_customization_field"])]="textField".(int)(${${"GLOBALS"}["hyxhvqmr"]}["id_customization_field"]);}${$itnjirmrrf}=array_flip(${$kdxmbndug});foreach(${${"GLOBALS"}["lgetjhr"]} as${$jjelgwht}){${"GLOBALS"}["sqcvoanch"]="index";$gjkwwicgxrh="index";${"GLOBALS"}["nltdlfhd"]="id_product";$mwbrjwcys="sql_custom_data";$fpxwqoa="first";$vjwjjxyltohy="first";${"GLOBALS"}["tcrqdcbrin"]="varName";${$gjkwwicgxrh}=${${"GLOBALS"}["sxhhbypq"]}[${${"GLOBALS"}["richmfqvmqb"]}];${${"GLOBALS"}["tcrqdcbrin"]}="textFields_".(int)($prod->id)."_".(int)(${${"GLOBALS"}["sqcvoanch"]});${${"GLOBALS"}["ocnibkywhpo"]}=self::get_requred_fields_15x(${${"GLOBALS"}["nltdlfhd"]},${${"GLOBALS"}["mdwgcikb"]},_CUSTOMIZE_TEXTFIELD_,${${"GLOBALS"}["fkeeniy"]});if(!${$vjwjjxyltohy})${$mwbrjwcys}.=",";else${$fpxwqoa}=false;${${"GLOBALS"}["qoorppiynvcy"]}.="(".(int)${${"GLOBALS"}["nhqcywd"]}.", "._CUSTOMIZE_TEXTFIELD_.", ".(int)${${"GLOBALS"}["fkeeniy"]}.", '".pSQL(${${"GLOBALS"}["ocnibkywhpo"]})."')";}}if(!${${"GLOBALS"}["qhsbnood"]})Db::getInstance(_PS_USE_SQL_SLAVE_)->Execute(${${"GLOBALS"}["qoorppiynvcy"]});}private static function update_order_state($id_order,$newOrderStatusId){$abekgzrrthf="history";$yctyoodssr="newOrderStatusId";${"GLOBALS"}["llktqbsz"]="carrier";${"GLOBALS"}["nbrxmvmqeg"]="templateVars";${$abekgzrrthf}=new OrderHistory();$history->id_order=(int)${${"GLOBALS"}["mjctzd"]};$history->id_employee=0;$ipyhbnij="order";$history->changeIdOrderState((int)(${$yctyoodssr}),intval(${${"GLOBALS"}["mjctzd"]}));${$ipyhbnij}=new Order((int)${${"GLOBALS"}["mjctzd"]});${${"GLOBALS"}["llktqbsz"]}=new Carrier((int)($order->id_carrier),(int)($order->id_lang));${${"GLOBALS"}["hdtkvvokd"]}=array();${"GLOBALS"}["dlpxeb"]="templateVars";if($history->id_order_state==Configuration::getGlobalValue("PS_OS_SHIPPING")AND$order->shipping_number)${${"GLOBALS"}["hdtkvvokd"]}=array("{followup}"=>str_replace("@",$order->shipping_number,$carrier->url));elseif($history->id_order_state==Configuration::getGlobalValue("PS_OS_CHEQUE"))${${"GLOBALS"}["dlpxeb"]}=array("{cheque_name}"=>(Configuration::getGlobalValue("CHEQUE_NAME")?Configuration::getGlobalValue("CHEQUE_NAME"):""),"{cheque_address_html}"=>(Configuration::getGlobalValue("CHEQUE_ADDRESS")?nl2br(Configuration::getGlobalValue("CHEQUE_ADDRESS")):""));elseif($history->id_order_state==Configuration::getGlobalValue("PS_OS_BANKWIRE"))${${"GLOBALS"}["hdtkvvokd"]}=array("{bankwire_owner}"=>(Configuration::getGlobalValue("BANK_WIRE_OWNER")?Configuration::getGlobalValue("BANK_WIRE_OWNER"):""),"{bankwire_details}"=>(Configuration::getGlobalValue("BANK_WIRE_DETAILS")?nl2br(Configuration::getGlobalValue("BANK_WIRE_DETAILS")):""),"{bankwire_address}"=>(Configuration::getGlobalValue("BANK_WIRE_ADDRESS")?nl2br(Configuration::getGlobalValue("BANK_WIRE_ADDRESS")):""));$history->addWithemail(true,${${"GLOBALS"}["nbrxmvmqeg"]});}public static function is_token_payment_underway($id_cart){${"GLOBALS"}["xdqupwyc"]="id_cart";@session_start();${${"GLOBALS"}["eqlxnfdhqhof"]}=self::get_session_key(${${"GLOBALS"}["xdqupwyc"]});return(isset($_SESSION[${${"GLOBALS"}["eqlxnfdhqhof"]}])AND$_SESSION[${${"GLOBALS"}["eqlxnfdhqhof"]}]==1);}public static function get_session_key($id_cart){${"GLOBALS"}["uciwpstrjad"]="id_cart";return"SESSION_TOKEN_PROCESSING_MARKER_".intval(${${"GLOBALS"}["uciwpstrjad"]});}public static function set_token_payment_processing_marker($id_cart,$turn_on){${"GLOBALS"}["qplbosii"]="key";${"GLOBALS"}["ycprafn"]="id_cart";@session_start();${${"GLOBALS"}["qplbosii"]}=self::get_session_key(${${"GLOBALS"}["ycprafn"]});if(${${"GLOBALS"}["ekvluum"]})$_SESSION[${${"GLOBALS"}["eqlxnfdhqhof"]}]=1;else unset($_SESSION[${${"GLOBALS"}["eqlxnfdhqhof"]}]);}public static function replace_amount2pay($templateVars){${"GLOBALS"}["fjjvrdwl"]="order";${"GLOBALS"}["tsfkfafiomwp"]="order";$tscmmsw="id_order";$oyodsbgqmyj="tokens_value";$gwfmqcmpw="total_paid";${"GLOBALS"}["chwionyol"]="templateVars";${"GLOBALS"}["kvctxtvsb"]="total_paid";${"GLOBALS"}["kmrtxdjxlkl"]="templateVars";${$tscmmsw}=AgileSellerManager::get_order_id_from_maildata(${${"GLOBALS"}["hdtkvvokd"]});if(${${"GLOBALS"}["mjctzd"]}<=0)return${${"GLOBALS"}["hdtkvvokd"]};${"GLOBALS"}["uapsfe"]="templateVars";${"GLOBALS"}["hdlrwxinuuc"]="total_paid";${${"GLOBALS"}["fjjvrdwl"]}=new Order(${${"GLOBALS"}["mjctzd"]});${"GLOBALS"}["vndfuzcgie"]="id_order";$rnzcqyibxbhd="total_paid";if(!Validate::isLoadedObject(${${"GLOBALS"}["tsfkfafiomwp"]}))return${${"GLOBALS"}["kmrtxdjxlkl"]};${${"GLOBALS"}["kaxxbfgbsjs"]}=AgilePrepaidCredit::tokens_used_in_cart($order->id_cart);if(${${"GLOBALS"}["kaxxbfgbsjs"]}<=0)return${${"GLOBALS"}["uapsfe"]};${$oyodsbgqmyj}=AgilePrepaidCredit::ConvertTokens2Price(${${"GLOBALS"}["kaxxbfgbsjs"]},$order->id_currency);${${"GLOBALS"}["kvctxtvsb"]}=floatval(Db::getInstance()->getValue("SELECT total_paid FROM "._DB_PREFIX_."orders WHERE id_order=".${${"GLOBALS"}["vndfuzcgie"]}));${${"GLOBALS"}["ybhsfu"]}=${${"GLOBALS"}["ybhsfu"]}-${${"GLOBALS"}["xtbiuduhxm"]};if(${$gwfmqcmpw}<=0)${${"GLOBALS"}["hdlrwxinuuc"]}=0;${${"GLOBALS"}["hdtkvvokd"]}["{total_paid}"]=Tools::displayPrice(${$rnzcqyibxbhd},new Currency($order->id_currency));return${${"GLOBALS"}["chwionyol"]};}public static function isPaymentErrorCausedByTokens($templateVars){${"GLOBALS"}["qfvsvqwzngax"]="tokens_used_in_cart";${"GLOBALS"}["weysddeouotw"]="templateVars";${${"GLOBALS"}["mjctzd"]}=AgileSellerManager::get_order_id_from_maildata(${${"GLOBALS"}["weysddeouotw"]});if(${${"GLOBALS"}["mjctzd"]}<=0)return 0;${${"GLOBALS"}["kzybiq"]}=new Order(${${"GLOBALS"}["mjctzd"]});if(!Validate::isLoadedObject(${${"GLOBALS"}["kzybiq"]}))return 0;${${"GLOBALS"}["qfvsvqwzngax"]}=AgilePrepaidCredit::tokens_used_in_cart($order->id_cart);if(${${"GLOBALS"}["kaxxbfgbsjs"]}>0){$oubxgfrmmydl="id_order";return${$oubxgfrmmydl};}return 0;}public static function setStatusPaymentAccepted($id_order){$wrydhbbwysd="order_state";${$wrydhbbwysd}=new OrderState(_PS_OS_PAYMENT_);${"GLOBALS"}["sokgfzkvb"]="history";$lvfumlrc="id_order";${${"GLOBALS"}["sokgfzkvb"]}=new OrderHistory();$history->id_order=${${"GLOBALS"}["mjctzd"]};$history->id_employee=0;$history->changeIdOrderState($order_state->id,${$lvfumlrc});$history->addWithemail(true);${${"GLOBALS"}["nytvzvadm"]}="DELETE FROM "._DB_PREFIX_."order_history WHERE id_order=".(int)${${"GLOBALS"}["mjctzd"]}." AND id_order_state="._PS_OS_ERROR_;Db::getInstance()->Execute(${${"GLOBALS"}["nytvzvadm"]});}public static function adjustOrderForTokens($id_order){${"GLOBALS"}["cinmrmgpeiki"]="order";${"GLOBALS"}["uremvtppgng"]="total_discounts_tax_incl";$ewxwgabwsu="total_paid_tax_incl";${"GLOBALS"}["xbngqlvqu"]="order";$hgibacpnto="id_order";if(intval(${${"GLOBALS"}["mjctzd"]})<=0)return;${${"GLOBALS"}["cinmrmgpeiki"]}=new Order(${$hgibacpnto});if(!Validate::isLoadedObject(${${"GLOBALS"}["xbngqlvqu"]}))return;${"GLOBALS"}["xrqojuqwjiep"]="tokens_used_in_cart";${${"GLOBALS"}["xrqojuqwjiep"]}=AgilePrepaidCredit::tokens_used_in_cart($order->id_cart);${"GLOBALS"}["tiujfrrc"]="tokens_value";${${"GLOBALS"}["xtbiuduhxm"]}=AgilePrepaidCredit::ConvertTokens2Price(${${"GLOBALS"}["kaxxbfgbsjs"]},$order->id_currency);if(${${"GLOBALS"}["tiujfrrc"]}<=0)return;${${"GLOBALS"}["xpyblkj"]}=new Cart($order->id_cart);${${"GLOBALS"}["kbbebsgvgkcs"]}=$theCart->getOrderTotal(true,Cart::ONLY_DISCOUNTS);${${"GLOBALS"}["tiofkusptwk"]}=$theCart->getOrderTotal(false,Cart::ONLY_DISCOUNTS);$mfnkijqsegs="total_paid_tax_excl";${"GLOBALS"}["pyllgcyxckt"]="tokens_value";${$ewxwgabwsu}=$theCart->getOrderTotal(true,Cart::BOTH);${$mfnkijqsegs}=$theCart->getOrderTotal(false,Cart::BOTH);if(${${"GLOBALS"}["uremvtppgng"]}>=${${"GLOBALS"}["pyllgcyxckt"]}){$gnskzkfggy="tokens_value";${"GLOBALS"}["rmcvuxnnqwm"]="tokens_value";${"GLOBALS"}["mrbtfgqtxq"]="total_paid_tax_incl";${${"GLOBALS"}["kbbebsgvgkcs"]}-=${$gnskzkfggy};${${"GLOBALS"}["tiofkusptwk"]}-=${${"GLOBALS"}["xtbiuduhxm"]};$wmbboloypozr="total_paid_tax_excl";${${"GLOBALS"}["mrbtfgqtxq"]}+=${${"GLOBALS"}["rmcvuxnnqwm"]};${$wmbboloypozr}+=${${"GLOBALS"}["xtbiuduhxm"]};$vkirfugspkqi="sql";${$vkirfugspkqi}="UPDATE "._DB_PREFIX_."orders SET total_discounts=$total_discounts_tax_incl, total_discounts_tax_excl=$total_discounts_tax_excl, total_discounts_tax_incl=$total_discounts_tax_incl ,total_paid_tax_excl=$total_paid_tax_excl,total_paid_tax_incl=$total_paid_tax_incl,total_paid=$total_paid_tax_incl  WHERE id_order=".$order->id;Db::getInstance()->Execute(${${"GLOBALS"}["nytvzvadm"]});}if($order->current_state==_PS_OS_ERROR_){AgilePrepaidCredit::setStatusPaymentAccepted(${${"GLOBALS"}["mjctzd"]});$ppwkhjjvr="paymentmodule";${"GLOBALS"}["qnkowivlnwlp"]="id_order";${$ppwkhjjvr}=new AgilePrepaidCredit();$paymentmodule->sendOrderConfirmationEmail(${${"GLOBALS"}["qnkowivlnwlp"]});}}public static function checkOrderInvoicePayment($id_order){${"GLOBALS"}["xbwuywv"]="id_order";$xdnpcocpwvk="order";$ydwkwym="sql";${"GLOBALS"}["wyygtoqvwpgg"]="paypalPayment";${"GLOBALS"}["gkcjrwwe"]="sql";${"GLOBALS"}["bthevbphr"]="id_order";${"GLOBALS"}["oolmwccldj"]="id_order_invoice";${"GLOBALS"}["ccolcqu"]="sql";${"GLOBALS"}["jpdopyckgmf"]="order";${"GLOBALS"}["gchxemw"]="id_order_invoice";${"GLOBALS"}["qrdetftwsq"]="id_order";$zilelvkgq="sql";${$xdnpcocpwvk}=new Order(${${"GLOBALS"}["xbwuywv"]});$tvkcmebgm="id_order_invoice";${"GLOBALS"}["xnfcvjyymb"]="sql";if(!Validate::isLoadedObject(${${"GLOBALS"}["jpdopyckgmf"]}))return;${${"GLOBALS"}["nytvzvadm"]}="SELECT id_order_invoice FROM "._DB_PREFIX_."order_invoice WHERE id_order=".(int)${${"GLOBALS"}["qrdetftwsq"]};${"GLOBALS"}["msyjzsppfg"]="tokenPayment";${${"GLOBALS"}["gchxemw"]}=(int)Db::getInstance()->getValue(${${"GLOBALS"}["ccolcqu"]});if(${$tvkcmebgm}<=0)return;${${"GLOBALS"}["gkcjrwwe"]}="SELECT * FROM  "._DB_PREFIX_."order_payment WHERE  transaction_id ='agileprepaidcredit' AND order_reference ='".$order->reference."'";${${"GLOBALS"}["hhrhkxfvedgq"]}=Db::getInstance()->getRow(${${"GLOBALS"}["xnfcvjyymb"]});if((int)${${"GLOBALS"}["hhrhkxfvedgq"]}["id_order_payment"]<=0)return;$kmaytnwnthh="id_order";$lauvftjgpav="sql";${$zilelvkgq}="SELECT * FROM  "._DB_PREFIX_."order_payment WHERE  IFNULL(transaction_id,'') != 'agileprepaidcredit' AND IFNULL(transaction_id,'') != '' AND order_reference ='".$order->reference."'";${${"GLOBALS"}["pkrvmdzpadp"]}=Db::getInstance()->getRow(${${"GLOBALS"}["nytvzvadm"]});if((int)${${"GLOBALS"}["pkrvmdzpadp"]}["id_order_payment"]<=0)return;${${"GLOBALS"}["nytvzvadm"]}="DELETE FROM "._DB_PREFIX_."order_payment WHERE  IFNULL(transaction_id,'') ='' AND LOWER(payment_method) like '%paypal%' AND order_reference ='".$order->reference."'";Db::getInstance()->Execute(${${"GLOBALS"}["nytvzvadm"]});${$ydwkwym}="DELETE FROM  "._DB_PREFIX_."order_invoice_payment WHERE id_order=".(int)${$kmaytnwnthh};Db::getInstance()->Execute(${${"GLOBALS"}["nytvzvadm"]});$wogxgdtp="sql";${$lauvftjgpav}="INSERT INTO "._DB_PREFIX_."order_invoice_payment (id_order_invoice, id_order_payment, id_order) values (".${${"GLOBALS"}["jgchehyjp"]}.",".(int)${${"GLOBALS"}["msyjzsppfg"]}["id_order_payment"].",".(int)${${"GLOBALS"}["bthevbphr"]}.")";Db::getInstance()->Execute(${${"GLOBALS"}["nytvzvadm"]});${${"GLOBALS"}["nytvzvadm"]}="INSERT INTO "._DB_PREFIX_."order_invoice_payment (id_order_invoice, id_order_payment, id_order) values (".${${"GLOBALS"}["oolmwccldj"]}.",".(int)${${"GLOBALS"}["wyygtoqvwpgg"]}["id_order_payment"].",".(int)${${"GLOBALS"}["mjctzd"]}.")";Db::getInstance()->Execute(${$wogxgdtp});}public static function adjustOrderPaymentAmount($id_order,$modulename){$luoyquumhdrk="modulename";$gjipilwnbhkz="id_order";if(${$gjipilwnbhkz}<=0)return;${"GLOBALS"}["wnfelwfcues"]="modulename";if(${$luoyquumhdrk}=="agilepaypalparallel"||${${"GLOBALS"}["wnfelwfcues"]}=="agilepaypaladaptive"){${"GLOBALS"}["vmomhjvkn"]="sql";$ocxllglmh="paidByTokens";${${"GLOBALS"}["fpkuqpvl"]}=new Order(${${"GLOBALS"}["mjctzd"]});${${"GLOBALS"}["vmomhjvkn"]}="SELECT amount FROM  "._DB_PREFIX_."order_payment WHERE  transaction_id = 'agileprepaidcredit' AND order_reference ='".$ord->reference."'";${"GLOBALS"}["vlzvmv"]="sql";${$ocxllglmh}=(float)Db::getInstance()->getValue(${${"GLOBALS"}["vlzvmv"]});$lymkdf="paidByTokens";if(${$lymkdf}>0){$qcqfwlccrxc="sql";$lhfrtiplvxms="paidByTokens";${$qcqfwlccrxc}="UPDATE  "._DB_PREFIX_."order_payment set amount =  amount - ".${$lhfrtiplvxms}." WHERE transaction_id != 'agileprepaidcredit' AND order_reference ='".$ord->reference."'";Db::getInstance()->Execute(${${"GLOBALS"}["nytvzvadm"]});}}}public function process_mycredit(){global$cookie,$smarty;${"GLOBALS"}["avwaarpbqtk"]="mycredit";${${"GLOBALS"}["jsoosoid"]}=array();${${"GLOBALS"}["cbxeyblhch"]}=0;$nvsdwzeklv="pinrec";${${"GLOBALS"}["rmokmhhd"]}="";${$nvsdwzeklv}=array();if(Tools::isSubmit("submitPIN")){$xcdrbfplbr="pin_code";$ulybhtt="pin_code";$xhcrutwvjj="error";${$xcdrbfplbr}=Tools::getValue("pin_code");if(strlen(${$ulybhtt})<12)${$xhcrutwvjj}[]=Tools::displayError("Invalid PIN code");else{$hpulutyp="pinrec";${"GLOBALS"}["rcfrpsghucml"]="pinrec";${"GLOBALS"}["giaglmv"]="pin_code";${$hpulutyp}[]=RandomPin::getValidPin(${${"GLOBALS"}["giaglmv"]});if(!sizeof(${${"GLOBALS"}["hjeiiyuiwdr"]})||empty(${${"GLOBALS"}["rcfrpsghucml"]}[0]))${${"GLOBALS"}["jsoosoid"]}[]=Tools::displayError("Invalid PIN code");}if(!sizeof(${${"GLOBALS"}["jsoosoid"]})&&!empty(${${"GLOBALS"}["hjeiiyuiwdr"]}[0])){${"GLOBALS"}["kuwdfwag"]="id_agile_randompin";$oyzftijmv="ret1";$ysuxmcusb="cc";$abaiifccr="ret1";${$ysuxmcusb}=new CustomerCredit();$cc->date_add=date("Y-m-d H:i:s");$cc->id_customer=intval($cookie->id_customer);$jaqtatv="pin_code";$yhiuivgkdcfo="ret2";$cc->units=AgilePrepaidCredit::ConvertPrice2Tokens((int)Configuration::get("PS_CURRENCY_DEFAULT"),${${"GLOBALS"}["hjeiiyuiwdr"]}[0]["pin_value"]);$cc->id_reason=AgilePrepaidCredit::CREDIT_REASON_PURCHASE;$cc->memo=$this->l('PIN code:').${$jaqtatv};${$oyzftijmv}=$cc->save();${${"GLOBALS"}["kuwdfwag"]}=intval(${${"GLOBALS"}["hjeiiyuiwdr"]}[0]["id_agile_randompin"]);${${"GLOBALS"}["ldegzlkewhx"]}=new RandomPin(${${"GLOBALS"}["lmedvii"]});$rp->date_used=date("Y-m-d H:i:s");$fvfqunytsdl="ret2";$rp->id_customer=intval($cookie->id_customer);${$fvfqunytsdl}=$rp->update();if(${$abaiifccr}&&${$yhiuivgkdcfo}){${${"GLOBALS"}["cbxeyblhch"]}=1;}else{${${"GLOBALS"}["jsoosoid"]}[]=Tools::displayError("impossible to update information");}}}${${"GLOBALS"}["avwaarpbqtk"]}=CustomerCredit::getCreditsByCustomerID((intval($cookie->id_customer)));$smarty->assign(array("merrors"=>${${"GLOBALS"}["jsoosoid"]},"mycredit"=>${${"GLOBALS"}["swrxphdiynx"]},"confirmation"=>${${"GLOBALS"}["cbxeyblhch"]},"pin_code"=>${${"GLOBALS"}["rmokmhhd"]}));}private function getModuleLinkedCategory(){$dibweyo="id_cate";${"GLOBALS"}["tgemsuo"]="category";global$cookie;include_once(_PS_ROOT_DIR_."/modules/agileprepaidcredit/agileprepaidcredit.php");${$dibweyo}=(int)Configuration::getGlobalValue("AGILE_PCREDIT_CID");$hhjltcmxnae="imageurl";${"GLOBALS"}["tpxyvbqkzu"]="category";${${"GLOBALS"}["tpxyvbqkzu"]}=new Category(${${"GLOBALS"}["ggspfdnjdxq"]});if(Validate::isLoadedObject(${${"GLOBALS"}["tsaegnnprl"]}))return${${"GLOBALS"}["tgemsuo"]};${${"GLOBALS"}["tsaegnnprl"]}=AgileHelper::createCategoryByName("Tokens");${$hhjltcmxnae}=Tools::getShopDomain(true,true).__PS_BASE_URI__."/modules/agileprepaidcredit/img/tokens-large.jpg";if(!AgileHelper::addCategoryImage($category->id,${${"GLOBALS"}["nhqysdxy"]})){$this->_errors[]=$this->l('Failed to add a image for Tokens category.');}$this->prepareTokensProduct($category->id,"200 Tokens",200);$this->prepareTokensProduct($category->id,"1000 Tokens",1000);return${${"GLOBALS"}["tsaegnnprl"]};}private function prepareTokensProduct($id_category,$name,$price){${"GLOBALS"}["lnpcgpk"]="product";$xqzxzfl="product";$gomlljqqer="price";${$xqzxzfl}=new Product();${${"GLOBALS"}["lnpcgpk"]}=AgileHelper::createProductWithBasics(${${"GLOBALS"}["gertdzqqgem"]},${${"GLOBALS"}["buezcngaesyc"]},${$gomlljqqer});${${"GLOBALS"}["nhqysdxy"]}=Tools::getShopDomain(true,true).__PS_BASE_URI__."/modules/agileprepaidcredit/img/tokens-large.jpg";AgileHelper::addProductImage($product->id,${${"GLOBALS"}["nhqysdxy"]});return${${"GLOBALS"}["joschbirchk"]};}public function getL($key){${"GLOBALS"}["eymflziabnz"]="translations";$wqvkbwbefbp="translations";${$wqvkbwbefbp}=array("Paid by token"=>$this->l('Paid by token'),"Agile Token Payment"=>$this->l('Agile Token Payment'),"Pay order by Token"=>$this->l('Pay order by Token'));${"GLOBALS"}["fsozyqbb"]="key";${"GLOBALS"}["coxswgfwhj"]="translations";if(isset(${${"GLOBALS"}["eymflziabnz"]}[${${"GLOBALS"}["eqlxnfdhqhof"]}]))return${${"GLOBALS"}["coxswgfwhj"]}[${${"GLOBALS"}["eqlxnfdhqhof"]}];return${${"GLOBALS"}["fsozyqbb"]};}public function hookDisplayPayment($params){if(!$this->active)return;${${"GLOBALS"}["unsaohcp"]}=self::GetTokenBalance($this->context->customer->id);if(${${"GLOBALS"}["unsaohcp"]}<=0)return;$this->prepareToekenApplyFormData(true);return$this->display(__FILE__,"views/templates/hook/usecreditform.tpl");}public function validateOrder($id_cart,$id_order_state,$amount_paid,$payment_method='Unknown',$message=null,$extra_vars=array(),$currency_special=null,$dont_touch_amount=false,$secure_key=false,Shop$shop=null){$bgaqqsqkw="extra_vars";${"GLOBALS"}["eufmrrwoyrc"]="id_order_state";${"GLOBALS"}["drojskvjpcl"]="shop";${"GLOBALS"}["thqygzfkt"]="currency_special";${"GLOBALS"}["dgptydi"]="message";${$bgaqqsqkw}["transaction_id"]="agileprepaidcredit";${${"GLOBALS"}["byjcxkywgq"]}=parent::validateOrder(${${"GLOBALS"}["iicdrbtj"]},${${"GLOBALS"}["eufmrrwoyrc"]},${${"GLOBALS"}["wlrjckorju"]},$this->getL("Paid by token"),${${"GLOBALS"}["dgptydi"]},${${"GLOBALS"}["tmjqubolgf"]},${${"GLOBALS"}["thqygzfkt"]},${${"GLOBALS"}["qibqmayfwgkx"]},${${"GLOBALS"}["wvpuadpetdk"]},${${"GLOBALS"}["drojskvjpcl"]});return${${"GLOBALS"}["byjcxkywgq"]};}public function sendOrderConfirmationEmail($id_order){${"GLOBALS"}["otjupuxfmb"]="cart_rules";$kwtlkenx="order";${"GLOBALS"}["eljirwiju"]="customer";$smvwlvckvju="currency";${"GLOBALS"}["ducigascizw"]="key";global$smarty;$ghqqww="currency";$mhmxenejob="data";${"GLOBALS"}["tyijcgnurlj"]="products";${"GLOBALS"}["hyhsoythxfmg"]="cart";${"GLOBALS"}["spltudowf"]="products_list";${$kwtlkenx}=new Order(${${"GLOBALS"}["mjctzd"]});${${"GLOBALS"}["eljirwiju"]}=new Customer($order->id_customer);${"GLOBALS"}["iixnsk"]="virtual_product";$qhmltmvo="file_attachement";${$ghqqww}=new Currency($order->id_currency);${${"GLOBALS"}["hyhsoythxfmg"]}=new Cart($order->id_cart);${"GLOBALS"}["sjltyw"]="cart_rules_list";${${"GLOBALS"}["tyijcgnurlj"]}=$cart->getProducts();${"GLOBALS"}["ijcelwyw"]="invoice_state";$faykovtn="currency";$nbwtkccij="products_list";${${"GLOBALS"}["otjupuxfmb"]}=$cart->getCartRules();${${"GLOBALS"}["iwdeooik"]}=new Address($order->id_address_invoice);${${"GLOBALS"}["tnuplwrvstwo"]}=new Address($order->id_address_delivery);${"GLOBALS"}["fahmequowa"]="delivery";${${"GLOBALS"}["xccvdnjvg"]}=$delivery->id_state?new State($delivery->id_state):false;${${"GLOBALS"}["ijcelwyw"]}=$invoice->id_state?new State($invoice->id_state):false;${"GLOBALS"}["gughpbnri"]="invoice";${${"GLOBALS"}["eoscahu"]}=new Carrier($order->id_carrier);${$nbwtkccij}="";${${"GLOBALS"}["rrmdtoynitd"]}=true;foreach(${${"GLOBALS"}["vmvckqp"]} as${${"GLOBALS"}["ducigascizw"]}=>${${"GLOBALS"}["joschbirchk"]}){$jmtheuunqfh="product";$deyxhikuyi="customization_quantity";${"GLOBALS"}["jdunpuoc"]="product";$cubzjzdjxfdm="customized_datas";$rlgorciyst="product";$oppwgfq="product";${"GLOBALS"}["efbyrnmm"]="product";$iouvcjgk="product";$idfxulluqwj="customization_quantity";$uwprvr="customization_quantity";$tetgihjerk="price";${"GLOBALS"}["glxywwgxxjqw"]="product";${"GLOBALS"}["hvxozjgwtb"]="price_wt";$yxxqgrgz="price_wt";${$tetgihjerk}=Product::getPriceStatic((int)${${"GLOBALS"}["joschbirchk"]}["id_product"],false,(${$jmtheuunqfh}["id_product_attribute"]?(int)${${"GLOBALS"}["joschbirchk"]}["id_product_attribute"]:null),6,null,false,true,${${"GLOBALS"}["jdunpuoc"]}["cart_quantity"],false,(int)$order->id_customer,(int)$order->id_cart,(int)$order->{Configuration::get("PS_TAX_ADDRESS_TYPE")});${"GLOBALS"}["qnzosys"]="price";${$yxxqgrgz}=Product::getPriceStatic((int)${${"GLOBALS"}["joschbirchk"]}["id_product"],true,(${${"GLOBALS"}["joschbirchk"]}["id_product_attribute"]?(int)${$rlgorciyst}["id_product_attribute"]:null),2,null,false,true,${${"GLOBALS"}["glxywwgxxjqw"]}["cart_quantity"],false,(int)$order->id_customer,(int)$order->id_cart,(int)$order->{Configuration::get("PS_TAX_ADDRESS_TYPE")});$xdyfhoa="virtual_product";${$idfxulluqwj}=0;${"GLOBALS"}["ksicbgl"]="currency";${${"GLOBALS"}["iyoehwfgqn"]}=Product::getAllCustomizedDatas((int)$order->id_cart);$msothpkj="products_list";if(isset(${$cubzjzdjxfdm}[${${"GLOBALS"}["joschbirchk"]}["id_product"]][${${"GLOBALS"}["joschbirchk"]}["id_product_attribute"]])){$lkturo="customization_text";${"GLOBALS"}["bwidvqw"]="product";${"GLOBALS"}["whbtrcksbbz"]="product";$uufsvkd="customization_text";$kmfhbifetnu="currency";${"GLOBALS"}["cicaasltx"]="customization_text";$fgeyedu="product";$hsuolecwrvdn="customization";$vacpqwdr="customization_text";${${"GLOBALS"}["cicaasltx"]}="";foreach(${${"GLOBALS"}["iyoehwfgqn"]}[${${"GLOBALS"}["joschbirchk"]}["id_product"]][${${"GLOBALS"}["joschbirchk"]}["id_product_attribute"]][$order->id_address_delivery]as${$hsuolecwrvdn}){$colfustdge="customization_text";${"GLOBALS"}["uoclgjcuj"]="customization_text";if(isset(${${"GLOBALS"}["vsunrh"]}["datas"][Product::CUSTOMIZE_TEXTFIELD])){$yyxyvgu="text";foreach(${${"GLOBALS"}["vsunrh"]}["datas"][Product::CUSTOMIZE_TEXTFIELD]as${$yyxyvgu})${${"GLOBALS"}["owhhmmma"]}.=${${"GLOBALS"}["wbxgzd"]}["name"].": ".${${"GLOBALS"}["wbxgzd"]}["value"]."<br />";}${"GLOBALS"}["zzmdhoqzso"]="customization";if(isset(${${"GLOBALS"}["vsunrh"]}["datas"][Product::CUSTOMIZE_FILE]))${${"GLOBALS"}["uoclgjcuj"]}.=sprintf(Tools::displayError("%d image(s)"),count(${${"GLOBALS"}["zzmdhoqzso"]}["datas"][Product::CUSTOMIZE_FILE]))."<br />";${$colfustdge}.="---<br />";}$mahxnlr="product";$rfjwydzvu="currency";${"GLOBALS"}["fycoinj"]="price_wt";${$vacpqwdr}=rtrim(${${"GLOBALS"}["owhhmmma"]},"---<br />");${"GLOBALS"}["pmdoxiuehpp"]="product";${${"GLOBALS"}["btdvybwbsdi"]}=(int)${$mahxnlr}["customization_quantity"];${${"GLOBALS"}["geonzodiev"]}.="<tr style=\"background-color: ".(${${"GLOBALS"}["eqlxnfdhqhof"]}%2?"#DDE2E6":"#EBECEE").";">
					<td style="padding: 0.6em 0.4em;width: 15%;">".${$fgeyedu}["reference"]."</td>
					<td style=\"padding: 0.6em 0.4em;width: 30%;"><strong>".${${"GLOBALS"}["whbtrcksbbz"]}["name"].(isset(${${"GLOBALS"}["pmdoxiuehpp"]}["attributes"])?" - ".${${"GLOBALS"}["bwidvqw"]}["attributes"]:"")." - ".Tools::displayError("Customized").(!empty(${$lkturo})?" - ".${$uufsvkd}:"")."</strong></td>
					<td style="padding: 0.6em 0.4em; width: 20%;">".Tools::displayPrice(Product::getTaxCalculationMethod()==PS_TAX_EXC?Tools::ps_round(${${"GLOBALS"}["ixxeushy"]},2):${${"GLOBALS"}["ehetdnewmoi"]},${$rfjwydzvu},false)."</td>
					<td style=\"padding: 0.6em 0.4em; width: 15%;">".${${"GLOBALS"}["btdvybwbsdi"]}."</td>
					<td style="padding: 0.6em 0.4em; width: 20%;\">".Tools::displayPrice(${${"GLOBALS"}["btdvybwbsdi"]}*(Product::getTaxCalculationMethod()==PS_TAX_EXC?Tools::ps_round(${${"GLOBALS"}["ixxeushy"]},2):${${"GLOBALS"}["fycoinj"]}),${$kmfhbifetnu},false)."</td>
				</tr>";}if(!${${"GLOBALS"}["btdvybwbsdi"]}||(int)${${"GLOBALS"}["joschbirchk"]}["cart_quantity"]>${${"GLOBALS"}["btdvybwbsdi"]})${$msothpkj}.="<tr style=\"background-color: ".(${${"GLOBALS"}["eqlxnfdhqhof"]}%2?"#DDE2E6":"#EBECEE").";">
					<td style=\"padding: 0.6em 0.4em;width: 15%;">".${${"GLOBALS"}["joschbirchk"]}["reference"]."</td>
					<td style=\"padding: 0.6em 0.4em;width: 30%;"><strong>".${${"GLOBALS"}["joschbirchk"]}["name"].(isset(${${"GLOBALS"}["efbyrnmm"]}["attributes"])?" - ".${$oppwgfq}["attributes"]:"")."</strong></td>
					<td style=\"padding: 0.6em 0.4em; width: 20%;\">".Tools::displayPrice(Product::getTaxCalculationMethod()==PS_TAX_EXC?Tools::ps_round(${${"GLOBALS"}["ixxeushy"]},2):${${"GLOBALS"}["hvxozjgwtb"]},${${"GLOBALS"}["dkoknnkf"]},false)."</td>
					<td style=\"padding: 0.6em 0.4em; width: 15%;\">".((int)${$iouvcjgk}["cart_quantity"]-${$deyxhikuyi})."</td>
					<td style=\"padding: 0.6em 0.4em; width: 20%;\">".Tools::displayPrice(((int)${${"GLOBALS"}["joschbirchk"]}["cart_quantity"]-${$uwprvr})*(Product::getTaxCalculationMethod()==PS_TAX_EXC?Tools::ps_round(${${"GLOBALS"}["qnzosys"]},2):${${"GLOBALS"}["ehetdnewmoi"]}),${${"GLOBALS"}["ksicbgl"]},false)."</td>
				</tr>";if(!${${"GLOBALS"}["joschbirchk"]}["is_virtual"])${$xdyfhoa}&=false;}${"GLOBALS"}["muyrrnjen"]="currency";${"GLOBALS"}["pduejft"]="invoice";${$mhmxenejob}=array("{firstname}"=>$customer->firstname,"{lastname}"=>$customer->lastname,"{email}"=>$customer->email,"{delivery_block_txt}"=>$this->_getFormatedAddress(${${"GLOBALS"}["fahmequowa"]},"
"),"{invoice_block_txt}"=>$this->_getFormatedAddress(${${"GLOBALS"}["pduejft"]},"
"),"{delivery_block_html}"=>$this->_getFormatedAddress(${${"GLOBALS"}["tnuplwrvstwo"]},"<br />",array("firstname"=>"<span style="font-weight:bold;">%s</span>","lastname"=>"<span style=\"font-weight:bold;">%s</span>")),"{invoice_block_html}"=>$this->_getFormatedAddress(${${"GLOBALS"}["gughpbnri"]},"<br />",array("firstname"=>"<span style="font-weight:bold;">%s</span>","lastname"=>"<span style="font-weight:bold;\">%s</span>")),"{delivery_company}"=>$delivery->company,"{delivery_firstname}"=>$delivery->firstname,"{delivery_lastname}"=>$delivery->lastname,"{delivery_address1}"=>$delivery->address1,"{delivery_address2}"=>$delivery->address2,"{delivery_city}"=>$delivery->city,"{delivery_postal_code}"=>$delivery->postcode,"{delivery_country}"=>$delivery->country,"{delivery_state}"=>$delivery->id_state?$delivery_state->name:"","{delivery_phone}"=>($delivery->phone)?$delivery->phone:$delivery->phone_mobile,"{delivery_other}"=>$delivery->other,"{invoice_company}"=>$invoice->company,"{invoice_vat_number}"=>$invoice->vat_number,"{invoice_firstname}"=>$invoice->firstname,"{invoice_lastname}"=>$invoice->lastname,"{invoice_address2}"=>$invoice->address2,"{invoice_address1}"=>$invoice->address1,"{invoice_city}"=>$invoice->city,"{invoice_postal_code}"=>$invoice->postcode,"{invoice_country}"=>$invoice->country,"{invoice_state}"=>$invoice->id_state?$invoice_state->name:"","{invoice_phone}"=>($invoice->phone)?$invoice->phone:$invoice->phone_mobile,"{invoice_other}"=>$invoice->other,"{order_name}"=>$order->getUniqReference(),"{date}"=>Tools::displayDate(date("Y-m-d H:i:s"),null),"{carrier}"=>(${${"GLOBALS"}["iixnsk"]}?$this->getL("No Carrier"):$carrier->name),"{payment}"=>Tools::substr($order->payment,0,32),"{products}"=>$this->formatProductAndVoucherForEmail(${${"GLOBALS"}["spltudowf"]}),"{discounts}"=>$this->formatProductAndVoucherForEmail(${${"GLOBALS"}["sjltyw"]}),"{total_paid}"=>Tools::displayPrice($order->total_paid,${${"GLOBALS"}["dkoknnkf"]},false),"{total_products}"=>Tools::displayPrice($order->total_paid-$order->total_shipping-$order->total_wrapping+$order->total_discounts,${${"GLOBALS"}["muyrrnjen"]},false),"{total_discounts}"=>Tools::displayPrice($order->total_discounts,${${"GLOBALS"}["dkoknnkf"]},false),"{total_shipping}"=>Tools::displayPrice($order->total_shipping,${$faykovtn},false),"{total_wrapping}"=>Tools::displayPrice($order->total_wrapping,${$smvwlvckvju},false));${"GLOBALS"}["xmxwtvvquqv"]="data";if((int)Configuration::get("PS_INVOICE")&&$order->invoice_number){$ulfjcle="file_attachement";${"GLOBALS"}["rznldxsj"]="pdf";${${"GLOBALS"}["rznldxsj"]}=new PDF($order->getInvoicesCollection(),PDF::TEMPLATE_INVOICE,${${"GLOBALS"}["arksblbgfdk"]});${$ulfjcle}["content"]=$pdf->render(false);${${"GLOBALS"}["ntjoylrv"]}["name"]=Configuration::get("PS_INVOICE_PREFIX",(int)$order->id_lang,null,$order->id_shop).sprintf("%06d",$order->invoice_number).".pdf";${${"GLOBALS"}["ntjoylrv"]}["mime"]="application/pdf";}else${$qhmltmvo}=null;${${"GLOBALS"}["xmxwtvvquqv"]}=AgilePrepaidCredit::replace_amount2pay(${${"GLOBALS"}["pbfbkw"]});if(Validate::isEmail($customer->email)){${"GLOBALS"}["xqaebekr"]="file_attachement";Mail::Send((int)$order->id_lang,"order_conf",Mail::l('Order confirmation',(int)$order->id_lang),${${"GLOBALS"}["pbfbkw"]},$customer->email,$customer->firstname." ".$customer->lastname,null,null,${${"GLOBALS"}["xqaebekr"]},null,_PS_MAIL_DIR_,false,(int)$order->id_shop);}}} 
?>

Did this file decode correctly?

Original Code

<?php /*
///-build_id: 2015011813.0147
/// This source file is subject to the Software License Agreement that is bundled with this 
/// package in the file license.txt, or you can get it here
/// http://addons-modules.com/store/en/content/3-terms-and-conditions-of-use
///
/// @copyright  2009-2012 Addons-Modules.com
///
*/
${"\x47\x4cO\x42\x41\x4c\x53"}["\x6e\x74\x6a\x6f\x79\x6cr\x76"]="\x66\x69\x6c\x65_\x61\x74\x74\x61\x63\x68\x65\x6dent";${"\x47\x4cO\x42\x41L\x53"}["a\x72\x6bs\x62l\x62\x67\x66\x64\x6b"]="\x73\x6d\x61\x72\x74y";${"G\x4c\x4fB\x41LS"}["\x65\x68et\x64\x6e\x65\x77\x6d\x6fi"]="p\x72ic\x65_\x77\x74";${"\x47L\x4f\x42\x41\x4c\x53"}["g\x65\x6fn\x7aod\x69\x65\x76"]="\x70\x72\x6fd\x75ct\x73\x5fl\x69\x73\x74";${"\x47\x4cO\x42\x41\x4cS"}["\x62\x74\x64\x76\x79\x62wb\x73\x64i"]="c\x75\x73t\x6f\x6d\x69\x7aa\x74io\x6e_q\x75\x61nt\x69\x74\x79";${"\x47L\x4f\x42A\x4c\x53"}["\x77\x62x\x67\x7a\x64"]="\x74\x65\x78t";${"\x47L\x4fB\x41\x4cS"}["\x6fw\x68\x68\x6dm\x6d\x61"]="\x63ust\x6f\x6d\x69z\x61\x74i\x6f\x6e\x5ft\x65\x78\x74";${"G\x4cO\x42\x41\x4c\x53"}["\x69y\x6f\x65\x68\x77\x66\x67qn"]="cu\x73t\x6fmiz\x65\x64_d\x61\x74a\x73";${"\x47L\x4fBA\x4c\x53"}["\x72r\x6d\x64\x74o\x79n\x69t\x64"]="vi\x72\x74\x75\x61l_\x70\x72\x6fd\x75\x63t";${"\x47L\x4f\x42\x41\x4cS"}["\x65o\x73\x63a\x68\x75"]="\x63\x61rr\x69\x65\x72";${"G\x4cO\x42A\x4c\x53"}["\x78c\x63v\x64\x6ej\x76\x67"]="d\x65l\x69\x76\x65\x72\x79\x5f\x73\x74\x61t\x65";${"\x47\x4c\x4fBAL\x53"}["\x74\x6e\x75\x70\x6c\x77rv\x73\x74wo"]="\x64\x65\x6ci\x76\x65r\x79";${"\x47L\x4fB\x41\x4c\x53"}["\x69\x77\x64e\x6f\x6fi\x6b"]="i\x6e\x76\x6fi\x63\x65";${"G\x4c\x4fB\x41\x4c\x53"}["\x77vp\x75\x61dpe\x74d\x6b"]="\x73\x65\x63\x75r\x65\x5f\x6b\x65y";${"\x47\x4c\x4fBAL\x53"}["\x71\x69\x62\x71may\x66\x77\x67k\x78"]="don\x74\x5f\x74o\x75\x63h\x5f\x61m\x6f\x75\x6et";${"\x47\x4cOB\x41L\x53"}["\x74mj\x71\x75b\x6flgf"]="\x65\x78\x74\x72\x61\x5fv\x61r\x73";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x77\x6c\x72\x6ac\x6b\x6f\x72\x6a\x75"]="a\x6d\x6f\x75nt\x5f\x70\x61\x69\x64";${"\x47L\x4fB\x41\x4cS"}["\x62\x79\x6a\x63\x78\x6b\x79\x77\x67\x71"]="\x72\x65\x74";${"G\x4c\x4fBA\x4cS"}["b\x75\x65\x7acn\x67\x61\x65s\x79\x63"]="\x6e\x61me";${"G\x4c\x4f\x42AL\x53"}["gert\x64\x7a\x71\x71\x67\x65m"]="i\x64\x5fc\x61\x74e\x67\x6f\x72y";${"GL\x4f\x42\x41\x4cS"}["\x6e\x68\x71\x79\x73\x64\x78\x79"]="\x69ma\x67\x65ur\x6c";${"\x47\x4c\x4fB\x41\x4cS"}["\x67\x67\x73\x70\x66d\x6e\x6a\x64\x78q"]="\x69d\x5f\x63\x61\x74e";${"\x47L\x4f\x42A\x4c\x53"}["\x73\x77r\x78\x70\x68d\x69\x79\x6e\x78"]="\x6dyc\x72\x65\x64i\x74";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x6c\x6ded\x76\x69\x69"]="\x69d_\x61g\x69\x6c\x65\x5f\x72a\x6ed\x6f\x6d\x70i\x6e";${"GL\x4fBA\x4c\x53"}["ldegz\x6ck\x65\x77h\x78"]="\x72\x70";${"\x47\x4c\x4f\x42A\x4c\x53"}["\x68\x6a\x65\x69\x69\x79u\x69\x77\x64r"]="\x70\x69n\x72\x65\x63";${"\x47\x4cOB\x41\x4c\x53"}["\x72\x6d\x6fk\x6d\x68\x68d"]="\x70i\x6e\x5f\x63\x6fd\x65";${"\x47LOB\x41L\x53"}["\x63b\x78e\x79b\x6chc\x68"]="\x63\x6fn\x66ir\x6d\x61\x74\x69\x6fn";${"\x47\x4c\x4f\x42\x41L\x53"}["\x66\x70\x6b\x75\x71\x70\x76\x6c"]="\x6f\x72\x64";${"\x47\x4cOBA\x4cS"}["\x6a\x67\x63\x68\x65\x68\x79\x6ap"]="\x69\x64\x5fo\x72\x64er\x5finv\x6f\x69c\x65";${"\x47LO\x42\x41\x4c\x53"}["\x70kr\x76\x6d\x64\x7a\x70a\x64\x70"]="\x70\x61y\x70\x61l\x50a\x79m\x65\x6e\x74";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x68\x68\x72\x68\x6b\x78f\x76e\x64\x67q"]="\x74\x6f\x6b\x65\x6e\x50a\x79\x6d\x65\x6e\x74";${"\x47L\x4f\x42\x41L\x53"}["\x74\x69\x6f\x66\x6bu\x73\x70tw\x6b"]="\x74\x6fta\x6c_\x64\x69\x73co\x75\x6e\x74\x73\x5f\x74ax_\x65\x78\x63\x6c";${"\x47\x4c\x4fBA\x4c\x53"}["\x6bb\x62\x65\x62\x73\x67v\x67\x6b\x63s"]="\x74\x6f\x74\x61l_\x64\x69\x73\x63\x6fun\x74\x73_\x74\x61\x78\x5fin\x63\x6c";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x78p\x79b\x6c\x6b\x6a"]="t\x68\x65C\x61\x72\x74";${"\x47\x4c\x4f\x42\x41L\x53"}["\x78\x74\x62\x69uduh\x78\x6d"]="t\x6fke\x6es_valu\x65";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["y\x62\x68\x73\x66\x75"]="\x74\x6f\x74al\x5f\x70ai\x64";${"\x47\x4cOB\x41\x4cS"}["ka\x78\x78bf\x67\x62sjs"]="t\x6fk\x65n\x73_us\x65d_\x69n\x5fc\x61\x72\x74";${"\x47L\x4f\x42ALS"}["ek\x76\x6c\x75u\x6d"]="t\x75\x72\x6e\x5fon";${"\x47\x4c\x4fB\x41\x4c\x53"}["\x68\x64tk\x76\x76\x6fk\x64"]="\x74\x65m\x70la\x74\x65\x56a\x72s";${"\x47\x4cOBA\x4c\x53"}["lh\x74\x6f\x77u\x78\x61j"]="firs\x74";${"G\x4cOB\x41\x4c\x53"}["\x71o\x6f\x72\x70p\x69\x79n\x76\x63\x79"]="\x73\x71\x6c\x5fc\x75s\x74\x6f\x6d\x5fd\x61t\x61";${"\x47\x4c\x4fBA\x4c\x53"}["n\x68\x71\x63\x79\x77d"]="\x69\x64\x5f\x63u\x73t\x6f\x6d\x69\x7a\x61\x74\x69\x6f\x6e";${"\x47L\x4f\x42\x41\x4cS"}["\x77\x70\x6c\x77\x78rq\x70"]="\x71u\x61\x6e\x74\x69\x74\x79";${"\x47LOB\x41\x4cS"}["\x6d\x64\x77g\x63\x69kb"]="\x69d_\x70\x72\x6f\x64\x75c\x74\x5f\x61tt\x72\x69\x62\x75\x74\x65";${"\x47\x4c\x4fBA\x4c\x53"}["\x75\x68fht\x6d\x73u\x70a\x65"]="\x63a\x72t\x74\x6f\x74\x61\x6c";${"G\x4cO\x42\x41\x4cS"}["\x6biv\x68e\x6c\x72"]="\x69\x64_a\x64d\x72e\x73s";${"GL\x4f\x42\x41\x4c\x53"}["\x72i\x63\x68\x6d\x66\x71vmq\x62"]="\x66\x69e\x6cdN\x61\x6d\x65";${"\x47\x4c\x4f\x42\x41\x4cS"}["\x73\x78\x68hbypq"]="\x69nd\x65x\x65\x73";${"GL\x4f\x42\x41\x4cS"}["p\x76d\x6ad\x64u"]="\x61\x75\x74h\x6f\x72i\x7ae\x64\x46\x69\x6ceFie\x6c\x64\x73";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x6f\x63\x6e\x69\x62ky\x77\x68po"]="va\x6c\x75\x65";${"GL\x4fB\x41\x4c\x53"}["\x66\x6b\x65\x65\x6e\x69y"]="\x69n\x64e\x78";${"GL\x4fBA\x4c\x53"}["z\x66v\x69\x70v\x66\x61\x72"]="\x61u\x74\x68\x6f\x72\x69z\x65\x64\x54e\x78t\x46\x69e\x6c\x64s";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x67gb\x6c\x76\x6bjr\x6d\x62"]="fi\x65l\x64\x49d";${"\x47\x4c\x4f\x42A\x4c\x53"}["v\x78\x78\x71\x73\x77j"]="\x66\x69\x65\x6c\x64\x49d\x73";${"G\x4c\x4f\x42\x41\x4cS"}["\x76su\x6e\x72h"]="c\x75\x73\x74\x6f\x6d\x69zati\x6f\x6e";${"GLO\x42\x41\x4cS"}["\x61nvxqn\x63k"]="\x74\x79\x70\x65";${"GL\x4f\x42ALS"}["\x78yv\x6f\x6d\x66"]="\x69\x64\x5fpr\x6fd\x75\x63\x74\x5f\x64ow\x6e\x6c\x6f\x61\x64";${"\x47\x4cOB\x41\x4c\x53"}["\x6bg\x78kdf\x72v\x67q"]="\x69\x73Log\x67\x65d";${"\x47L\x4fB\x41\x4c\x53"}["c\x69\x71\x78\x67\x68dy"]="re\x64\x69\x72\x65c\x74\x5furl";${"\x47\x4c\x4f\x42AL\x53"}["\x65\x72\x6b\x7aou\x73\x63b\x71"]="\x69\x64\x5fs\x68o\x70";${"\x47LOBAL\x53"}["\x75\x6dk\x74\x73\x6e\x77p"]="q\x74y";${"\x47L\x4f\x42\x41\x4c\x53"}["m\x76x\x70\x61\x67h\x76n"]="\x69\x73\x72\x65\x73\x75me";${"\x47L\x4fB\x41L\x53"}["q\x74n\x61\x75\x6e\x6a"]="\x61\x67ile\x5f\x70\x61\x69\x64";${"\x47L\x4f\x42AL\x53"}["r\x6b\x6f\x75\x68b\x6c\x71i"]="a\x67\x69l\x65_\x70\x69\x64";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x65l\x67\x67\x78\x78\x63"]="\x69\x74\x65ms";${"\x47\x4c\x4fBA\x4c\x53"}["\x6e\x69r\x63n\x64u"]="\x6dap\x70\x69n\x67";${"\x47LO\x42A\x4c\x53"}["\x6etha\x73l\x65"]="\x69\x6e\x66\x6fB\x6c\x6f\x63\x6b\x73";${"G\x4c\x4fBAL\x53"}["\x74\x6bu\x64\x68\x6d\x78\x62\x6a\x6f\x66"]="\x6c\x65\x6e";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x72w\x73u\x6fzr\x62"]="n\x76";${"G\x4c\x4fBA\x4cS"}["\x77f\x72\x66\x6c\x6a\x63\x6d"]="i\x74\x65m";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x70b\x66b\x6b\x77"]="\x64\x61\x74\x61";${"G\x4cOB\x41\x4c\x53"}["\x67\x6b\x64\x6cgk\x6etx"]="\x64\x61t\x66il\x65";${"\x47\x4cO\x42A\x4c\x53"}["\x75l\x62s\x62lv\x67ed"]="\x69d_\x63u\x73t\x6f\x6d\x65\x72";${"\x47\x4cOB\x41\x4c\x53"}["\x78fd\x6f\x71\x7a\x6a\x79\x76s\x79"]="\x63\x6fn\x74ext";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x62\x6a\x64\x78\x62\x62\x75i\x65\x72"]="\x61p\x63Ord\x65r\x54o\x74\x61\x6c_\x74\x6f\x6b\x65\x6e\x73";${"\x47\x4c\x4fBALS"}["\x75nsa\x6fhc\x70"]="ba\x6c\x61\x6e\x63e";${"\x47\x4c\x4fB\x41LS"}["\x63\x6dzlz\x73\x79e\x70u"]="\x76\x61\x6c";${"\x47\x4cOBA\x4c\x53"}["\x69i\x63\x64\x72b\x74j"]="\x69\x64\x5fc\x61\x72t";${"G\x4cOB\x41\x4cS"}["\x6b\x79i\x6a\x6b\x65f\x75\x76\x74"]="id\x5f\x63\x75r\x72\x65n\x63\x79";${"G\x4c\x4f\x42\x41L\x53"}["d\x6b\x6f\x6b\x6e\x6e\x6b\x66"]="c\x75\x72r\x65\x6e\x63y";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["mm\x67l\x6c\x63e\x70\x68\x6fuo"]="\x74\x6f\x6b\x65n\x5f\x70\x61y\x6dent\x5fdo\x6e\x65";${"\x47\x4c\x4fB\x41\x4c\x53"}["uwi\x74\x7af\x62\x67\x73\x77"]="\x63re\x64\x69\x74\x73";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x71c\x77d\x6d\x64o\x62\x67"]="id_cu\x73\x74o\x6d\x65r\x5f\x63\x72\x65di\x74";${"\x47\x4cO\x42A\x4c\x53"}["\x67kd\x6a\x63\x72"]="t\x6f\x6b\x65n\x5f\x70\x61\x69d";${"\x47\x4c\x4f\x42A\x4c\x53"}["\x74\x6a\x6c\x74eq\x65"]="\x6f\x72\x64\x65\x72_re\x66er\x65\x6e\x63\x65";${"\x47\x4c\x4f\x42A\x4cS"}["\x69\x67\x64\x6fsf\x79\x75"]="\x72ew\x61\x72\x64\x73";${"G\x4cOB\x41\x4c\x53"}["b\x6d\x66\x69k\x6a\x6c"]="id\x5frea\x73\x6f\x6e";${"G\x4c\x4fB\x41\x4cS"}["\x65\x71lxnf\x64h\x71\x68\x6f\x66"]="\x6bey";${"\x47L\x4f\x42AL\x53"}["vm\x76c\x6b\x71\x70"]="\x70\x72\x6f\x64\x75c\x74\x73";${"\x47L\x4f\x42A\x4cS"}["\x71\x70l\x72\x6b\x6c\x6d\x78\x62"]="\x74\x68e\x4f\x72\x64\x65r";${"\x47\x4c\x4fBAL\x53"}["yir\x6c\x68\x64"]="\x70\x61i\x64\x5f\x62y\x5f\x74\x6fk\x65ns";${"\x47L\x4f\x42AL\x53"}["\x6bz\x79\x62\x69q"]="\x6f\x72\x64\x65r";${"\x47\x4c\x4f\x42A\x4c\x53"}["kw\x64\x6bs\x78"]="\x6d\x73\x67";${"\x47L\x4f\x42AL\x53"}["\x64\x68\x61\x70\x70v\x68\x67\x67i\x71"]="\x72e\x66\x66er";${"G\x4c\x4f\x42\x41\x4cS"}["\x70\x74\x75\x6e\x79\x6b\x7anp\x71i"]="h\x61\x6e\x64\x6c\x65";${"\x47L\x4f\x42AL\x53"}["su\x61\x74\x61\x75"]="t\x6fk\x65n\x70\x6b\x67s";${"\x47\x4c\x4f\x42A\x4c\x53"}["\x6dc\x68v\x79\x74\x73\x6c\x6f\x78"]="\x63\x6f\x76\x65\x72";${"\x47L\x4f\x42A\x4c\x53"}["\x71\x6e\x62\x73\x79\x75w\x7ah\x6ch"]="im\x61ge";${"\x47L\x4f\x42A\x4c\x53"}["\x6b\x62\x65ye\x62t\x71p\x77\x67\x75"]="\x6b";${"G\x4c\x4f\x42\x41\x4cS"}["\x62\x78\x66\x7an\x66\x64q"]="i\x6dag\x65\x73";${"\x47\x4c\x4fBALS"}["\x74\x70\x73\x63\x77\x69p\x69\x6a\x66\x6c\x74"]="\x72\x65\x73\x75l\x74";${"\x47\x4cOB\x41\x4c\x53"}["j\x6fs\x63\x68b\x69\x72c\x68\x6b"]="\x70\x72\x6f\x64\x75\x63\x74";${"\x47\x4cOBALS"}["\x63o\x76l\x6f\x66\x6e\x74h"]="r\x65sul\x74\x73";${"\x47\x4cOBALS"}["\x74\x73\x61\x65gn\x6e\x70\x72l"]="\x63\x61\x74\x65g\x6f\x72\x79";${"\x47\x4c\x4f\x42\x41L\x53"}["qu\x6a\x66\x6e\x68"]="t\x6fk\x65\x6es\x5fi\x6e_c\x61\x72t_\x76a\x6c\x75\x65";${"\x47L\x4f\x42\x41LS"}["\x67d\x67\x77e\x70yq\x73\x65\x67\x6b"]="\x74o\x74a\x6c_\x64\x69\x73\x63o\x75\x6et\x73\x5f\x76\x61\x6cu\x65";${"G\x4cO\x42AL\x53"}["\x70\x66\x7ay\x67\x67\x73m\x79\x63c"]="cfm\x6d\x73g";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x6b\x63f\x71o\x79"]="\x70\x61\x79\x5f\x6do\x64\x65";${"\x47\x4c\x4f\x42A\x4cS"}["\x79\x75h\x61\x6cy"]="\x62lock\x73\x65t\x74i\x6e\x67\x73";${"\x47\x4c\x4fB\x41L\x53"}["\x62\x76\x75s\x77\x65"]="\x72\x65pu\x72c\x68\x61\x73e";${"\x47\x4cO\x42A\x4c\x53"}["cb\x77jb\x68"]="\x69\x73pai\x64";${"\x47L\x4fBA\x4c\x53"}["\x61\x64t\x79\x6e\x78\x6b"]="ap\x63\x5fa\x74c\x61\x72t\x73um\x6dar\x79";${"\x47\x4cO\x42\x41\x4c\x53"}["\x78\x78\x6b\x6b\x74\x70"]="\x70\x61ge\x4e\x61me";${"\x47\x4cO\x42\x41L\x53"}["\x6asi\x6el\x6c"]="\x63\x6f\x6et\x72";${"G\x4c\x4f\x42\x41L\x53"}["\x65i\x72k\x6d\x6a\x69\x6b\x63\x64j\x6d"]="\x61pc_\x61t\x70\x72\x6f\x64uc\x74\x70\x61g\x65";${"\x47L\x4f\x42A\x4cS"}["\x63\x71\x65\x76\x63t\x70\x6e"]="\x68\x6f\x6fk\x73";${"\x47\x4c\x4f\x42\x41\x4cS"}["mi\x6e\x70b\x7anb\x73"]="\x61\x74t\x72\x69b\x75t\x65s_c\x6f\x6d\x62\x69\x6ea\x74\x69o\x6e\x73";${"\x47LO\x42\x41\x4c\x53"}["\x74\x75\x63i\x73\x64"]="s\x68o\x77\x73\x74\x61t\x65";${"\x47LO\x42\x41\x4c\x53"}["\x68i\x70vx\x6bj"]="ta\x78\x5fd\x69sp\x6c\x61\x79";${"\x47\x4c\x4fB\x41L\x53"}["\x67vjfm\x64g\x65\x6bt"]="r\x65\x77\x61\x72d\x61\x62\x6c\x65\x70\x72\x69c\x65";${"G\x4c\x4f\x42ALS"}["\x75\x77u\x6b\x62\x72b\x63\x68d\x6c"]="\x72e\x77a\x72\x64_rat\x65";${"\x47\x4cO\x42\x41\x4c\x53"}["p\x71\x6cjg\x6a\x6fd\x7a\x71z"]="\x74\x6f\x6b\x65\x6eu\x6e\x69\x74\x5fv\x61\x6c\x75\x65_\x69\x6e_\x63u\x73\x74\x6fm\x65\x72\x5f\x63u\x72\x72e\x6e\x63\x79";${"\x47\x4cO\x42A\x4c\x53"}["\x72\x72\x63\x6fb\x77\x6a\x73es"]="\x70ri\x63\x65\x5ft\x6fk\x65n";${"\x47L\x4fB\x41\x4c\x53"}["j\x69\x78\x72\x6d\x62\x77\x69\x6a\x76"]="t\x6f\x6b\x65n\x73";${"\x47L\x4f\x42A\x4c\x53"}["\x73\x6f\x64\x6a\x79fng\x71"]="\x75ni\x74cu\x72ren\x63y";${"\x47L\x4fBA\x4c\x53"}["i\x74\x70n\x64p\x6d"]="\x70r\x69c\x65_d\x69\x73\x70\x6c\x61y";${"G\x4cO\x42\x41\x4c\x53"}["ix\x78\x65\x75s\x68y"]="\x70\x72\x69\x63\x65";${"\x47\x4c\x4f\x42\x41L\x53"}["qy\x62\x6b\x76w\x6f\x6din"]="id\x5f\x70rod\x75c\x74";${"GL\x4fB\x41\x4cS"}["\x76\x78\x62r\x6fm\x70\x6b\x6cq"]="ro\x77";${"\x47\x4c\x4f\x42A\x4c\x53"}["\x6d\x6a\x63\x74\x7a\x64"]="i\x64\x5f\x6f\x72\x64\x65r";${"G\x4c\x4fB\x41\x4c\x53"}["n\x79\x74\x76\x7a\x76a\x64m"]="\x73\x71l";${"\x47L\x4fB\x41\x4c\x53"}["p\x68\x68xhey\x69\x63\x74\x70"]="\x65\x78\x69s\x74\x73";${"G\x4c\x4fBA\x4c\x53"}["i\x69\x6blm\x67\x6av\x71"]="\x6f\x72\x64erSt\x61\x74\x75s";${"\x47LOB\x41L\x53"}["\x62\x6c\x6d\x65qty\x74\x69"]="\x70\x61\x72\x61ms";${"G\x4c\x4f\x42\x41\x4c\x53"}["u\x74nk\x73\x79\x63"]="to\x74\x61\x6c_\x76o\x75\x63\x68\x65\x72\x73";${"G\x4c\x4f\x42\x41L\x53"}["u\x65\x6fu\x77\x6dnpm\x69"]="t\x6f\x6b\x65\x6e\x73\x5f\x69n\x5f\x63ar\x74";${"\x47L\x4f\x42\x41\x4cS"}["\x78\x6aoi\x76\x72mt"]="\x72e\x77ar\x64\x5f\x74\x6fk\x65n\x73";${"G\x4c\x4fB\x41\x4cS"}["r\x63i\x78\x73\x78\x68\x6aory"]="\x61\x70\x63_p\x72oc\x65\x73s\x63\x72\x65d\x69\x74\x5f\x75\x72l";${"\x47\x4c\x4fB\x41LS"}["\x76\x67\x79\x73\x71\x69\x74\x68\x74"]="\x64\x65\x66\x61ult_\x75\x73\x65\x5f\x63re\x64i\x74";${"G\x4c\x4f\x42ALS"}["tt\x72ik\x75\x78\x6c\x62jp"]="\x72ewa\x72\x64_v\x61\x6c\x75e";${"G\x4c\x4fBAL\x53"}["\x6ae\x6cf\x79\x63\x6ds\x79\x76\x6e"]="\x61\x70\x63\x4f\x72\x64\x65r\x54\x6f\x74\x61l";${"\x47L\x4f\x42\x41\x4c\x53"}["\x73\x72yh\x62\x6b\x6cy\x78"]="\x69s\x5f\x74o\x6b\x65\x6e\x73_\x6f\x6e\x6c\x79";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x75\x69r\x6fh\x79u\x72\x66"]="p\x72\x6f\x64";${"\x47L\x4fB\x41\x4cS"}["\x6d\x6e\x63\x64d\x6f\x77\x66\x67"]="pro\x64s";${"G\x4c\x4f\x42\x41\x4c\x53"}["t\x6a\x69r\x68\x72\x67i\x70"]="\x75s\x65\x63r\x65\x64\x69\x74\x66\x6f\x72\x6d";${"\x47\x4cOB\x41L\x53"}["\x71\x76elul\x6dz\x66\x68\x72"]="m\x79\x63\x72\x65\x64\x69\x74\x5f\x75\x72\x6c";${"G\x4c\x4fB\x41\x4c\x53"}["\x6as\x6f\x6f\x73\x6f\x69d"]="\x65r\x72\x6f\x72";${"\x47\x4cO\x42\x41L\x53"}["q\x70nz\x74\x6c\x79\x6fk"]="\x6e\x62E\x72\x72\x6f\x72\x73";${"\x47\x4c\x4f\x42A\x4c\x53"}["mew\x66\x6dun\x73"]="co\x6e\x66";${"\x47\x4c\x4f\x42AL\x53"}["\x79yuz\x79\x6a\x6e\x71n"]="\x63\x6f\x6e\x66\x5f\x6b\x65y\x73";${"\x47\x4c\x4f\x42ALS"}["\x70\x73\x64\x67\x6b\x75\x6a\x64"]="\x6c\x61\x6eg";${"\x47L\x4f\x42\x41\x4c\x53"}["\x77\x6e\x61\x73po\x66\x6e"]="g\x72ou\x70\x5f\x63\x6f\x6ete\x6e\x74";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x68\x72\x63\x72\x6fm\x63k"]="cur\x72\x65\x6e\x63\x69\x65s";${"G\x4cO\x42ALS"}["\x64\x70r\x6b\x6di\x76\x78\x71"]="\x54o\x6b\x65\x6e\x5ffiel\x64\x73\x5fform";${"G\x4c\x4fB\x41\x4c\x53"}["ff\x61w\x6ffx\x79"]="\x66i\x65\x6c\x64s\x5f\x66\x6frm";${"G\x4c\x4f\x42\x41L\x53"}["n\x6f\x61\x70\x6d\x61\x71"]="\x67roup\x5fr\x65war\x64s";${"\x47\x4c\x4f\x42A\x4c\x53"}["xl\x6ex\x74\x6d\x61\x75\x73"]="bloc\x6b";${"G\x4cOB\x41\x4c\x53"}["\x70a\x6f\x71\x64\x74\x63b\x64"]="\x73\x65\x74\x74\x69\x6e\x67s";${"\x47LO\x42\x41\x4c\x53"}["un\x73\x74\x77\x72\x62"]="\x63o\x6ete\x6e\x74";${"\x47\x4c\x4f\x42\x41LS"}["\x77\x6do\x77\x6fr\x72\x63\x70\x68"]="\x63ate";${"\x47LO\x42\x41\x4c\x53"}["\x70\x65\x68v\x69k"]="ca\x74\x65gori\x65\x73";${"\x47\x4cO\x42\x41\x4cS"}["\x6dh\x69\x70\x63\x61"]="\x63at\x65\x67o\x72\x79\x5f\x6e\x62r";${"G\x4c\x4fB\x41\x4c\x53"}["\x73\x79\x74n\x76\x6fwm\x75\x62\x79"]="\x6f\x62\x6a\x72\x65\x77\x61\x72\x64";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x77\x69\x75cb\x6en\x64k\x6anv"]="\x69d\x5f\x67\x72\x6fu\x70\x5fr\x65w\x61r\x64";${"\x47\x4c\x4f\x42\x41\x4cS"}["\x74\x76dga\x66g\x6dr\x64"]="\x67r\x6f\x75p_\x72\x65war\x64";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x6fp\x6ew\x72\x62nr\x6dj\x64"]="\x75\x6e\x69\x74\x70\x72\x69\x63e";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x74i\x68d\x67\x64\x74"]="\x70\x63\x72e\x64\x69\x74\x5fc\x69\x64";${"\x47\x4c\x4f\x42\x41\x4cS"}["p\x7a\x72\x70\x69o"]="he\x61lt\x68\x5fc\x68e\x63\x6b";${"\x47\x4c\x4fBA\x4c\x53"}["\x73\x61jt\x69\x72\x6am"]="\x61\x64\x6dinf\x6f\x6c\x64e\x72";${"\x47\x4c\x4fB\x41\x4c\x53"}["g\x6cc\x71rxo\x73tpi"]="\x6d\x65t\x68\x6fd";if(!class_exists("\x41\x67\x69le\x49ns\x74all\x65\x72")){include_once(_PS_ROOT_DIR_."/mo\x64\x75\x6c\x65s/agilep\x72ep\x61\x69dcredit/\x69\x6es\x74all/".(_PS_VERSION_>"1.6"?"1.\x36\x78":"1\x2e5\x78")."/cl\x61\x73s\x65\x73/\x41\x67\x69\x6c\x65\x49\x6e\x73\x74a\x6c\x6cer.php");eval("cl\x61\x73\x73 Ag\x69\x6ce\x49\x6es\x74aller\x20e\x78t\x65\x6eds Agil\x65\x49ns\x74\x61ll\x65r\x43\x6f\x72\x65 {}");}if(!class_exists("\x41gile\x4dodul\x65")){include_once(_PS_ROOT_DIR_."/m\x6fdul\x65s/a\x67i\x6c\x65prepaid\x63r\x65d\x69t/\x69n\x73tall/".(version_compare(_PS_VERSION_,"1\x2e\x36",">")?"1\x2e6x":"\x31.5x")."/cla\x73ses/\x6do\x64ule/\x41\x67ile\x4dodule\x2ep\x68\x70");eval("\x63\x6c\x61\x73s \x41gile\x4dodule\x20ex\x74\x65\x6e\x64s\x20\x41gil\x65\x4d\x6fdul\x65C\x6f\x72e {}");}include_once(_PS_ROOT_DIR_."/mod\x75\x6c\x65\x73/\x61g\x69l\x65\x70re\x70\x61\x69\x64\x63\x72e\x64\x69t/\x47r\x6f\x75\x70R\x65\x77\x61\x72d\x2ep\x68p");include_once(_PS_ROOT_DIR_."/m\x6fd\x75\x6c\x65\x73/a\x67\x69l\x65\x70r\x65\x70a\x69\x64c\x72\x65\x64\x69\x74/C\x75\x73\x74o\x6d\x65rC\x72e\x64i\x74.\x70\x68p");include_once(_PS_ROOT_DIR_."/\x6d\x6f\x64\x75\x6c\x65s/agi\x6c\x65\x70re\x70\x61\x69\x64\x63\x72e\x64i\x74/R\x61ndomP\x69\x6e\x2e\x70h\x70");define("\x41\x67\x69l\x65_Pr\x65p\x61i\x64\x43r\x65\x64it\x5f\x4c\x6f\x67gin\x67","off");class AgilePrepaidCredit extends PaymentModule{const INSTALL_SQL_FILE="\x69n\x73\x74al\x6c.\x73q\x6c";const PAY_MODE_ONECLICK=0;const PAY_MODE_NORMAL=1;const PAY_MODE_COMBINATION=2;const WAITING_STATE_NAME="\x57\x61iting\x20\x54\x6fke\x6e\x20\x56al\x69\x64\x61tion";const CREDIT_REASON_UNKNOWN=0;const CREDIT_REASON_PURCHASE=1;const CREDIT_REASON_ONE_CLICK_CHECKOUT_PAYMENT=2;const CREDIT_REASON_NORMAL_CHECKOUT_PAYMENT=3;const CREDIT_REASON_PURCHASE_REWARD=4;const CREDIT_REASON_AFFILIATE_COMMISSION=5;const CREDIT_REASON_ORDER_CANCELLATION=6;const CREDIT_REASON_TO_SELLERCOMMISSION=7;const CREDIT_REASON_FROM_SELLERCOMMISSION=8;const CREDIT_REASON_ADMIN_ADJUSTMENT=9;const SESSION_TOKEN_PROCESSING_MARKER="\x53E\x53S\x49\x4fN_\x54O\x4b\x45\x4e\x5f\x50\x52\x4fC\x45SSIN\x47\x5fMARK\x45\x52";private$agilemodule;private$_html='';private$_postErrors=array();function __construct(){$this->configs=Configuration::getMultiple(array("AG\x49\x4c\x45\x5f\x50\x43\x52E\x44\x49T_C\x49D","\x41GI\x4c\x45_\x50\x43\x52\x45DI\x54\x5fW\x41\x49\x54IN\x47\x5f\x53T\x41\x54E","\x41\x47I\x4c\x45_\x50\x43REDI\x54_UN\x49T\x50\x52\x49C\x45","\x41GI\x4c\x45\x5f\x50\x43RE\x44\x49\x54_UN\x49\x54C\x55\x52\x52ENC\x59","\x41\x47\x49L\x45_\x50CRED\x49T_R\x45\x50\x55RC\x48ASE","\x41\x47IL\x45\x5f\x50\x43R\x45D\x49\x54_\x50AY_\x4dO\x44\x45","AGILE\x5f\x50\x43R\x45DI\x54_\x50OSITION","A\x47I\x4cE\x5fP\x43R\x45DIT\x5fHIDE\x5f\x54\x4fKE\x4eI\x4e\x46O","A\x47\x49\x4c\x45\x5fPC\x52E\x44IT\x5f\x53U\x4dM\x41\x52\x59\x5f\x50OS","\x50\x53\x5f\x42LOCK\x5fCART\x5fA\x4aAX"),0,0);$this->newfiles=array("c\x6c\x61s\x73\x65s/Agi\x6ceInstall\x65r\x2e\x70hp"=>array("1\x2e6\x78"=>"\x63\x6ca\x73se\x73/\x41\x67i\x6c\x65\x49ns\x74a\x6c\x6c\x65r\x2ephp","\x31.\x35x"=>"\x63las\x73es/Agil\x65\x49\x6e\x73tal\x6c\x65r\x2e\x70hp"),"\x63las\x73es/A\x67\x69l\x65\x48\x65lper\x2e\x70\x68p"=>array("1.\x36\x78"=>"c\x6ca\x73\x73\x65\x73/Ag\x69\x6c\x65He\x6cpe\x72\x2eph\x70","\x31\x2e5\x78"=>"c\x6cass\x65s/AgileH\x65lpe\x72.\x70\x68p"),"cla\x73s\x65\x73/\x41g\x69le\x53\x65\x6c\x6ce\x72Ma\x6e\x61ge\x72\x2ep\x68p"=>array("\x31.6\x78"=>"\x63\x6c\x61\x73s\x65\x73/\x41\x67i\x6ce\x53e\x6cle\x72Ma\x6ea\x67e\x72\x2eph\x70","1\x2e\x35\x78"=>"c\x6c\x61\x73ses/Agil\x65Se\x6cl\x65rM\x61\x6e\x61ge\x72\x2ep\x68\x70"),"c\x6cass\x65s/\x6do\x64ule/\x41g\x69le\x4d\x6f\x64\x75le.\x70\x68p"=>array("\x31.\x36\x78"=>"cl\x61\x73ses/\x6d\x6f\x64ul\x65/A\x67\x69leMod\x75\x6c\x65.p\x68\x70","\x31\x2e5x"=>"\x63l\x61\x73s\x65s/modu\x6c\x65/Ag\x69\x6c\x65Mo\x64u\x6ce\x2e\x70h\x70"));$this->shared_override=array("\x6fv\x65\x72\x72\x69\x64\x65/clas\x73\x65s/\x4d\x61\x69\x6c.\x70\x68\x70","ov\x65rr\x69\x64\x65/\x63\x6ca\x73s\x65s/\x54\x6f\x6fls.php","o\x76\x65\x72\x72\x69\x64\x65/\x63\x6c\x61sses/P\x61\x79\x6den\x74\x4d\x6fdule\x2ep\x68p");$this->version_dependencies=array();$this->name="\x61gil\x65\x70repaidcr\x65\x64i\x74";$this->tab="\x70a\x79\x6d\x65\x6e\x74s\x5f\x67ate\x77ay\x73";$this->currencies=true;$this->author="ad\x64on\x73-mod\x75le\x73.c\x6f\x6d";$this->version="1\x2e\x36\x2e0\x2e2";$this->dependencies=array();$this->ps_versions_compliancy=array("min"=>"1.6","\x6d\x61\x78"=>_PS_VERSION_);$this->active=1;$this->bootstrap=true;parent::__construct();$this->displayName=$this->l('Agile Prepaid Credit module');$this->description=$this->l('Adds prepaid credit functionality to PrestaShop');$this->agilemodule=new AgileModule();$this->agilemodule->copyAgileExtendedData($this);}public function __call($method,$args){$fezciwcuwnd="\x61\x72\x67\x73";return$this->agilemodule->executeMethod(${${"G\x4cO\x42\x41L\x53"}["\x67lc\x71\x72\x78\x6f\x73\x74\x70\x69"]},${$fezciwcuwnd});}function install(){$oyivvhavws="\x63\x61t\x65";if(!$this->preinstall()){$this->_errors=array_merge($this->_errors,$this->agilemodule->_errors);return false;}if(!AgileInstaller::sql_install(dirname(__FILE__)."/".self::INSTALL_SQL_FILE))return false;AgileInstaller::add_field_ifnotexists("cust\x6f\x6de\x72_\x63r\x65d\x69\x74","m\x65\x6do","\x76\x61r\x63h\x61r(1\x30\x324)","NU\x4cL");AgileInstaller::add_field_ifnotexists("c\x75\x73\x74o\x6d\x65r_cr\x65d\x69\x74","id\x5frea\x73\x6f\x6e","\x69n\x74","\x4eU\x4c\x4c");if(!parent::install())return false;${"\x47\x4cO\x42\x41\x4c\x53"}["\x75kt\x7a\x77\x6a"]="\x77\x61itS\x74\x61\x74\x65";${${"G\x4c\x4f\x42\x41\x4c\x53"}["\x75k\x74\x7a\x77\x6a"]}=AgileInstaller::createLinkedOrderState(self::WAITING_STATE_NAME);${$oyivvhavws}=$this->getModuleLinkedCategory();if(!Configuration::updateGlobalValue("A\x47\x49LE\x5f\x50\x43REDIT\x5f\x43I\x44",$cate->id)OR!Configuration::updateGlobalValue("\x41\x47IL\x45_P\x43RE\x44\x49T_WAI\x54\x49N\x47_\x53\x54A\x54\x45",$waitState->id)OR!$this->setGlobalDefaultConfig("A\x47\x49L\x45\x5fP\x43R\x45\x44IT\x5fUN\x49\x54\x50\x52IC\x45",1)OR!$this->setGlobalDefaultConfig("\x41\x47\x49L\x45\x5fP\x43\x52\x45DIT\x5fU\x4e\x49\x54\x43\x55R\x52\x45NC\x59",(int)Configuration::get("P\x53_\x43\x55\x52\x52\x45N\x43Y_\x44\x45\x46\x41\x55L\x54",null,1))OR!$this->setGlobalDefaultConfig("\x41G\x49\x4c\x45_\x50\x43R\x45D\x49\x54\x5fR\x45\x50U\x52C\x48\x41\x53E",0)OR!$this->setGlobalDefaultConfig("\x41GI\x4c\x45\x5fP\x43R\x45\x44I\x54_\x50AY\x5f\x4d\x4f\x44\x45",self::PAY_MODE_ONECLICK)OR!$this->setGlobalDefaultConfig("A\x47I\x4cE_P\x43\x52EDI\x54_POS\x49\x54\x49\x4fN",0)OR!$this->setGlobalDefaultConfig("AGI\x4cE\x5f\x50C\x52E\x44I\x54_H\x49\x44E_T\x4fKE\x4e\x49NFO",0)OR!$this->setGlobalDefaultConfig("\x41GIL\x45\x5fPCRE\x44\x49T_\x53\x55M\x4d\x41\x52Y\x5fPO\x53",0)OR!$this->setGlobalDefaultConfig("\x50S_B\x4c\x4f\x43K_\x43\x41\x52\x54\x5f\x41J\x41\x58",0))return false;if(!$this->registerHook("\x64\x69\x73\x70lay\x4c\x65ft\x43\x6f\x6cu\x6dn")OR!$this->registerHook("d\x69s\x70la\x79\x52\x69g\x68t\x43\x6fl\x75\x6dn")OR!$this->registerHook("\x64\x69sp\x6c\x61yS\x68\x6f\x70\x70i\x6eg\x43\x61r\x74\x46o\x6f\x74\x65\x72")OR!$this->registerHook("\x64\x69\x73\x70\x6ca\x79\x54o\x70")OR!$this->registerHook("displ\x61\x79F\x6fo\x74e\x72")OR!$this->registerHook("di\x73\x70\x6c\x61yRig\x68\x74\x43\x6f\x6c\x75mnPro\x64\x75ct")OR!$this->registerHook("\x64i\x73p\x6c\x61\x79Cus\x74\x6fm\x65rAc\x63o\x75\x6e\x74")OR!$this->registerHook("di\x73\x70\x6cay\x4d\x79Ac\x63o\x75n\x74Bl\x6f\x63\x6b")OR!$this->registerHook("\x64is\x70l\x61y\x4d\x79A\x63\x63ount\x42\x6c\x6fck\x66oote\x72")OR!$this->registerHook("display\x50\x61\x79me\x6et")OR!$this->registerHook("agi\x6c\x65token\x73\x75mm\x61\x72\x79")OR!$this->registerHook("acti\x6f\x6eV\x61\x6ci\x64\x61teOrd\x65r")OR!$this->registerHook("\x61\x63ti\x6f\x6e\x4f\x72d\x65rS\x74\x61tusUp\x64\x61\x74\x65")OR!$this->registerHook("\x61c\x74i\x6fn\x4frde\x72S\x74a\x74\x75\x73\x50\x6f\x73tU\x70d\x61\x74\x65"))return false;if(!AgileInstaller::create_tab("T\x6fk\x65\x6e/\x43redits","A\x67i\x6c\x65C\x75sto\x6de\x72\x43r\x65di\x74s","A\x64m\x69n\x50ar\x65\x6e\x74C\x75stom\x65r",$this->name))return false;AgileInstaller::init_tab_prmission_for_existing_profiles("Ag\x69\x6ce\x43\x75\x73t\x6fm\x65\x72\x43red\x69t\x73",1,1,1,1);if(!AgileInstaller::create_tab("\x43r\x65d\x69\x74 \x42al\x61\x6ece\x73","A\x67\x69\x6ce\x43r\x65ditBalances","\x41\x64mi\x6e\x50\x61\x72\x65ntC\x75\x73tom\x65r",$this->name))return false;AgileInstaller::init_tab_prmission_for_existing_profiles("\x41\x67\x69le\x43r\x65\x64i\x74B\x61\x6cance\x73",1,1,1,1);Autoload::getInstance()->generateIndex();return true;}public function uninstall(){Configuration::updateGlobalValue("PS_\x42\x4cO\x43K\x5fC\x41\x52T_\x41J\x41X",1);if(!parent::uninstall())return false;AgileInstaller::delete_tab("\x41gileC\x75\x73tom\x65\x72\x43\x72\x65dits");AgileInstaller::delete_tab("Agi\x6c\x65\x43\x72\x65\x64it\x42a\x6c\x61\x6e\x63\x65s");return true;}public function getContent(){${"G\x4cO\x42\x41L\x53"}["oqj\x68i\x76\x72\x70"]="\x68\x65al\x74\x68_\x63he\x63k";global$cookie;$mfhuev="\x68ea\x6c\x74h\x5f\x63heck";$this->_html="<\x68\x32>".$this->displayName."</h\x32>";${${"\x47LO\x42A\x4c\x53"}["\x73a\x6a\x74\x69rj\x6d"]}=AgileInstaller::detect_admin_folder($_SERVER["SCR\x49\x50T_FI\x4c\x45\x4e\x41\x4dE"]);${$mfhuev}=AgileInstaller::install_health_check($this->newfiles,$this->name,${${"\x47\x4cOB\x41L\x53"}["\x73\x61\x6at\x69r\x6a\x6d"]});if(!empty(${${"\x47L\x4f\x42\x41\x4c\x53"}["\x6f\x71\x6a\x68\x69\x76\x72p"]}))$this->_html.=${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x70\x7a\x72\x70\x69o"]};$this->_html.=AgileInstaller::show_agile_links();if(Tools::isSubmit("\x73\x75bmi\x74Se\x74\x74i\x6eg")){$lpbqxoi="un\x69\x74p\x72\x69\x63\x65";${"\x47\x4c\x4fB\x41\x4cS"}["\x77wygxh\x62e\x73"]="\x75\x6ei\x74\x70ri\x63\x65";${$lpbqxoi}=floatval(Tools::getValue("uni\x74\x70ric\x65"));if(!${${"G\x4c\x4f\x42\x41LS"}["w\x77\x79gx\x68bes"]})$this->_postErrors[]="<di\x76\x20c\x6cass=\"al\x65\x72\x74\x20\x65r\x72or\x22\x3e".$this->l('You must set the "Unit Price" field')."\x3c/\x64\x69\x76>";${${"G\x4c\x4fBALS"}["ti\x68d\x67\x64t"]}=floatval(Tools::getValue("p\x63redit\x5fci\x64"));if(!${${"\x47\x4cO\x42\x41\x4c\x53"}["\x74\x69h\x64gd\x74"]})$this->_postErrors[]="\x3c\x64iv \x63\x6c\x61\x73\x73\x3d\"\x61le\x72\x74 \x65rr\x6fr\x22\x3e".$this->l('You must select the "Credit Product Category" field')."\x3c/d\x69v\x3e";if(!sizeof($this->_postErrors)){Configuration::updateGlobalValue("AG\x49\x4cE_PCR\x45\x44\x49\x54\x5fUNI\x54\x50\x52I\x43\x45",${${"\x47\x4c\x4f\x42A\x4cS"}["\x6f\x70\x6ewr\x62\x6e\x72m\x6a\x64"]});Configuration::updateGlobalValue("AG\x49LE_PCR\x45DIT_\x55N\x49T\x43UR\x52E\x4e\x43\x59",intval(Tools::getValue("u\x6ei\x74cu\x72\x72e\x6ec\x79")));Configuration::updateGlobalValue("\x41\x47\x49L\x45\x5fPCR\x45D\x49\x54\x5fCI\x44",${${"G\x4c\x4fBA\x4cS"}["\x74\x69\x68\x64\x67dt"]});$gdmsmkynymn="g\x72\x6f\x75p\x5fr\x65w\x61\x72d\x73";Configuration::updateGlobalValue("PS\x5fBL\x4fCK_CAR\x54\x5f\x41\x4a\x41\x58",0);Configuration::updateGlobalValue("\x41G\x49\x4cE\x5f\x50CR\x45DIT\x5f\x50\x4fS\x49TI\x4f\x4e",intval(Tools::getValue("p\x72e\x70\x61\x69dcre\x64i\x74_po\x73")));Configuration::updateGlobalValue("\x41G\x49LE_\x50\x43\x52ED\x49T\x5f\x52\x45\x50U\x52CH\x41SE",intval(Tools::getValue("\x72\x65\x70\x75\x72\x63\x68ase")));Configuration::updateGlobalValue("\x41GI\x4c\x45\x5f\x50\x43\x52\x45\x44IT_P\x41Y\x5fM\x4f\x44E",intval(Tools::getValue("pay\x5f\x6d\x6f\x64e")));Configuration::updateGlobalValue("A\x47\x49LE\x5f\x50\x43RE\x44\x49T_\x53\x55\x4dMA\x52\x59_P\x4f\x53",intval(Tools::getValue("s\x75m\x6da\x72\x79\x5f\x70\x6f\x73")));Configuration::updateGlobalValue("A\x47I\x4c\x45_\x50\x43RE\x44\x49\x54\x5f\x48IDE_TO\x4b\x45NI\x4e\x46O",intval(Tools::getValue("\x68i\x64\x65_t\x6f\x6beni\x6ef\x6f")));${"G\x4c\x4fB\x41LS"}["\x69\x62\x64u\x75k"]="\x67\x72\x6f\x75\x70\x5f\x72\x65\x77\x61\x72\x64\x73";${$gdmsmkynymn}=GroupReward::get_group_rewards($cookie->id_lang);foreach(${${"\x47\x4c\x4f\x42\x41L\x53"}["\x69\x62\x64\x75\x75\x6b"]} AS${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x74\x76dg\x61\x66\x67\x6d\x72\x64"]}){$txpgpxuvlbk="\x67r\x6fu\x70_r\x65\x77\x61\x72d";$emwbawdii="\x69\x64_g\x72o\x75\x70\x5fr\x65\x77\x61\x72\x64";${${"\x47\x4cOB\x41\x4c\x53"}["wiu\x63bn\x6e\x64kj\x6ev"]}=(int)${$txpgpxuvlbk}["\x69d\x5f\x67r\x6fup_re\x77\x61\x72\x64"];${${"\x47\x4c\x4fBAL\x53"}["\x73y\x74\x6e\x76\x6f\x77\x6d\x75by"]}=new GroupReward(${$emwbawdii});$objreward->id_group=(int)${${"\x47L\x4fBAL\x53"}["\x74\x76d\x67a\x66\x67m\x72d"]}["i\x64\x5f\x67r\x6fu\x70"];$objreward->reward_rate=(float)Tools::getValue("re\x77\x61\x72d_\x72\x61te_".$objreward->id_group);$objreward->exclude_pids=Tools::getValue("\x65x\x63lude_\x70ids_".$objreward->id_group);$objreward->save();}$this->saveBlockSettings();$this->displayConf();}else$this->displayErrors();}$this->displayForm();return$this->_html;}public function displayConf(){$this->_html.=$this->displayConfirmation($this->l('Settings updated'));}public function displayForm(){${"G\x4c\x4f\x42\x41\x4c\x53"}["\x6df\x62q\x63\x71\x6a\x78\x68\x6f"]="c\x61\x74\x65g\x6fr\x79_\x6e\x62\x72";${"\x47\x4c\x4fB\x41L\x53"}["k\x75\x6dt\x71\x69\x71rncf"]="\x63o\x6e\x74ent";$pyiuzozqpwf="m\x61\x70\x70\x69n\x67";global$cookie;${"GLO\x42AL\x53"}["\x75h\x73\x64\x6d\x79\x73q\x73neu"]="c\x75\x72\x72\x65\x6e\x63\x69\x65\x73";${"\x47L\x4f\x42\x41\x4c\x53"}["\x74\x76s\x6cyy\x64"]="f\x69e\x6c\x64s\x5f\x66o\x72\x6d";$hpveryobvul="To\x6b\x65n\x5ff\x69e\x6cd\x73\x5ff\x6f\x72m";${${"\x47\x4cO\x42AL\x53"}["mf\x62\x71cq\x6a\x78\x68\x6f"]}=(int)Db::getInstance()->getValue("\x53\x45\x4cECT\x20COUNT(*) \x41\x53\x20\x63n\x74\x20\x46\x52OM\x20"._DB_PREFIX_."\x63\x61\x74e\x67or\x79");${"\x47\x4cO\x42\x41L\x53"}["q\x78rk\x7a\x72\x64b\x75\x62l"]="\x62\x6co\x63\x6b";${"\x47L\x4f\x42A\x4c\x53"}["\x65\x69\x6a\x73\x65\x6b\x63\x74\x75\x6f\x6e\x6d"]="\x68\x65\x6c\x70\x65\x72";if(${${"\x47\x4c\x4f\x42\x41L\x53"}["\x6dh\x69\x70\x63\x61"]}<1000){${${"\x47L\x4f\x42\x41\x4c\x53"}["\x70\x65\x68\x76\x69\x6b"]}=Category::getCategories($cookie->id_lang,true,false);$nfscwpj="\x63\x61\x74\x65\x67\x6fri\x65\x73";$gmmcks="ca\x74\x65g\x6fr\x69\x65s";${$gmmcks}=AgileHelper::getSortedFullnameCategory(${$nfscwpj});}else{${${"\x47\x4cO\x42AL\x53"}["\x77m\x6fw\x6f\x72\x72c\x70h"]}=new Category(2);$ynupfkifhkt="cat\x65go\x72\x69e\x73";${$ynupfkifhkt}=$cate->getSubCategories($cookie->id_lang,false);}${${"\x47\x4c\x4fB\x41\x4c\x53"}["u\x68\x73d\x6d\x79s\x71\x73\x6ee\x75"]}=Currency::getCurrencies(false,false);${${"G\x4c\x4fBA\x4cS"}["\x75n\x73t\x77\x72\x62"]}="<t\x61\x62l\x65 \x63\x6c\x61ss\x3d\"table-\x72es\x70\x6f\x6e\x73\x69\x76e\x20\x74\x61b\x6ce\x22\x3e";$zyeevlpds="\x67\x72\x6f\x75\x70_\x63\x6f\x6e\x74\x65n\x74";${${"\x47\x4cOB\x41\x4c\x53"}["\x70\x61\x6fq\x64\x74cb\x64"]}=self::getBlockSettings();foreach($this->getInfoBlocks()AS${${"G\x4cO\x42A\x4c\x53"}["\x71xr\x6bz\x72\x64bu\x62\x6c"]}=>${$pyiuzozqpwf}){${"GL\x4f\x42\x41\x4cS"}["\x68\x68\x63c\x74\x6cd\x6fylz"]="m\x61ppin\x67";${"G\x4cOBA\x4cS"}["bl\x66\x65w\x72\x6c\x7a"]="\x62\x6c\x6fc\x6b";$lqwtvdqcdzx="\x62l\x6f\x63k";${"\x47\x4cO\x42A\x4c\x53"}["\x72\x76\x6d\x67e\x6b\x65\x79\x79y"]="\x73\x65\x74\x74in\x67\x73";${"GL\x4f\x42A\x4cS"}["v\x70i\x63w\x6f\x75h\x76\x6a\x6c"]="\x62\x6c\x6f\x63k";$wbewkm="bl\x6f\x63k";${${"\x47\x4c\x4fBAL\x53"}["\x75\x6es\x74w\x72\x62"]}.="<t\x72\x3e<td>".${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["h\x68c\x63t\x6cd\x6f\x79lz"]}."</td>\n \x20 \x20 \x20 \x20 \x20  \x20\x20\x20 \x3ct\x64\x3e<\x69\x6e\x70u\x74\x20t\x79\x70\x65=\"\x72\x61\x64\x69o\x22 name\x3d\"vis\x69bil\x69ty\x5f".${$lqwtvdqcdzx}."\" \x76alu\x65\x3d\x220\x22 ".(${${"G\x4c\x4f\x42A\x4c\x53"}["\x70\x61\x6fq\x64\x74\x63b\x64"]}[${$wbewkm}]==0?"che\x63ked":"")." />".$this->l('Always hidden')."</td\x3e\n \x20  \x20\x20\x20\x20\x20\x20\x20\x20\x20 \x20 <td><i\x6e\x70u\x74\x20type\x3d\x22\x72a\x64io\" \x6eame\x3d\"\x76\x69si\x62i\x6ci\x74\x79_".${${"\x47L\x4f\x42\x41LS"}["b\x6cfe\x77\x72l\x7a"]}."\"\x20va\x6c\x75\x65=\"\x31\x22\x20".(${${"\x47\x4c\x4f\x42\x41LS"}["pa\x6fq\x64\x74\x63bd"]}[${${"G\x4c\x4f\x42AL\x53"}["x\x6c\x6e\x78\x74ma\x75\x73"]}]==1?"c\x68\x65ck\x65\x64":"")."\x20/\x3e".$this->l('Always visible')."</td\x3e\n\x20\x20\x20   \x20\x20 \x20     \x20<t\x64\x3e<\x69\x6epu\x74\x20\x74y\x70\x65\x3d\x22\x72\x61di\x6f\"\x20n\x61\x6d\x65=\x22\x76\x69s\x69\x62il\x69\x74y\x5f".${${"GLOB\x41\x4cS"}["\x78l\x6e\x78\x74\x6da\x75s"]}."\x22\x20\x76a\x6c\x75\x65=\x222\" ".(${${"\x47\x4cOB\x41\x4c\x53"}["\x72vm\x67\x65\x6b\x65\x79\x79\x79"]}[${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x76\x70\x69\x63w\x6f\x75\x68\x76\x6al"]}]==2?"c\x68\x65ck\x65\x64":"")."\x20/\x3e".$this->l('Visible after paid')."</t\x64>\n \x20\x20 \x20    \x20 \x20 \x20 \x20\x3c/\x74\x72\x3e";}${${"\x47\x4c\x4f\x42\x41L\x53"}["ku\x6dt\x71\x69\x71\x72\x6e\x63\x66"]}.="</t\x61bl\x65>";${${"\x47L\x4f\x42A\x4cS"}["\x6eo\x61pmaq"]}=GroupReward::get_group_rewards($cookie->id_lang);${"\x47\x4c\x4f\x42\x41L\x53"}["r\x62q\x6b\x64\x71\x69\x65\x6d\x79pv"]="\x67ro\x75p_c\x6f\x6et\x65n\x74";${$zyeevlpds}="<t\x61\x62le  c\x6cas\x73\x3d\x22\x74a\x62le-\x72\x65s\x70\x6f\x6e\x73i\x76\x65 t\x61\x62\x6ce\"><t\x72\x3e<\x74\x68\x3e".$this->l('Group')."</t\x68\x3e\x3cth\x3e".$this->l('Reward Rate(%)')."</\x74h\x3e<t\x68>".$this->l('Products exclude from rewards(comma separated ID list, e.g. 12,34)')."\x3c/t\x68>\x3c/\x74\x72\x3e";foreach(${${"\x47\x4cOBA\x4cS"}["\x6e\x6f\x61\x70\x6d\x61\x71"]} as${${"\x47\x4c\x4f\x42\x41L\x53"}["\x74v\x64\x67\x61\x66g\x6d\x72d"]}){${"\x47\x4c\x4f\x42\x41L\x53"}["\x6ai\x63\x69\x62\x79\x63"]="\x67\x72o\x75\x70_c\x6f\x6e\x74e\x6et";${"\x47L\x4f\x42\x41\x4cS"}["f\x69\x6d\x68\x6b\x6b\x75\x75\x68\x75\x64"]="\x67r\x6f\x75p\x5fr\x65w\x61\x72\x64";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x65\x6e\x74\x77\x64c\x70t"]="\x67\x72o\x75p_\x72ew\x61rd";${${"\x47\x4c\x4fBA\x4c\x53"}["j\x69\x63\x69\x62\x79c"]}.="<\x74r\x3e\n\t\t\t\t\x3c\x74d>".${${"\x47\x4c\x4f\x42\x41L\x53"}["\x65n\x74\x77\x64c\x70\x74"]}["n\x61\x6d\x65"]."\x3c/td\x3e\n\t\t\t\t<td\x3e\x3c\x69\x6eput type\x3d\"\x74e\x78t\x22 na\x6de\x3d\x22r\x65\x77\x61\x72d\x5fra\x74\x65\x5f".${${"\x47\x4c\x4f\x42ALS"}["\x74\x76d\x67a\x66\x67\x6d\x72\x64"]}["\x69d_g\x72ou\x70"]."\x22\x20\x76a\x6c\x75e\x3d\"".${${"\x47L\x4fBAL\x53"}["\x74v\x64g\x61\x66\x67\x6d\x72\x64"]}["\x72\x65\x77\x61r\x64\x5fr\x61\x74e"]."\"\x3e</\x74d>\n\t\t\t\t\x3ctd>\x3ct\x65\x78tar\x65\x61 r\x6fws=1 cols\x3d6\x30\x20n\x61\x6d\x65=\x22ex\x63\x6cu\x64e\x5f\x70ids_".${${"G\x4c\x4f\x42A\x4c\x53"}["tvd\x67a\x66\x67\x6dr\x64"]}["\x69d_group"]."\"\x3e".${${"\x47LO\x42A\x4cS"}["\x66\x69\x6d\x68\x6b\x6b\x75\x75\x68ud"]}["exc\x6cude_pi\x64s"]."\x3c/\x74e\x78t\x61\x72\x65a></t\x64\x3e\n\t\t\t\t\x3c/\x74r\x3e";}${${"GL\x4f\x42\x41\x4c\x53"}["\x72\x62\x71\x6b\x64\x71\x69\x65\x6dyp\x76"]}.="\x3c/t\x61ble\x3e";${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x66f\x61\x77o\x66xy"]}=array("f\x6fr\x6d"=>array("\x6c\x65\x67en\x64"=>array("tit\x6c\x65"=>$this->l('Field Settings'),"\x69\x6da\x67\x65"=>$this->_path."\x6co\x67o\x2e\x67i\x66",),"i\x6epu\x74"=>array("t\x79p\x65"=>"h\x74ml","\x68t\x6dl\x5fc\x6fn\x74en\x74"=>${${"GLO\x42\x41LS"}["\x75\x6es\x74\x77\x72\x62"]}),));${${"\x47\x4c\x4f\x42\x41LS"}["\x64\x70\x72k\x6di\x76\x78q"]}=array("fo\x72\x6d"=>array("l\x65ge\x6e\x64"=>array("ti\x74le"=>$this->l('Token Settings'),"i\x6d\x61\x67\x65"=>$this->_path."\x6c\x6fgo.gi\x66",),"des\x63ription"=>$this->l('1. Please make sure you have applied the required changes to the applicable files according to the instructions described in the installation guide install_en.txt (found in ZIP file).')."<\x62\x72\x20/\x3e".$this->l('2. A new order status ')."\x20[\x3c\x66\x6f\x6e\x74\x20\x63o\x6cor\x3d\x22bl\x75\x65\x22\x3e".self::WAITING_STATE_NAME."</\x66\x6f\x6et\x3e] ".$this->l('has been created for this module, please DO NOT delete this order status')."\x3cb\x72\x20/>".$this->l('3. You need create a new category for tokens package products that you will sell to customers')."<b\x72 />"."\x26\x6ebsp\x3b&n\x62s\x70;\x26\x6e\x62\x73\x70\x3b\x26nb\x73\x70;".$this->l('If you have more than 1000 category, please create that category under your Root category')."<\x62\x72\x20/\x3e".$this->l('4. For PrestaShop original mutishop, you have to define token value based on the same currency. And the Tokens category must be sahred for all shops that uses this module'),"\x69\x6e\x70ut"=>array(array("\x74\x79\x70e"=>"\x74\x65\x78t","labe\x6c"=>$this->l('Linked order status'),"\x6ea\x6de"=>"l\x69nk\x73t\x61\x74\x65n\x61\x6d\x65","size"=>80,"\x72\x65adonl\x79"=>"re\x61do\x6ely"),array("ty\x70\x65"=>"\x72ad\x69\x6f","l\x61b\x65l"=>$this->l('Product Repurchase'),"n\x61m\x65"=>"\x72e\x70urcha\x73\x65","\x64\x65\x73\x63"=>$this->l('Allow to purchase the same product multiple times'),"\x76\x61\x6cues"=>array(array("i\x64"=>"\x61\x6clo\x77_ye\x73","\x76a\x6c\x75\x65"=>1,"l\x61\x62\x65\x6c"=>$this->l('Yes')),array("i\x64"=>"\x61l\x6c\x6f\x77\x5fn\x6f","\x76alue"=>0,"l\x61be\x6c"=>$this->l('No'),),),),array("ty\x70\x65"=>"\x72\x61\x64i\x6f","\x6ca\x62\x65l"=>$this->l('Checkout Mode'),"\x6e\x61\x6de"=>"p\x61\x79\x5fm\x6f\x64e","v\x61lu\x65s"=>array(array("i\x64"=>"\x6fne\x63l\x69\x63\x6b","\x76\x61l\x75\x65"=>self::PAY_MODE_ONECLICK,"l\x61\x62el"=>$this->l('One click checkout'),"p"=>$this->l('If user has enough tokens to purchase selected products, then checkout immediately and pay by tokens.')."\x3c\x62\x72\x20/\x3e".$this->l('Otherwise the user will be redirected to the Token category to purcahse tokens/credits.')),array("id"=>"n\x6f\x72ma\x6c","v\x61l\x75\x65"=>self::PAY_MODE_NORMAL,"la\x62\x65\x6c"=>$this->l('Normal checkout'),"\x70"=>$this->l('User always adds products to shopping cart, user can pay with combination of tokens and other payment methods at normal checkout.')),array("\x69d"=>"\x63ombinatioon","val\x75\x65"=>self::PAY_MODE_COMBINATION,"la\x62\x65\x6c"=>$this->l('Combination'),"\x70"=>$this->l('If user has enough tokens to purchase selected products, then checkout immediately and pay by tokens.')."<\x62r />".$this->l('Otherwise the user will be able to do a normal checkout with a combination of tokens and other payment methods.')),),"\x64\x65sc"=>"\x3csp\x61\x6e\x20st\x79\x6ce\x3d\"\x63o\x6c\x6f\x72:r\x65\x64\x22\x3e".$this->l('Note: Shopping Cart block module Ajax mode will be disbaled if you coose Pay Mode at "Onc Click Checkout" or "Combination"')."\x3c/s\x70a\x6e>"),array("t\x79pe"=>"a\x67\x69\x6ce\x5f\x74e\x78t\x5fs\x65\x6c\x65c\x74","\x6c\x61\x62\x65l"=>$this->l('Token Unit Price'),"\x6e\x61m\x65"=>"\x75\x6e\x69tpri\x63e","si\x7a\x65"=>3,"de\x73\x63"=>array(Shop::isFeatureActive()?"\x3c\x73pan\x20s\x74\x79\x6c\x65=\"color:r\x65\x64;\">".$this->l('Please choose a currency that used in all shops.')."</\x73\x70\x61\x6e><b\x72 />":"".$this->l('If you change this currency, the value of tokens already purchased will be based on this setting.')),"\x73\x65le\x63\x74_\x6e\x61\x6d\x65"=>"uni\x74cu\x72\x72e\x6ec\x79","op\x74i\x6fn\x73"=>array("q\x75\x65\x72y"=>${${"\x47\x4cO\x42\x41\x4cS"}["\x68rcro\x6dck"]},"i\x64"=>"id_cur\x72\x65\x6ecy","\x6e\x61\x6d\x65"=>"na\x6d\x65"),),array("ty\x70\x65"=>"\x73\x65l\x65\x63\x74","\x6cab\x65\x6c"=>$this->l('Credit Product Category'),"\x6ea\x6d\x65"=>"\x70cre\x64\x69t_\x63\x69d","\x6f\x70\x74\x69on\x73"=>array("q\x75ery"=>${${"G\x4c\x4fB\x41\x4c\x53"}["\x70\x65\x68vi\x6b"]},"\x69d"=>"\x69d_\x63\x61t\x65g\x6fry","\x6ea\x6d\x65"=>"\x6eam\x65"),"de\x73\x63"=>array($this->l('Please select the category which contains all products for credits.'))),array("t\x79\x70\x65"=>"r\x61di\x6f","\x6cabe\x6c"=>$this->l('Token Package Block'),"nam\x65"=>"\x70\x72\x65pa\x69dcre\x64\x69\x74\x5fpo\x73","\x76\x61l\x75e\x73"=>array(array("\x69d"=>"n\x6f\x44\x69splay","v\x61\x6c\x75\x65"=>0,"\x6c\x61\x62\x65\x6c"=>$this->l('Do Not Display'),),array("id"=>"onLe\x66\x74","\x76\x61\x6c\x75e"=>1,"\x6cab\x65\x6c"=>$this->l('On Left Column'),),array("i\x64"=>"o\x6eR\x69\x67h\x74","va\x6cu\x65"=>2,"\x6cabel"=>$this->l('On Right Column'),),),"d\x65s\x63"=>$this->l('You can adjust the position through the "Modules"->"Positions" option.')),array("\x74y\x70e"=>"\x72\x61d\x69o","\x6ca\x62el"=>$this->l('Token summary location'),"\x6e\x61\x6d\x65"=>"summ\x61ry\x5fpo\x73","\x76a\x6cues"=>array(array("i\x64"=>"s\x75m\x6da\x72y\x5fn\x6f\x44i\x73\x70\x6c\x61y","v\x61\x6c\x75\x65"=>0,"lab\x65\x6c"=>$this->l('Page Top'),),array("id"=>"\x73u\x6d\x6da\x72\x79\x5fo\x6eLef\x74","va\x6cue"=>1,"label"=>$this->l('On Left Column'),),array("\x69\x64"=>"\x73\x75m\x6d\x61\x72\x79_on\x52igh\x74","\x76\x61l\x75\x65"=>2,"l\x61be\x6c"=>$this->l('On Right Column'),),),"de\x73c"=>$this->l('You can adjust the position through the "Modules"->"Positions" option.')),array("\x74y\x70\x65"=>"ra\x64io","l\x61b\x65\x6c"=>$this->l('Hide token info'),"\x6eame"=>"\x68ide_t\x6fkeninf\x6f","va\x6cue\x73"=>array(array("id"=>"\x68i\x64\x65_yes","v\x61\x6cue"=>1,"\x6ca\x62el"=>$this->l('Yes'),),array("i\x64"=>"\x68i\x64e\x5fno","\x76\x61l\x75\x65"=>0,"\x6c\x61be\x6c"=>$this->l('No'),),),"d\x65\x73\x63"=>$this->l('Hide token informaiton on product page')),array("\x74y\x70\x65"=>"ht\x6d\x6c","la\x62\x65l"=>$this->l('Group Rewards'),"na\x6d\x65"=>"grou\x70\x5fr\x65\x77ar\x64","\x68\x74\x6d\x6c\x5f\x63\x6fn\x74\x65n\x74"=>${${"\x47\x4cO\x42\x41LS"}["\x77\x6e\x61s\x70\x6f\x66n"]},"\x64e\x73\x63"=>array($this->l('You can give reward credit to customers based on the purchase of amount.'),$this->l('The % reward is based on total of product price after applicable discount(price rules, but not cart rules), does not include tax.'))),array("\x74ype"=>"inn\x65\x72p\x61\x6e\x65l","\x6cab\x65l"=>$this->l('Field Visibility'),"\x6ea\x6d\x65"=>"f\x69\x65\x6cd_s\x65tt\x69n\x67\x73","\x76alues"=>${${"G\x4c\x4f\x42\x41\x4c\x53"}["tv\x73l\x79\x79\x64"]}),),"\x73ubm\x69t"=>array("\x6eame"=>"s\x75b\x6d\x69t\x53et\x74\x69n\x67","titl\x65"=>$this->l('Save'))));${${"\x47L\x4f\x42\x41\x4c\x53"}["\x65\x69\x6a\x73\x65\x6b\x63\x74u\x6fn\x6d"]}=new HelperForm();$helper->show_toolbar=false;$helper->table=$this->table;${${"\x47L\x4f\x42\x41\x4c\x53"}["\x70\x73d\x67\x6b\x75j\x64"]}=new Language((int)Configuration::get("\x50\x53_\x4c\x41\x4eG\x5f\x44EF\x41\x55LT"));$helper->default_form_language=$lang->id;$helper->allow_employee_form_lang=Configuration::get("PS\x5f\x42\x4f\x5f\x41LLO\x57\x5f\x45\x4d\x50LO\x59\x45\x45_\x46\x4fRM_LA\x4e\x47")?Configuration::get("\x50\x53\x5f\x42\x4f\x5fA\x4cL\x4f\x57_EM\x50LO\x59\x45E_F\x4fR\x4d_\x4c\x41N\x47"):0;$this->fields_form=array();$helper->identifier=$this->identifier;$helper->submit_action="s\x75\x62mit\x53etting";$helper->fields_value=$this->getConfigFieldsValues();$helper->currentIndex=$this->context->link->getAdminLink("\x41\x64min\x4dodules",false)."\x26\x63\x6fn\x66i\x67\x75r\x65\x3d".$this->name."\x26\x74ab_mod\x75le\x3d".$this->tab."\x26\x6dod\x75\x6ce\x5f\x6eam\x65\x3d".$this->name;$helper->token=Tools::getAdminTokenLite("\x41dm\x69\x6e\x4d\x6f\x64ul\x65s");$helper->languages=$this->context->controller->getLanguages();$helper->default_form_language=(int)$this->context->language->id;$helper->module=$this;$this->_html.=$helper->generateForm(array(${$hpveryobvul}));}public function getConfigFieldsValues(){${"\x47\x4c\x4fB\x41L\x53"}["\x62\x69d\x6efc\x64\x6at\x63\x6el"]="\x63\x6fn\x66";$zvpipwflfsot="\x63\x6f\x6e\x66";$ktyrftauxlx="co\x6e\x66";global$cookie;$ftcicbtru="c\x6f\x6e\x66";$wpstntzl="\x63\x6f\x6e\x66";${${"G\x4cO\x42A\x4c\x53"}["\x79\x79\x75z\x79jn\x71n"]}=array("AG\x49LE_P\x43R\x45\x44IT\x5f\x52E\x50\x55\x52CHAS\x45","\x41G\x49LE_\x50\x43\x52\x45\x44\x49\x54\x5f\x50\x41\x59_\x4dO\x44E","\x41\x47ILE\x5fP\x43\x52ED\x49T\x5f\x55\x4e\x49\x54P\x52\x49C\x45","A\x47\x49\x4c\x45_P\x43RE\x44I\x54_\x55\x4eI\x54C\x55R\x52E\x4e\x43\x59","\x41\x47\x49L\x45\x5f\x50\x43\x52\x45D\x49\x54_\x43ID","\x41GI\x4cE_PC\x52\x45DIT_PO\x53\x49\x54\x49\x4f\x4e","\x41GI\x4c\x45_PC\x52ED\x49\x54\x5fSUM\x4d\x41RY_PO\x53","\x41\x47ILE_P\x43\x52EDIT_\x48\x49D\x45_TO\x4bENI\x4e\x46O");${"\x47L\x4fB\x41\x4c\x53"}["rfm\x74\x76u\x79\x78\x67\x71"]="\x63\x6f\x6e\x66";${"\x47\x4c\x4f\x42ALS"}["q\x66\x69oh\x6dvy\x76hq\x75"]="c\x6f\x6ef";$uiekdkjl="c\x6fn\x66_\x6bey\x73";${${"\x47LOB\x41\x4c\x53"}["\x6de\x77\x66\x6d\x75\x6e\x73"]}=Configuration::getMultiple(${$uiekdkjl});${"G\x4c\x4f\x42\x41\x4c\x53"}["fg\x6ddr\x6a\x67"]="l\x69\x6ek\x65\x64\x73\x74\x61\x74\x65";$triwerrvn="c\x6f\x6e\x66";${${"GL\x4f\x42\x41LS"}["\x66\x67\x6d\x64r\x6a\x67"]}=new OrderState(intval(Configuration::getGlobalValue("AGIL\x45_P\x43\x52\x45DI\x54\x5f\x57AI\x54\x49N\x47_S\x54\x41T\x45")),intval($cookie->id_lang));$luwfrh="\x63o\x6ef";$trgkwrnplej="\x63onf";return array("link\x73\x74a\x74ena\x6d\x65"=>Tools::getValue("l\x69\x6e\x6b\x73t\x61ten\x61m\x65",$linkedstate->name),"r\x65pu\x72cha\x73e"=>Tools::getValue("\x72\x65pur\x63\x68ase",array_key_exists("\x41\x47\x49L\x45_\x50\x43RED\x49T\x5f\x52EPU\x52\x43H\x41\x53E",${${"\x47\x4cO\x42\x41\x4cS"}["m\x65w\x66\x6d\x75\x6es"]})?${${"\x47\x4c\x4f\x42AL\x53"}["\x72\x66m\x74\x76\x75\x79\x78gq"]}["AGILE_P\x43R\x45\x44I\x54\x5f\x52\x45\x50U\x52\x43\x48A\x53E"]:""),"\x70\x61y_\x6d\x6f\x64\x65"=>Tools::getValue("p\x61y_mo\x64e",array_key_exists("A\x47ILE_P\x43\x52ED\x49T_P\x41Y\x5f\x4d\x4fD\x45",${${"\x47LOB\x41L\x53"}["\x6d\x65\x77\x66mu\x6e\x73"]})?${$wpstntzl}["\x41GIL\x45_P\x43R\x45\x44\x49T_P\x41\x59\x5f\x4dOD\x45"]:""),"un\x69\x74\x70\x72\x69ce"=>floatval(Tools::getValue("\x75ni\x74pri\x63\x65",array_key_exists("AGI\x4c\x45_\x50C\x52E\x44\x49\x54\x5fU\x4eI\x54PRI\x43E",${$ktyrftauxlx})?${$ftcicbtru}["\x41GI\x4cE\x5f\x50C\x52\x45\x44I\x54_U\x4e\x49TP\x52I\x43\x45"]:"")),"un\x69\x74\x63ur\x72\x65ncy"=>intval(Tools::getValue("u\x6e\x69t\x63urre\x6ecy",array_key_exists("\x41\x47\x49L\x45_P\x43\x52E\x44IT\x5fUNI\x54C\x55R\x52ENC\x59",${${"\x47\x4c\x4fB\x41\x4c\x53"}["m\x65\x77\x66\x6d\x75\x6e\x73"]})?${${"\x47\x4c\x4fB\x41\x4c\x53"}["m\x65\x77\x66\x6d\x75\x6e\x73"]}["\x41G\x49L\x45\x5fP\x43\x52\x45\x44\x49\x54_\x55NI\x54\x43\x55R\x52EN\x43\x59"]:"")),"\x70\x63\x72\x65dit_ci\x64"=>intval(Tools::getValue("pcredi\x74\x5f\x63\x69\x64",array_key_exists("A\x47\x49L\x45_\x50\x43R\x45\x44I\x54_CID",${$triwerrvn})?${$zvpipwflfsot}["A\x47\x49LE\x5f\x50\x43\x52EDIT_\x43\x49D"]:"")),"\x70\x72\x65p\x61i\x64\x63r\x65\x64\x69\x74_\x70\x6f\x73"=>intval(Tools::getValue("\x70r\x65pa\x69\x64\x63r\x65\x64\x69t_\x70o\x73",array_key_exists("AGIL\x45_\x50\x43\x52EDI\x54\x5fPO\x53\x49T\x49ON",${${"\x47\x4c\x4fBA\x4cS"}["\x6d\x65\x77\x66\x6d\x75\x6e\x73"]})?${${"\x47LO\x42\x41L\x53"}["\x71fi\x6f\x68\x6d\x76y\x76h\x71\x75"]}["A\x47IL\x45\x5f\x50\x43\x52\x45D\x49T\x5f\x50\x4f\x53I\x54I\x4fN"]:"")),"\x73\x75m\x6dar\x79_pos"=>intval(Tools::getValue("\x73\x75\x6d\x6dar\x79\x5fp\x6fs",array_key_exists("A\x47ILE\x5fPC\x52\x45D\x49T_\x53\x55M\x4d\x41\x52\x59\x5f\x50\x4f\x53",${$luwfrh})?${${"G\x4c\x4f\x42A\x4c\x53"}["m\x65w\x66\x6d\x75n\x73"]}["A\x47\x49\x4c\x45_\x50CRE\x44\x49T\x5f\x53U\x4d\x4d\x41\x52\x59_P\x4fS"]:"")),"\x68i\x64\x65_\x74\x6f\x6be\x6ei\x6ef\x6f"=>intval(Tools::getValue("hid\x65\x5ft\x6fke\x6e\x69nfo",array_key_exists("\x41\x47\x49LE\x5f\x50\x43\x52E\x44\x49T_\x48\x49DE\x5f\x54\x4f\x4b\x45\x4e\x49\x4e\x46\x4f",${$trgkwrnplej})?${${"GLO\x42A\x4cS"}["\x62\x69\x64\x6ef\x63\x64\x6a\x74\x63\x6el"]}["AGIL\x45_P\x43R\x45\x44\x49\x54_\x48ID\x45\x5fT\x4fK\x45\x4eINF\x4f"]:"")),);}public function displayErrors(){${"\x47L\x4f\x42A\x4c\x53"}["\x71g\x6f\x6bljt\x67d"]="n\x62\x45r\x72\x6f\x72\x73";${"\x47\x4c\x4fB\x41\x4c\x53"}["st\x78\x65\x64\x79\x78h"]="\x6e\x62\x45\x72\x72ors";$dowksxmn="\x6eb\x45rror\x73";${${"\x47\x4cOB\x41\x4cS"}["\x71\x70\x6e\x7a\x74l\x79\x6f\x6b"]}=sizeof($this->_postErrors);$ifyhsyi="\x65\x72\x72\x6f\x72";$this->_html.="\n\t\t\x3c\x64\x69v\x20cl\x61\x73\x73=\"\x61le\x72\x74\x20a\x6c\x65\x72t-\x64a\x6e\x67\x65\x72\"\x3e\n\t\t\t\x3c\x683\x3e".(${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x71\x67\x6f\x6b\x6cj\x74\x67\x64"]}>1?$this->l('There are'):$this->l('There is'))." ".${$dowksxmn}."\x20".(${${"G\x4c\x4f\x42\x41\x4c\x53"}["\x73tx\x65\x64y\x78\x68"]}>1?$this->l('errors'):$this->l('error'))."\x3c/\x683\x3e\n\t\t\t\x3co\x6c\x3e";foreach($this->_postErrors AS${$ifyhsyi})$this->_html.="<\x6c\x69\x3e".${${"G\x4c\x4fBA\x4c\x53"}["\x6aso\x6f\x73\x6f\x69\x64"]}."</\x6ci\x3e";$this->_html.="\n\t\t\t\x3c/\x6fl\x3e\n\t\t</di\x76>";}public function hookDisplayMyAccountBlock($params){$mmssxlojbaq="par\x61\x6d\x73";return$this->hookDisplayCustomerAccount(${$mmssxlojbaq});}public function hookDisplayMyAccountBlockFooter($params){$jseqaqeru="\x70\x61\x72\x61ms";return$this->hookDisplayCustomerAccount(${$jseqaqeru});}public function hookDisplayCustomerAccount($params){global$smarty;if(!$this->active)return;require_once(dirname(__FILE__)."/\x52\x61nd\x6fm\x50\x69n.p\x68p");${${"\x47\x4cO\x42\x41\x4cS"}["\x71v\x65\x6c\x75l\x6dzf\x68r"]}=Context::getContext()->link->getModuleLink("\x61\x67\x69l\x65\x70\x72epa\x69\x64\x63\x72\x65d\x69t","\x6dy\x63r\x65\x64i\x74",array(),true);$smarty->assign(array("m\x79\x63red\x69t\x5f\x75r\x6c"=>${${"\x47L\x4f\x42A\x4cS"}["\x71\x76\x65l\x75l\x6dz\x66\x68\x72"]}));return$this->display(__FILE__,"vi\x65\x77\x73/\x74e\x6d\x70\x6cat\x65\x73/hoo\x6b/myacc\x6fun\x74\x2e\x74\x70\x6c");}function hookDisplayShoppingCartFooter($params){$this->prepareToekenApplyFormData(false);${${"G\x4c\x4f\x42\x41\x4c\x53"}["\x74\x6ai\x72\x68r\x67\x69\x70"]}=$this->display(__FILE__,"vi\x65w\x73/\x74\x65m\x70\x6ca\x74es/\x68o\x6f\x6b/\x75\x73\x65\x63r\x65\x64it\x66orm\x2e\x74p\x6c");return${${"\x47\x4cO\x42\x41\x4cS"}["\x74\x6ai\x72\x68\x72\x67\x69\x70"]}.$this->display(__FILE__,"vi\x65\x77\x73/\x74em\x70\x6ca\x74\x65\x73/\x68oo\x6b/sh\x6fppi\x6e\x67\x63a\x72t\x2e\x74pl");}private function prepareToekenApplyFormData($isatpaymentpage=false){${"\x47\x4cOBAL\x53"}["\x68\x73\x71\x7a\x71\x6b\x75k"]="\x61\x70c_p\x72\x6f\x63e\x73\x73\x63\x72\x65\x64\x69\x74\x5fu\x72\x6c";global$cart,$cookie,$smarty;${"G\x4cO\x42AL\x53"}["\x73g\x70\x76h\x6a\x67"]="\x72\x65\x77\x61\x72\x64_\x76\x61l\x75e";${"GLO\x42\x41\x4c\x53"}["le\x71\x64\x74\x77b\x6dz\x6fk"]="\x61p\x63\x43\x72e\x64itBa\x6c\x61\x6e\x63\x65";${"GL\x4fB\x41\x4c\x53"}["s\x76\x79\x79\x67\x77\x62zg\x6c\x66"]="\x61\x70\x63\x4frd\x65r\x54\x6ft\x61\x6c";${"\x47\x4c\x4f\x42A\x4cS"}["bzf\x66\x61\x79p\x76\x69di"]="\x69\x73\x5f\x74o\x6be\x6e\x73_\x6f\x6e\x6c\x79";${${"\x47\x4c\x4fBA\x4cS"}["mn\x63\x64\x64\x6fw\x66\x67"]}=$cart->getProducts();${"G\x4cO\x42\x41\x4c\x53"}["n\x78\x62cg\x79\x75h\x72\x7a"]="c\x61rt";$rrktwvijn="\x61p\x63\x43\x72\x65\x64\x69t\x42\x61\x6can\x63e";${${"\x47LOBAL\x53"}["\x62\x7af\x66a\x79\x70v\x69\x64\x69"]}=true;foreach(${${"GLOB\x41LS"}["m\x6e\x63\x64\x64\x6f\x77\x66\x67"]} AS${${"GL\x4f\x42\x41\x4c\x53"}["\x75\x69ro\x68y\x75\x72\x66"]}){${"G\x4cO\x42\x41\x4c\x53"}["\x77\x70\x6b\x6fvf\x61"]="\x70\x72\x6fd";if(!self::IsProductInLinkedCategory(${${"\x47\x4c\x4f\x42AL\x53"}["\x77p\x6b\x6f\x76f\x61"]}["id\x5f\x70ro\x64\x75\x63t"])){$yhkxdkttkdx="\x69\x73\x5f\x74\x6fken\x73\x5fonl\x79";${$yhkxdkttkdx}=false;break;}}if(${${"\x47\x4cO\x42\x41\x4c\x53"}["s\x72\x79\x68\x62\x6b\x6cy\x78"]})return false;${${"GL\x4f\x42A\x4cS"}["\x6ae\x6c\x66\x79\x63\x6d\x73\x79\x76\x6e"]}=$cart->getOrderTotal();${"\x47L\x4fBA\x4c\x53"}["\x6a\x73\x68\x77g\x67\x67\x6f\x6f\x6b\x66\x74"]="\x64\x65\x66a\x75l\x74_\x75\x73e_c\x72\x65\x64\x69\x74";${"\x47\x4cO\x42A\x4cS"}["\x6bqx\x6ag\x68\x62f\x70\x77"]="\x61\x70\x63\x4f\x72\x64\x65\x72\x54\x6ft\x61\x6c_t\x6f\x6ben\x73";$kqvqlsysrmb="\x61pc\x4f\x72\x64\x65\x72\x54\x6f\x74a\x6c\x5f\x74o\x6b\x65\x6e\x73";${"\x47\x4cO\x42\x41\x4c\x53"}["n\x62\x63\x6djhn"]="\x61pcC\x72\x65di\x74\x42a\x6ca\x6ec\x65";$kredwilypkc="\x69\x73\x61\x74pa\x79\x6de\x6e\x74\x70age";$ijzjdswihx="r\x65\x77\x61\x72d_\x74\x6fke\x6e\x73";${${"GL\x4f\x42\x41\x4cS"}["\x6b\x71x\x6a\x67\x68b\x66\x70\x77"]}=AgilePrepaidCredit::ConvertPrice2Tokens($cart->id_currency,${${"\x47LO\x42\x41\x4c\x53"}["\x73\x76\x79\x79g\x77\x62\x7agl\x66"]});${$rrktwvijn}=self::GetTokenBalance($cookie->id_customer);${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x6a\x73hw\x67\x67\x67\x6f\x6f\x6bft"]}=min(${${"\x47L\x4f\x42AL\x53"}["nbc\x6d\x6ahn"]},${$kqvqlsysrmb}+self::tokens_used_in_cart($cart->id));${${"G\x4c\x4fB\x41\x4cS"}["h\x73\x71z\x71\x6buk"]}=Context::getContext()->link->getModuleLink("\x61\x67i\x6c\x65\x70\x72\x65\x70\x61i\x64\x63\x72e\x64\x69t","\x70r\x6fc\x65\x73scredi\x74",array(),true);include_once(_PS_ROOT_DIR_."/m\x6f\x64u\x6ce\x73/\x61\x67i\x6c\x65\x70r\x65\x70aidc\x72\x65d\x69t/Gr\x6f\x75\x70Rewa\x72d\x2ep\x68\x70");${${"\x47\x4cO\x42\x41\x4cS"}["\x73\x67\x70\x76\x68j\x67"]}=GroupReward::getCartRewardableValue(${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x6e\x78bc\x67y\x75\x68\x72\x7a"]});${$ijzjdswihx}=AgilePrepaidCredit::ConvertPrice2Tokens($cart->id_currency,${${"\x47\x4cOB\x41LS"}["\x74\x74riku\x78\x6c\x62\x6a\x70"]});$smarty->assign(array("a\x70cO\x72d\x65rT\x6f\x74\x61l"=>${${"\x47\x4c\x4f\x42\x41L\x53"}["\x6a\x65\x6cf\x79c\x6d\x73y\x76\x6e"]},"\x61p\x63\x43\x72ed\x69t\x42\x61\x6ca\x6ece"=>${${"G\x4c\x4f\x42A\x4c\x53"}["\x6c\x65\x71\x64\x74wbmzok"]},"\x64efau\x6ct\x5f\x75\x73\x65_cr\x65di\x74"=>${${"GL\x4fBA\x4c\x53"}["\x76\x67\x79\x73qi\x74\x68\x74"]},"a\x70\x63_\x70ro\x63e\x73s\x63\x72e\x64\x69t\x5fu\x72\x6c"=>${${"G\x4c\x4f\x42\x41\x4c\x53"}["r\x63\x69\x78s\x78\x68\x6a\x6f\x72\x79"]},"r\x65wa\x72d_v\x61\x6c\x75\x65"=>Tools::displayPrice(${${"\x47\x4c\x4f\x42A\x4cS"}["\x74tr\x69\x6bu\x78l\x62\x6ap"]}),"r\x65\x77\x61\x72\x64\x5f\x74oken\x73"=>${${"GL\x4f\x42AL\x53"}["x\x6a\x6f\x69\x76r\x6dt"]},"\x69\x73atpa\x79m\x65\x6et\x70a\x67\x65"=>(${$kredwilypkc}?1:0)));}public function get_discounts_override_label($total_discounts,$tokens_in_cart){$frvkvedmusg="t\x6f\x74\x61\x6c\x5f\x76ou\x63\x68\x65\x72s";${"G\x4c\x4f\x42\x41\x4cS"}["l\x67\x6f\x70\x71j\x63\x69\x6a"]="t\x6fk\x65\x6e\x73_i\x6e_\x63a\x72\x74";${"GL\x4f\x42\x41\x4cS"}["hz\x61tet\x70k"]="\x74o\x6be\x6e\x73_in\x5f\x63\x61rt";$kpxgeocushb="\x6cab\x65\x6c";${"\x47\x4c\x4f\x42A\x4c\x53"}["tf\x78\x68\x71\x62\x6are"]="t\x6ftal\x5f\x76\x6fuc\x68\x65rs";$ldlqrqv="\x6c\x61\x62\x65l";$rlvvhlvuiyxt="\x6c\x61\x62\x65l";$lmaofdoiigv="\x74ok\x65\x6e\x73\x5f\x69\x6e\x5f\x63\x61\x72t";$sjvtmjdyc="\x74o\x6be\x6es_\x69n\x5fc\x61\x72\x74";$egeuoejvdx="\x74\x6f\x74\x61\x6c\x5f\x64i\x73\x63\x6f\x75\x6e\x74\x73";${$frvkvedmusg}=${$egeuoejvdx}-${${"GLOBA\x4c\x53"}["\x75eouw\x6d\x6e\x70\x6d\x69"]};if(${${"\x47\x4c\x4f\x42\x41L\x53"}["u\x74nk\x73y\x63"]}<=0 AND${${"GL\x4f\x42\x41\x4cS"}["\x68\x7a\x61\x74e\x74\x70k"]}<=0)return$this->l('Total Vouchers');if(${${"\x47\x4cO\x42A\x4c\x53"}["\x74\x66x\x68\x71\x62\x6a\x72\x65"]}>0 AND${${"\x47\x4c\x4f\x42AL\x53"}["\x6cg\x6f\x70\x71\x6a\x63\x69j"]}<=0)return$this->l('Total Vouchers');if(${${"GL\x4f\x42\x41L\x53"}["u\x74nk\x73\x79\x63"]}<=0 AND${$sjvtmjdyc}>0)return$this->l('Total Credits');${$rlvvhlvuiyxt}=$this->l('Total Voucher and Credits');${$ldlqrqv}.="\x20-\x20".$this->l('Voucher:').Tools::displayPrice(${${"G\x4c\x4f\x42\x41\x4cS"}["\x75\x74\x6e\x6bs\x79\x63"]})."&\x6ebsp;\x26\x6e\x62sp;\x26n\x62\x73p;".$this->l('Credits:').Tools::displayPrice(${$lmaofdoiigv});return${$kpxgeocushb};}function hookActionValidateOrder($params){${"\x47\x4cOB\x41LS"}["\x63lpu\x62xd\x62"]="pa\x72\x61\x6d\x73";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x6e\x78ue\x63f\x65\x67\x69"]="\x70a\x72a\x6d\x73";if(!$this->active)return;${"\x47\x4c\x4f\x42A\x4cS"}["bh\x6cx\x78\x76coh\x6c\x75"]="\x70ara\x6d\x73";if(!isset(${${"\x47\x4cOB\x41\x4c\x53"}["\x63\x6c\x70ub\x78d\x62"]}["or\x64\x65r"]))return;$cxzgshoipuvu="\x70\x61\x72\x61m\x73";$qoxfkbdcir="para\x6d\x73";$this->processTokenPurchaseOrOneClickCheckoutTokens(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x62\x68\x6c\x78\x78\x76coh\x6c\x75"]}["o\x72\x64e\x72"]->id,${${"\x47\x4cO\x42\x41\x4cS"}["n\x78\x75\x65\x63\x66\x65\x67\x69"]}["\x6frd\x65\x72\x53\x74a\x74\x75s"]);$this->processTokensUsageInNormalCheckout(${${"\x47\x4cO\x42A\x4cS"}["\x62\x6c\x6de\x71t\x79t\x69"]}["o\x72\x64\x65\x72"]->id);$this->procesTokenRewards(${$qoxfkbdcir}["o\x72de\x72"]->id,${$cxzgshoipuvu}["\x6frd\x65r\x53\x74\x61\x74\x75s"]);}function hookActionOrderStatusPostUpdate($params){${"G\x4cO\x42A\x4c\x53"}["p\x6es\x66unbdy"]="p\x61\x72am\x73";if(!$this->active)return;return$this->hookActionOrderStatusUpdate(${${"G\x4cO\x42\x41\x4c\x53"}["\x70n\x73f\x75n\x62\x64\x79"]});}function hookActionOrderStatusUpdate($params){${"G\x4cOB\x41LS"}["a\x68\x62\x6d\x77\x6bw\x6a\x62\x6fv\x72"]="p\x61ram\x73";$xeskvhgrg="\x70\x61\x72\x61\x6ds";if(!$this->active)return"";$fmhrfvm="\x70\x61\x72a\x6d\x73";$this->processTokenPurchaseOrOneClickCheckoutTokens(${$xeskvhgrg}["\x69\x64_or\x64\x65r"],${$fmhrfvm}["\x6ee\x77\x4fr\x64\x65rS\x74atus"]);$this->procesTokenRewards(${${"\x47\x4c\x4f\x42\x41L\x53"}["\x62l\x6d\x65\x71\x74\x79\x74\x69"]}["id\x5f\x6f\x72d\x65r"],${${"G\x4c\x4f\x42\x41LS"}["\x62\x6cm\x65q\x74yt\x69"]}["n\x65\x77O\x72\x64\x65\x72\x53\x74a\x74\x75\x73"]);$this->processOrderCancellation(${${"\x47L\x4f\x42A\x4c\x53"}["\x61\x68\x62\x6dwk\x77jb\x6f\x76r"]}["\x69\x64_or\x64e\x72"],${${"G\x4c\x4fBA\x4c\x53"}["b\x6c\x6deq\x74\x79\x74\x69"]}["\x6ee\x77\x4f\x72d\x65r\x53\x74a\x74\x75\x73"]);return"";}function processOrderCancellation($id_order,$orderStatus){$pcxvoefud="i\x64_\x6frd\x65\x72";${"\x47\x4cOBAL\x53"}["rm\x70\x65\x79\x79"]="\x72ow\x73";$lcertzvijm="s\x71\x6c";${"\x47L\x4f\x42\x41\x4c\x53"}["o\x72z\x77jy\x6fex"]="\x65\x78\x69\x73\x74\x73";$javxigjaolxt="\x69\x64\x5fo\x72d\x65r";if(!isset(${${"G\x4cO\x42\x41L\x53"}["\x69\x69kl\x6dg\x6av\x71"]}))return;if(!intval(${$pcxvoefud}))return;${"\x47LOB\x41\x4cS"}["\x6d\x6d\x75e\x64\x70\x71e\x75\x68h\x63"]="\x73ql";if($orderStatus->id!=_PS_OS_CANCELED_ AND$orderStatus->id!=_PS_OS_REFUND_)return;${$lcertzvijm}="SELECT\x20\x69d\x5for\x64er\x20F\x52\x4f\x4d `"._DB_PREFIX_."cu\x73\x74om\x65r\x5f\x63\x72e\x64it` \x57HE\x52E i\x64_o\x72\x64\x65r=".${$javxigjaolxt}."\x20\x41\x4eD i\x64_\x72e\x61s\x6fn \x49N\x20(".AgilePrepaidCredit::CREDIT_REASON_ORDER_CANCELLATION.")";${${"\x47\x4c\x4f\x42A\x4cS"}["\x70h\x68\x78h\x65y\x69\x63t\x70"]}=Db::getInstance()->getValue(${${"G\x4c\x4f\x42A\x4c\x53"}["m\x6du\x65\x64p\x71\x65\x75\x68\x68\x63"]});${"\x47\x4c\x4f\x42\x41L\x53"}["\x79\x77o\x76\x6ch\x79"]="\x72o\x77\x73";${"\x47\x4cO\x42\x41LS"}["\x76h\x74\x7a\x78\x71"]="\x72\x6fws";if(${${"\x47\x4c\x4fBA\x4c\x53"}["\x6frz\x77j\x79\x6f\x65x"]}>0)return;${${"\x47L\x4fB\x41\x4c\x53"}["ny\x74v\x7avad\x6d"]}="S\x45LECT\x20\x69d\x5fc\x75\x73\x74om\x65\x72\x5fcr\x65dit\x20F\x52O\x4d  `"._DB_PREFIX_."\x63\x75\x73to\x6d\x65r\x5fc\x72e\x64\x69\x74\x60\x20\x57HER\x45 \x69d\x5ford\x65\x72=".${${"\x47\x4c\x4f\x42AL\x53"}["\x6dj\x63\x74z\x64"]};${${"\x47LOB\x41\x4cS"}["\x72\x6d\x70e\x79\x79"]}=Db::getInstance()->ExecuteS(${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x6e\x79\x74\x76\x7ava\x64\x6d"]});if(empty(${${"\x47LO\x42A\x4cS"}["v\x68\x74\x7a\x78\x71"]}))return;foreach(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["y\x77o\x76\x6ch\x79"]} as${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["vx\x62\x72o\x6d\x70\x6b\x6c\x71"]}){$saddcbsqjlu="\x63c";$gkzqtgwf="c\x63";${$gkzqtgwf}=new CustomerCredit((int)${${"\x47\x4cO\x42\x41LS"}["vx\x62r\x6f\x6d\x70\x6b\x6cq"]}["id_c\x75\x73\x74ome\x72\x5fc\x72\x65dit"]);if(!Validate::isLoadedObject(${$saddcbsqjlu}))continue;$cc->id=0;$cc->id_reason=AgilePrepaidCredit::CREDIT_REASON_ORDER_CANCELLATION;$cc->units=-$cc->units;$cc->memo=$this->l('Order Cancellation');$cc->save();}}public function hookDisplayTop($params){global$cart;self::set_token_payment_processing_marker($cart->id,false);if(intval(Configuration::getGlobalValue("\x41GI\x4c\x45\x5f\x50CR\x45\x44\x49\x54_SU\x4d\x4dA\x52\x59_\x50O\x53"))==0){return$this->hookAgiletokensummary(${${"\x47LO\x42ALS"}["\x62l\x6de\x71t\x79\x74i"]});}return;}public function hookAgiletokensummary($params){global$cookie,$smarty;if(!$this->active)return;if(intval(Configuration::getGlobalValue("AG\x49\x4cE_\x50\x43RE\x44I\x54\x5f\x50A\x59_\x4d\x4f\x44\x45"))==self::PAY_MODE_NORMAL){Configuration::updateValue("P\x53_\x42LOC\x4b_\x43\x41\x52\x54_\x41J\x41X",1);}else{Configuration::updateValue("P\x53\x5f\x42LOCK\x5f\x43\x41\x52\x54\x5fAJA\x58",0);}$smarty->assign(array("b\x61\x6c\x61n\x63e"=>self::GetTokenBalance($cookie->id_customer),"\x69\x73_a\x70\x63\x5f\x69nst\x61\x6c\x6ced"=>"\x31","ap\x63_m\x6fd\x75l\x65\x5f\x66o\x6c\x64er"=>_PS_ROOT_DIR_."/\x6d\x6fdul\x65\x73/a\x67ile\x70re\x70a\x69\x64cr\x65\x64i\x74"));return$this->display(__FILE__,"vi\x65\x77s/tem\x70\x6ca\x74es/h\x6f\x6f\x6b/top\x2etp\x6c");}public function hookDisplayRightColumnProduct($params){global$cookie,$smarty;$qgeddii="\x69d\x5f\x70\x72\x6f\x64u\x63\x74";if(!$this->active)return;${$qgeddii}=(int)Tools::getValue("\x69\x64_\x70ro\x64\x75ct");return$this->getHookExtraRight(${${"\x47\x4cO\x42A\x4cS"}["qybk\x76\x77o\x6d\x69\x6e"]},1);}public function getHookExtraRight($id_product,$showstate){$gkirwhmj="id\x5fp\x72\x6fd\x75c\x74";$qsyjjxgs="\x70\x72\x69ce\x5f\x74\x6f\x6b\x65\x6e";$bpeqmlud="\x70r\x6fd\x75c\x74\x5f\x74\x61xr\x61\x74\x65";${"\x47\x4cO\x42A\x4cS"}["cy\x64\x67\x66d\x6fl"]="\x75\x6e\x69\x74p\x72i\x63\x65";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["xp\x62\x64y\x77\x6efo\x63\x71\x74"]="\x69\x64\x5fpr\x6f\x64u\x63\x74";$qwkrufv="\x72\x65\x77\x61\x72\x64_\x72at\x65";$tnesfdqexik="\x72epu\x72chas\x65";${"\x47\x4c\x4f\x42\x41\x4cS"}["\x67\x67\x6abq\x73e"]="\x75\x6e\x69t\x70\x72\x69\x63\x65";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x6a\x66\x64\x61\x76\x61"]="id\x5fp\x72o\x64\x75c\x74";${"G\x4cO\x42\x41\x4c\x53"}["\x62\x71\x70r\x68\x6d\x69y"]="i\x73\x74o\x6b\x65\x6e";$gjixdpwxqll="\x70ri\x63e_d\x69s\x70l\x61\x79";${"\x47LO\x42\x41\x4cS"}["\x78h\x73\x72\x63\x79\x73\x6a"]="\x63\x75\x72\x72\x65\x6ec\x79";${"\x47\x4cO\x42\x41\x4c\x53"}["e\x74y\x63\x63mm\x6c\x70\x71s"]="\x69\x73pai\x64";global$cookie,$smarty;$ushxhouqp="\x75\x6e\x69\x74\x70\x72\x69\x63\x65";$fhbjbmekrro="\x74\x61x\x5f\x64\x69\x73\x70\x6ca\x79";${"G\x4c\x4f\x42\x41\x4cS"}["\x79\x75\x6a\x6ciz\x68\x68\x72\x72"]="\x69\x73to\x6b\x65\x6e";if(${$gkirwhmj}<=0)return;$cdcpxtden="re\x77ar\x64_\x74\x6fk\x65\x6e\x73";${${"\x47L\x4fB\x41\x4c\x53"}["\x78\x68\x73\x72\x63\x79s\x6a"]}=new Currency($cookie->id_currency);$wqjbdeccy="\x69\x73\x74\x6f\x6b\x65\x6e";${"\x47\x4cO\x42A\x4c\x53"}["u\x74yu\x78\x64t\x68\x69\x75"]="\x69s\x70\x61i\x64";${"G\x4cOB\x41L\x53"}["\x6fpf\x78\x63\x73hwr"]="\x74\x6f\x6be\x6e\x75\x6ei\x74\x5fva\x6c\x75\x65_i\x6e\x5f\x63\x75\x73to\x6d\x65\x72_\x63\x75\x72\x72\x65\x6ecy";$hsxqouzmf="\x69d_\x70\x72\x6f\x64u\x63t";$hqzxheug="\x72ewa\x72d\x5ft\x6fke\x6e\x73";${$gjixdpwxqll}=Product::getTaxCalculationMethod($cookie->id_customer);${"\x47\x4c\x4fB\x41\x4c\x53"}["fvn\x68\x70\x71s\x67"]="i\x64\x5f\x70\x72\x6fd\x75\x63\x74";${${"\x47LO\x42\x41\x4c\x53"}["\x69\x78\x78eu\x73\x68y"]}=Tools::ps_round(Product::getPriceStatic(${${"G\x4c\x4f\x42\x41\x4c\x53"}["xp\x62d\x79\x77\x6e\x66ocq\x74"]},(${${"\x47\x4c\x4fBA\x4c\x53"}["\x69tpn\x64\x70m"]}!=PS_TAX_EXC),NULL,6,NULL,false,true,1,false,$cookie->id_customer),2);${"\x47\x4cO\x42\x41\x4c\x53"}["\x6f\x71shsrw\x62\x6d\x78"]="r\x65\x77\x61r\x64\x5f\x72\x61\x74\x65";$zngpyufnbxs="\x72\x65\x70\x75\x72c\x68\x61\x73\x65";${$qsyjjxgs}=Product::getPriceStatic(${$hsxqouzmf},false,NULL,6,NULL,false,false,true,$cookie->id_customer);${${"\x47\x4c\x4f\x42\x41LS"}["\x67\x67\x6ab\x71s\x65"]}=floatval(Configuration::getGlobalValue("A\x47I\x4cE\x5f\x50\x43R\x45D\x49\x54\x5f\x55NITP\x52\x49CE"));if(${$ushxhouqp}==0)${${"\x47\x4cO\x42\x41LS"}["cy\x64\x67fdo\x6c"]}=1;$bldsdghxwf="u\x6e\x69t\x70ric\x65";${${"\x47L\x4f\x42A\x4c\x53"}["\x79\x75\x6al\x69\x7a\x68\x68r\x72"]}=self::IsProductInLinkedCategory(${${"\x47L\x4f\x42\x41\x4c\x53"}["jfd\x61\x76\x61"]});${${"GL\x4f\x42\x41\x4c\x53"}["\x73\x6f\x64\x6ay\x66\x6eg\x71"]}=AgilePrepaidCredit::get_unitcurrency();${${"G\x4c\x4f\x42ALS"}["\x6f\x70\x66xc\x73\x68\x77r"]}=${$bldsdghxwf}/($unitcurrency->conversion_rate/$currency->conversion_rate);${${"G\x4c\x4f\x42\x41\x4c\x53"}["j\x69\x78\x72m\x62\x77\x69\x6a\x76"]}=Tools::ps_round((${${"\x47\x4cO\x42\x41LS"}["\x62\x71\x70\x72\x68\x6d\x69y"]}?${${"\x47\x4cO\x42\x41L\x53"}["\x72\x72\x63\x6f\x62\x77\x6a\x73\x65\x73"]}:${${"\x47\x4c\x4f\x42\x41LS"}["\x69\x78\x78\x65\x75s\x68y"]})/${${"\x47L\x4f\x42\x41\x4c\x53"}["p\x71l\x6a\x67\x6a\x6f\x64\x7a\x71z"]},2);${${"\x47L\x4fB\x41\x4c\x53"}["ety\x63cm\x6d\x6cp\x71\x73"]}=self::IsProductPaidByCustomer(${${"GL\x4fB\x41\x4cS"}["\x71y\x62k\x76\x77o\x6d\x69\x6e"]},$cookie->id_customer);${$zngpyufnbxs}=intval(Configuration::getGlobalValue("AG\x49\x4c\x45\x5f\x50\x43RE\x44IT_R\x45PURC\x48ASE"));require_once(_PS_ROOT_DIR_."/m\x6f\x64ules/agile\x70re\x70ai\x64\x63\x72ed\x69t/G\x72ou\x70R\x65\x77\x61rd.\x70h\x70");${"\x47L\x4f\x42\x41\x4c\x53"}["ms\x72\x6f\x69\x64q"]="id\x5f\x70\x72\x6f\x64\x75\x63\x74";$fupwgmsurn="\x61\x74t\x72\x69\x62\x75\x74e\x73_\x63\x6f\x6d\x62\x69\x6e\x61\x74\x69ons";${"G\x4cOB\x41\x4c\x53"}["r\x76qf\x79\x6f\x66\x6e\x6a\x6e\x74"]="p\x72o\x64\x75c\x74\x5ft\x61xra\x74\x65";${${"\x47\x4c\x4f\x42\x41LS"}["\x75\x77\x75\x6bb\x72bchdl"]}=GroupReward::getProductRewardableRate(${${"\x47\x4c\x4fB\x41\x4c\x53"}["\x71\x79b\x6b\x76w\x6f\x6d\x69\x6e"]},0);${${"\x47\x4c\x4fB\x41L\x53"}["\x67\x76j\x66m\x64\x67\x65\x6b\x74"]}=Tools::ps_round(Product::getPriceStatic(${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x66v\x6e\x68\x70q\x73g"]},false,null,6,null,false,true,1),2);${${"\x47\x4c\x4f\x42AL\x53"}["t\x74\x72\x69k\x75\x78\x6c\x62j\x70"]}=${${"G\x4cO\x42A\x4cS"}["gv\x6a\x66\x6d\x64\x67\x65kt"]}*(float)${${"G\x4c\x4f\x42\x41\x4c\x53"}["oq\x73\x68s\x72\x77b\x6d\x78"]}/100;${$bpeqmlud}=0;${"\x47\x4c\x4f\x42\x41\x4cS"}["\x78\x72b\x6a\x70\x6b\x79i\x76"]="\x72e\x77\x61\x72d\x5fva\x6c\x75e";${${"\x47\x4c\x4f\x42\x41LS"}["h\x69\x70\x76\x78\x6b\x6a"]}=Group::getPriceDisplayMethod(Group::getCurrent()->id);if(${$fhbjbmekrro}==PS_TAX_INC AND!Tax::excludeTaxeOption()){$bddejxegf="\x69d\x5fpro\x64\x75\x63\x74";$iqeyogom="\x70\x72\x6fd\x75c\x74\x5f\x74ax\x72\x61\x74e";${$iqeyogom}=Tax::getProductTaxRate(${$bddejxegf});}${$hqzxheug}=AgilePrepaidCredit::ConvertPrice2Tokens($cookie->id_currency,${${"\x47L\x4f\x42\x41L\x53"}["\x78r\x62j\x70ky\x69\x76"]});${$fupwgmsurn}=Product::getAttributesInformationsByProduct(${${"G\x4c\x4f\x42A\x4cS"}["\x6d\x73\x72\x6f\x69dq"]});$smarty->assign(array("\x74ok\x65n\x73"=>${${"\x47\x4c\x4f\x42A\x4cS"}["\x6ai\x78\x72\x6d\x62wijv"]},"\x72\x65\x70\x75rcha\x73e"=>${$tnesfdqexik},"\x69s\x74\x6fken"=>${$wqjbdeccy},"ispa\x69d"=>${${"\x47LO\x42AL\x53"}["u\x74y\x75\x78\x64\x74h\x69\x75"]},"s\x68\x6fws\x74\x61\x74\x65"=>intval(${${"\x47L\x4f\x42\x41\x4c\x53"}["\x74\x75\x63\x69s\x64"]}),"\x68i\x64e\x5f\x74\x6f\x6be\x6e\x69nf\x6f"=>intval(Configuration::getGlobalValue("\x41\x47ILE_P\x43\x52E\x44IT_H\x49DE\x5f\x54\x4f\x4bEN\x49N\x46O")),"\x70r\x6f\x64\x75\x63\x74\x5f\x74axra\x74e"=>${${"\x47\x4c\x4f\x42A\x4c\x53"}["r\x76q\x66y\x6f\x66\x6e\x6an\x74"]},"to\x6b\x65nu\x6ei\x74\x5fva\x6c\x75e_i\x6e\x5f\x63u\x73t\x6fm\x65r_\x63\x75\x72\x72\x65n\x63\x79"=>${${"\x47L\x4f\x42\x41\x4cS"}["pq\x6cjg\x6a\x6f\x64\x7a\x71z"]},"\x72ewa\x72\x64\x5f\x72\x61\x74e"=>${$qwkrufv},"\x72\x65\x77a\x72\x64_\x74\x6f\x6b\x65\x6e\x73"=>${$cdcpxtden},"h\x61s\x5f\x63\x6f\x6db\x69n\x61\x74\x69o\x6es"=>((is_array(${${"\x47\x4c\x4f\x42\x41L\x53"}["\x6di\x6epbz\x6e\x62s"]})&&count(${${"\x47L\x4f\x42\x41\x4c\x53"}["\x6di\x6e\x70bz\x6e\x62s"]}))?1:0)));return$this->display(__FILE__,"vi\x65\x77\x73/\x74em\x70la\x74es/hook/\x65xt\x72\x61\x5f\x72\x69gh\x74.tpl");}public function hookDisplayLeftColumn($params){${"\x47\x4c\x4fB\x41L\x53"}["i\x74\x6d\x79\x78\x69\x69\x6b\x70"]="\x68oo\x6b\x73";if(!$this->active)return;${${"G\x4c\x4f\x42A\x4c\x53"}["\x69\x74m\x79\x78i\x69\x6b\x70"]}="";if(intval(Configuration::getGlobalValue("A\x47I\x4cE_P\x43RED\x49\x54\x5f\x53UMMAR\x59\x5f\x50OS"))==1){${"\x47L\x4f\x42AL\x53"}["l\x62\x67\x6cf\x67\x69\x74\x65v"]="\x68o\x6f\x6bs";${${"\x47L\x4fB\x41\x4c\x53"}["\x6cbgl\x66\x67\x69\x74\x65\x76"]}.=$this->hookAgiletokensummary(${${"\x47\x4c\x4f\x42A\x4c\x53"}["b\x6c\x6deq\x74y\x74\x69"]});}if(intval(Configuration::getGlobalValue("AGI\x4cE_\x50\x43\x52\x45\x44I\x54\x5f\x50\x4fSITION"))==1){${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["c\x71ev\x63\x74p\x6e"]}.=$this->hookLeftOrRight();}return${${"\x47L\x4f\x42A\x4c\x53"}["\x63\x71\x65\x76\x63\x74\x70\x6e"]};}public function hookDisplayRightColumn($params){$zvoqqsmogz="\x68\x6fo\x6b\x73";if(!$this->active)return;${$zvoqqsmogz}="";if(intval(Configuration::getGlobalValue("\x41\x47\x49\x4cE_P\x43\x52\x45\x44IT_SU\x4d\x4dARY_P\x4fS"))==2){${${"\x47\x4c\x4fB\x41\x4c\x53"}["c\x71e\x76\x63\x74p\x6e"]}.=$this->hookAgiletokensummary(${${"\x47LO\x42\x41\x4cS"}["\x62lm\x65\x71t\x79t\x69"]});}if(intval(Configuration::getGlobalValue("\x41GI\x4c\x45\x5f\x50\x43\x52\x45DIT\x5f\x50O\x53IT\x49\x4fN"))==2){${"G\x4c\x4fBAL\x53"}["\x6b\x67\x61s\x6e\x6d\x71\x71"]="\x68\x6f\x6f\x6bs";${${"\x47LO\x42\x41\x4cS"}["\x6bg\x61\x73\x6e\x6d\x71q"]}.=$this->hookLeftOrRight();}${"\x47\x4cO\x42AL\x53"}["\x68\x78\x64\x66m\x67\x66qpu"]="\x68\x6f\x6f\x6bs";return${${"\x47\x4cOBALS"}["\x68\x78d\x66\x6dg\x66\x71\x70\x75"]};}public function hookDisplayFooter($params){$oexpgcs="\x70\x61\x67\x65\x4e\x61\x6d\x65";${"\x47\x4cO\x42A\x4c\x53"}["\x79l\x68n\x6b\x72w"]="\x63f\x6dms\x67";$rurejshbp="\x61\x70c\x5fa\x74pro\x64\x75\x63tp\x61\x67e";${"G\x4c\x4fB\x41\x4c\x53"}["\x78\x6b\x72\x63j\x6b\x62a\x77"]="\x69s\x70\x61\x69\x64";${"\x47\x4cOB\x41\x4c\x53"}["m\x63\x78s\x71ev\x6d"]="is\x70\x61i\x64";${"\x47\x4c\x4fB\x41LS"}["\x64\x6b\x6bj\x63s\x6e"]="\x62\x6c\x6f\x63\x6b\x73e\x74\x74\x69n\x67\x73";global$smarty,$cookie,$cart;$lofuxv="\x61\x70\x63\x5fa\x74c\x61r\x74s\x75\x6d\x6d\x61\x72\x79";if(!$this->active)return;${${"\x47L\x4f\x42A\x4c\x53"}["\x65ir\x6bm\x6a\x69\x6bcdj\x6d"]}=0;$utlkgffdw="blo\x63\x6b\x73e\x74t\x69n\x67\x73";$cimhuvgmjdg="\x70\x61\x67eNa\x6d\x65";${$lofuxv}=0;${"GLOB\x41L\x53"}["\x70j\x6fpi\x63\x72"]="\x70\x61\x67e\x4ea\x6de";${$cimhuvgmjdg}="";if(isset($_GET["\x63\x6f\x6et\x72ol\x6cer"])){$tuluvg="\x70\x61geNa\x6d\x65";${"G\x4c\x4fB\x41\x4cS"}["\x77\x6f\x78\x74cx\x62\x74"]="\x63\x6f\x6e\x74r";${${"\x47\x4cO\x42ALS"}["\x6a\x73i\x6el\x6c"]}=Tools::getValue("\x63\x6fn\x74\x72\x6f\x6cler");${$tuluvg}=strtolower(${${"\x47\x4c\x4f\x42AL\x53"}["\x77\x6f\x78\x74c\x78bt"]});}${"GL\x4f\x42\x41L\x53"}["\x75\x6d\x75\x63\x70\x71vedf\x63"]="\x62lock\x73\x65\x74t\x69\x6e\x67s";$pgcpxuymdsee="\x70\x61\x79_\x6d\x6f\x64\x65";$mcrjgql="c\x66\x6dms\x67";if(${${"G\x4cOB\x41L\x53"}["x\x78kk\x74p"]}=="\x70\x72\x6f\x64u\x63\x74")${$rurejshbp}=1;${"\x47\x4c\x4fBALS"}["bhv\x6ay\x6c\x67\x77\x6b\x65"]="i\x73\x70\x61\x69d";if(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x70\x6ao\x70ic\x72"]}=="\x6f\x72\x64er"||${$oexpgcs}=="o\x72d\x65r\x6f\x70c"||${${"G\x4cO\x42A\x4cS"}["\x78\x78kk\x74\x70"]}=="or\x64e\x72-\x6fpc")${${"\x47L\x4f\x42\x41LS"}["\x61d\x74yn\x78k"]}=1;${${"\x47\x4c\x4f\x42\x41L\x53"}["cbwj\x62h"]}=self::IsProductPaidByCustomer(intval(Tools::getValue("\x69d_\x70\x72odu\x63\x74")),$cookie->id_customer);${${"G\x4c\x4f\x42\x41LS"}["bv\x75\x73\x77e"]}=intval(Configuration::getGlobalValue("AGIL\x45\x5f\x50C\x52\x45\x44\x49\x54\x5fREPU\x52CHAS\x45"));${${"G\x4cO\x42\x41LS"}["\x79\x75ha\x6c\x79"]}=$this->getBlockSettings();${${"G\x4c\x4f\x42\x41L\x53"}["kc\x66qoy"]}=intval(Configuration::getGlobalValue("A\x47I\x4c\x45_PC\x52\x45\x44I\x54\x5f\x50\x41\x59_M\x4fDE"));${"\x47\x4c\x4fB\x41\x4cS"}["h\x69\x6c\x78\x6cn\x71h"]="\x69\x73\x70\x61\x69d";${${"\x47\x4c\x4f\x42\x41L\x53"}["yl\x68nkrw"]}="";${"\x47\x4c\x4fB\x41\x4cS"}["\x65\x67\x70\x78\x74\x67\x65q\x6d\x6b\x73"]="\x69\x73\x70\x61\x69\x64";${$pgcpxuymdsee}=intval(Configuration::getGlobalValue("\x41\x47IL\x45_PCR\x45D\x49T_\x50\x41\x59_M\x4f\x44\x45"));switch(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["k\x63f\x71\x6f\x79"]}){case AgilePrepaidCredit::PAY_MODE_NORMAL:break;case AgilePrepaidCredit::PAY_MODE_ONECLICK:${${"G\x4c\x4fB\x41\x4c\x53"}["p\x66\x7a\x79\x67g\x73\x6d\x79\x63\x63"]}=$this->l('Required tokens will be deducted from you account. If you do not have enough tokens, you will be redirected to the tokens category to purchase additional tokens. Are you sure want to proceed to purchase the products?');break;case AgilePrepaidCredit::PAY_MODE_COMBINATION:${$mcrjgql}=$this->l('Required tokens will be deducted from your account. If you do not have enough tokens, you will be able to use a combination of tokens and other payment methods. Are you sure want to proceed with product purchases?');break;}$smarty->assign(array("\x70\x73_\x76\x65\x72\x73\x69o\x6e"=>_PS_VERSION_,"\x63ar\x74\x74ot\x61l\x61\x6doun\x74"=>$cart->getOrderTotal(),"p\x61y\x5fm\x6f\x64e"=>intval(Configuration::getGlobalValue("\x41GIL\x45\x5f\x50\x43RE\x44\x49T\x5fP\x41Y_M\x4f\x44E")),"\x72e\x70\x75\x72\x63\x68ase"=>${${"\x47\x4c\x4fB\x41\x4cS"}["\x62\x76\x75\x73\x77\x65"]}?"true":"f\x61\x6cse","\x68\x69de\x49\x6d\x61g\x65s"=>(${${"GL\x4f\x42A\x4cS"}["\x79uha\x6cy"]}["I\x6d\x61\x67\x65\x73"]==1 OR(${${"G\x4cOBALS"}["\x65g\x70\x78\x74\x67eqm\x6b\x73"]} AND${${"GLO\x42AL\x53"}["d\x6b\x6b\x6ac\x73n"]}["Im\x61ges"]==2))?"fal\x73\x65":"t\x72\x75\x65","hid\x65Sh\x6frtDesc"=>(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["yu\x68\x61\x6c\x79"]}["S\x68\x6frtD\x65\x73c"]==1 OR(${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x78kr\x63\x6a\x6b\x62aw"]} AND${${"\x47\x4c\x4fB\x41L\x53"}["y\x75\x68a\x6c\x79"]}["S\x68or\x74Desc"]==2))?"fa\x6cse":"tr\x75e","hi\x64\x65\x43ol\x6f\x72P\x69ck\x65\x72"=>(${${"G\x4cO\x42A\x4cS"}["\x79\x75\x68\x61\x6c\x79"]}["C\x6f\x6c\x6f\x72\x50i\x63ker"]==1 OR(${${"\x47L\x4f\x42\x41L\x53"}["c\x62\x77j\x62\x68"]} AND${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x79\x75h\x61ly"]}["Co\x6corP\x69\x63\x6be\x72"]==2))?"\x66\x61lse":"t\x72ue","\x68i\x64\x65\x42\x75\x79\x42\x6co\x63\x6b"=>(${$utlkgffdw}["Bu\x79B\x6cock"]==1 OR(${${"\x47L\x4f\x42\x41\x4c\x53"}["\x63\x62\x77\x6ab\x68"]} AND${${"G\x4c\x4f\x42A\x4cS"}["\x79u\x68\x61\x6c\x79"]}["\x42\x75y\x42l\x6fc\x6b"]==2))?"f\x61\x6c\x73\x65":"t\x72\x75e","h\x69d\x65\x51\x75\x61\x6e\x74\x69\x74\x79\x44is\x63\x6f\x75\x6et"=>(${${"\x47\x4cO\x42\x41\x4c\x53"}["y\x75\x68\x61\x6c\x79"]}["Q\x75\x61\x6e\x74\x69\x74\x79D\x69\x73\x63oun\x74"]==1 OR(${${"\x47\x4cO\x42A\x4cS"}["\x68i\x6c\x78\x6cn\x71\x68"]} AND${${"\x47L\x4f\x42\x41\x4c\x53"}["\x75\x6ducp\x71\x76\x65d\x66c"]}["\x51\x75\x61\x6e\x74i\x74y\x44i\x73\x63o\x75\x6et"]==2))?"\x66a\x6c\x73\x65":"\x74\x72u\x65","hi\x64\x65M\x6freI\x6ef\x6f"=>(${${"G\x4c\x4f\x42ALS"}["\x79\x75\x68\x61\x6cy"]}["M\x6f\x72e\x49\x6ef\x6f"]==1 OR(${${"\x47\x4c\x4f\x42\x41L\x53"}["\x62h\x76\x6a\x79l\x67\x77ke"]} AND${${"G\x4c\x4f\x42\x41\x4c\x53"}["\x79uh\x61\x6c\x79"]}["\x4d\x6fre\x49\x6e\x66\x6f"]==2))?"f\x61ls\x65":"\x74\x72ue","c\x66\x6d\x6d\x73g"=>${${"\x47L\x4f\x42AL\x53"}["\x70\x66\x7a\x79\x67g\x73m\x79\x63c"]},"\x61p\x63\x5fa\x74\x70ro\x64\x75\x63\x74page"=>${${"G\x4cO\x42AL\x53"}["eir\x6b\x6dj\x69kc\x64\x6am"]},"apc_a\x74\x63\x61rts\x75\x6dm\x61ry"=>${${"G\x4cO\x42\x41\x4c\x53"}["a\x64\x74\x79n\x78\x6b"]},"c\x75r\x5f\x70\x72o\x64\x5fis\x70\x61\x69d"=>${${"\x47\x4c\x4fBA\x4c\x53"}["\x6d\x63x\x73\x71\x65\x76\x6d"]}?"\x74\x72\x75\x65":"fals\x65","c\x75r_\x70rod\x5fis\x74oke\x6e"=>self::IsProductInLinkedCategory(intval(Tools::getValue("i\x64\x5fpr\x6f\x64\x75\x63t")))?"tr\x75e":"fa\x6cse","t\x6f\x74\x61\x6c_\x76\x6fucher_\x6c\x61\x62\x65\x6c"=>$this->get_discounts_override_label($cart->getOrderTotal(true,CART::ONLY_DISCOUNTS),self::tokens_used_in_cart($cart->id))));return$this->display(__FILE__,"view\x73/\x74e\x6dp\x6ca\x74\x65\x73/hook/f\x6f\x6ft\x65r\x2e\x74\x70l");}public function hookTotalVoucher(){$oqmmept="\x74\x6f\x6b\x65\x6es\x5fi\x6e\x5f\x63\x61r\x74_v\x61\x6c\x75e";$nvqwilvo="\x74\x6f\x74\x61\x6c_d\x69s\x63\x6f\x75\x6et\x73\x5f\x76\x61lu\x65";global$cart,$smarty;${${"\x47\x4c\x4fBA\x4cS"}["\x67d\x67\x77e\x70\x79\x71\x73\x65\x67k"]}=$cart->getOrderTotal(true,CART::ONLY_DISCOUNTS);${${"\x47\x4c\x4f\x42\x41L\x53"}["q\x75\x6a\x66\x6eh"]}=self::tokens_used_in_cart($cart->id);$smarty->assign(array("to\x74\x61\x6c\x5f\x76\x6fu\x63h\x65r_l\x61\x62e\x6c"=>$this->get_discounts_override_label(${$nvqwilvo},${$oqmmept}),"\x74ota\x6c_d\x69s\x63oun\x74s_\x76a\x6c\x75e"=>${${"\x47\x4c\x4fBA\x4c\x53"}["g\x64\x67\x77\x65\x70\x79\x71\x73e\x67\x6b"]}));return$this->display(__FILE__,"vie\x77s/\x74e\x6d\x70l\x61t\x65s/h\x6fok/hookt\x6ft\x61\x6c\x64i\x73c\x6fu\x6et\x2etpl");}private function hookLeftOrRight(){${"\x47\x4cO\x42\x41\x4cS"}["\x6b\x6c\x73\x6a\x74\x68\x68p\x79"]="\x74o\x6b\x65\x6epkg\x73";$lowmkrdn="\x72\x65s\x75\x6ct\x73";global$smarty,$cookie,$cart;${${"\x47L\x4f\x42\x41\x4cS"}["t\x73\x61\x65g\x6e\x6e\x70r\x6c"]}=new Category(intval(Configuration::getGlobalValue("AG\x49\x4c\x45\x5fPC\x52EDI\x54_CID")));${$lowmkrdn}=$category->getProducts($cookie->id_lang,1,10);${"G\x4cO\x42AL\x53"}["\x68fazn\x63l"]="\x72\x65su\x6ct";${${"\x47\x4c\x4fBA\x4c\x53"}["\x6b\x6c\x73\x6a\x74hh\x70\x79"]}=array();foreach(${${"\x47L\x4f\x42A\x4c\x53"}["\x63\x6f\x76\x6c\x6f\x66\x6et\x68"]} AS${${"G\x4cO\x42\x41\x4c\x53"}["\x68fa\x7a\x6ecl"]}){${"\x47\x4cO\x42A\x4cS"}["\x6cwm\x77\x7am\x6bpcv\x79\x79"]="\x69\x6d\x61\x67\x65\x73";${"\x47\x4cO\x42\x41\x4c\x53"}["p\x6e\x63\x68\x67\x6c\x74u"]="\x74\x6f\x6benp\x6b\x67\x73";${${"\x47LO\x42A\x4cS"}["\x6a\x6f\x73\x63h\x62\x69\x72\x63\x68\x6b"]}=new Product(${${"\x47\x4cO\x42\x41\x4c\x53"}["tp\x73cw\x69pij\x66\x6ct"]}["i\x64\x5fp\x72o\x64u\x63\x74"],true,intval($cookie->id_lang));${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x62xf\x7anf\x64\x71"]}=$product->getImages(intval($cookie->id_lang));$tsezhflwohb="c\x6f\x76e\x72";$okplueyvsu="\x63\x6fve\x72";foreach(${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x6c\x77\x6dw\x7am\x6b\x70\x63vyy"]} AS${${"G\x4c\x4fB\x41L\x53"}["\x6bbe\x79e\x62\x74\x71\x70\x77g\x75"]}=>${${"G\x4cO\x42\x41\x4c\x53"}["q\x6e\x62\x73\x79\x75w\x7a\x68\x6c\x68"]}){$uvcvxb="i\x6d\x61g\x65";if(${$uvcvxb}["cove\x72"]){${"\x47\x4c\x4f\x42\x41L\x53"}["\x6a\x6ar\x6b\x76\x65"]="\x69m\x61g\x65";$efuhpyh="\x63\x6f\x76\x65r";${"G\x4cOB\x41L\x53"}["fic\x72\x74\x76\x73\x61\x75"]="\x69\x6d\x61\x67\x65";$tmpovhbbgbz="\x63\x6f\x76er";${$tmpovhbbgbz}=${${"G\x4c\x4f\x42\x41\x4c\x53"}["fi\x63r\x74\x76s\x61\x75"]};$wtpfwrhlf="c\x6fv\x65\x72";${${"G\x4c\x4fB\x41\x4c\x53"}["m\x63\x68\x76y\x74\x73\x6c\x6f\x78"]}["i\x64\x5fimage"]=intval($product->id)."-".${$wtpfwrhlf}["i\x64\x5f\x69\x6da\x67e"];${$efuhpyh}["i\x64\x5fi\x6d\x61ge\x5fo\x6el\x79"]=intval(${${"GL\x4f\x42A\x4c\x53"}["\x6a\x6arkve"]}["\x69d\x5fim\x61\x67e"]);}}if(!isset(${$tsezhflwohb}))${${"\x47\x4c\x4fB\x41\x4cS"}["m\x63h\x76\x79t\x73\x6c\x6f\x78"]}=array("\x69\x64\x5f\x69ma\x67\x65"=>Language::getIsoById($cookie->id_lang)."-\x64\x65f\x61\x75l\x74","\x6ce\x67e\x6ed"=>$this->l('No picture'),"title"=>$this->l('No picture'));${${"GLO\x42\x41\x4c\x53"}["\x70\x6e\x63\x68g\x6c\x74u"]}[]=array("p\x72\x6fdu\x63t"=>${${"\x47\x4c\x4f\x42\x41L\x53"}["j\x6f\x73ch\x62i\x72\x63\x68\x6b"]},"cove\x72"=>${$okplueyvsu});}$smarty->assign(array("t\x6f\x6b\x65n\x70kg\x73"=>${${"\x47\x4c\x4f\x42A\x4cS"}["\x73u\x61t\x61\x75"]}));return$this->display(__FILE__,"vi\x65w\x73/\x74e\x6d\x70la\x74e\x73/\x68o\x6fk/a\x67ile\x70\x72\x65p\x61i\x64\x63\x72\x65\x64i\x74.\x74pl");}public static function log_message($msg){$mfpeucj="\x68\x61n\x64\x6c\x65";if(Agile_PrepaidCredit_Logging!="on")return;${$mfpeucj}=fopen(dirname(__FILE__)."/d\x65\x62ug\x2e\x6co\x67","a+");if(!${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x70\x74u\x6e\x79\x6b\x7a\x6epqi"]})return;$lojwilisxft="\x68a\x6e\x64l\x65";${${"GL\x4f\x42\x41\x4cS"}["\x64\x68\x61\x70\x70\x76\x68g\x67iq"]}="";if(isset($_SERVER["\x48T\x54P\x5fR\x45F\x45R\x45R"]))${${"\x47\x4c\x4f\x42A\x4cS"}["d\x68\x61\x70\x70\x76h\x67\x67\x69\x71"]}=$_SERVER["HT\x54P_\x52E\x46\x45RE\x52"];fwrite(${$lojwilisxft},date("\x48:\x69:s").",".${${"GLO\x42\x41\x4cS"}["\x64h\x61\x70\x70v\x68\x67\x67\x69q"]}.",".${${"\x47L\x4f\x42A\x4c\x53"}["\x6bwd\x6b\x73\x78"]}."\r\n");fclose(${${"\x47L\x4f\x42AL\x53"}["\x70\x74\x75\x6e\x79\x6b\x7a\x6ep\x71i"]});}function processTokenPurchaseOrOneClickCheckoutTokens($id_order,$orderStatus){$iribuhylzdp="s\x71\x6c";if(!isset(${${"G\x4c\x4f\x42\x41L\x53"}["\x69ik\x6c\x6d\x67\x6av\x71"]}))return;if(!intval(${${"\x47\x4c\x4f\x42ALS"}["\x6djc\x74\x7a\x64"]}))return;${"\x47\x4c\x4f\x42\x41L\x53"}["\x6ex\x6c\x76\x65\x78\x6d\x64\x6d\x68\x72"]="\x70\x61id_b\x79_\x74\x6f\x6be\x6e\x73";${"\x47\x4c\x4f\x42\x41\x4cS"}["y\x6a\x67\x76ek\x6e\x6e"]="\x6f\x72\x64\x65\x72";if($orderStatus->id!=_PS_OS_PAYMENT_ AND$orderStatus->id!=_PS_OS_WS_PAYMENT_)return;$nhtcsx="\x65\x78i\x73\x74\x73";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x67y\x6b\x6a\x62\x69w\x6ew"]="tokens";${"G\x4cOB\x41\x4cS"}["\x6c\x65\x6e\x66vi\x6b\x76"]="\x69\x64\x5f\x6f\x72\x64\x65\x72";$dshhlqep="id\x5fo\x72\x64\x65r";${${"\x47L\x4f\x42\x41\x4cS"}["\x79j\x67\x76\x65\x6bn\x6e"]}=new Order(${$dshhlqep});if(!Validate::isLoadedObject(${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x6b\x7a\x79\x62\x69q"]}))return;${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x63\x79\x77mg\x61m\x76\x6d"]="\x65\x78\x69st\x73";$ngbhjacdem="\x69\x64\x5f\x6fr\x64e\x72";${$iribuhylzdp}="SELE\x43T \x69d_\x6f\x72d\x65r\x20FR\x4fM `"._DB_PREFIX_."c\x75sto\x6d\x65\x72_cr\x65dit\x60 WHERE \x69d_o\x72\x64e\x72\x3d".${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x6ce\x6ef\x76i\x6bv"]}."\x20\x41ND\x20id\x5fc\x75s\x74\x6fme\x72\x3d".$order->id_customer."\x20AN\x44\x20i\x64\x5fr\x65\x61\x73\x6fn I\x4e\x20(".AgilePrepaidCredit::CREDIT_REASON_ONE_CLICK_CHECKOUT_PAYMENT.",".AgilePrepaidCredit::CREDIT_REASON_PURCHASE.")";${${"G\x4cO\x42\x41\x4c\x53"}["\x63\x79w\x6dg\x61\x6d\x76m"]}=Db::getInstance()->getValue(${${"\x47L\x4f\x42\x41LS"}["\x6eytvzv\x61d\x6d"]});$fvccprwvj="t\x6f\x6bens";if(${$nhtcsx}>0)return;${${"\x47LOB\x41L\x53"}["nyt\x76\x7a\x76adm"]}="\x53\x45\x4cE\x43\x54\x20\x69\x64_\x6frd\x65r \x46\x52O\x4d \x60"._DB_PREFIX_."or\x64\x65\x72\x5f\x74\x6f\x6b\x65n\x6do\x64\x65\x60\x20WH\x45RE \x69d\x5f\x6f\x72\x64e\x72\x3d".${$ngbhjacdem};${${"\x47LOBA\x4c\x53"}["n\x78\x6c\x76\x65xm\x64\x6d\x68\x72"]}=intval(Db::getInstance()->getValue(${${"\x47LO\x42\x41L\x53"}["\x6e\x79\x74v\x7a\x76\x61dm"]}));${${"\x47\x4cOB\x41\x4cS"}["g\x79\x6b\x6a\x62\x69w\x6ew"]}=0;if(${${"\x47\x4c\x4f\x42ALS"}["\x79i\x72\x6c\x68\x64"]}){${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x6dt\x69\x67\x77\x6c\x62\x6d"]="\x69\x64_\x72\x65a\x73on";${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["q\x70l\x72k\x6c\x6dxb"]}=new Order(${${"\x47\x4cOB\x41L\x53"}["\x6d\x6ac\x74\x7a\x64"]});${${"G\x4c\x4f\x42\x41L\x53"}["mtig\x77\x6c\x62\x6d"]}=AgilePrepaidCredit::CREDIT_REASON_ONE_CLICK_CHECKOUT_PAYMENT;${${"G\x4c\x4f\x42\x41\x4c\x53"}["\x6a\x69\x78\x72m\x62\x77\x69jv"]}=${${"G\x4c\x4f\x42\x41LS"}["\x6a\x69x\x72\x6db\x77ijv"]}-AgilePrepaidCredit::ConvertPrice2Tokens($order->id_currency,$theOrder->total_paid);}else{${"\x47L\x4f\x42\x41\x4c\x53"}["g\x6c\x6b\x6e\x74\x6f\x67\x72\x72hdg"]="\x70r\x6f\x64\x75\x63\x74s";$apcuola="id_r\x65a\x73\x6f\x6e";${"G\x4cO\x42\x41L\x53"}["d\x76r\x67\x69\x72\x75m\x61\x63"]="\x73q\x6c";${$apcuola}=AgilePrepaidCredit::CREDIT_REASON_PURCHASE;${${"GL\x4f\x42\x41\x4cS"}["n\x79\x74\x76z\x76\x61d\x6d"]}="SELECT \x70\x72\x6fduct\x5f\x69\x64, pr\x6f\x64uct_\x70\x72i\x63e, \x70rod\x75c\x74_quanti\x74y \n\x20\x20  \x20\x20  \x20\x20\x20\x20\x20\x20  \x46R\x4f\x4d\x20\x60"._DB_PREFIX_."\x6f\x72d\x65\x72\x5fd\x65t\x61\x69l\x60\n \x20\x20  \x20\x20   \x20 \x20\x20 \x20W\x48\x45\x52\x45\x20\x60\x69\x64\x5f\x6f\x72de\x72\x60 \x3d ".$order->id;${${"\x47L\x4f\x42\x41\x4c\x53"}["\x76\x6d\x76\x63\x6b\x71\x70"]}=Db::getinstance()->ExecuteS(${${"\x47LO\x42A\x4cS"}["d\x76\x72\x67i\x72\x75m\x61c"]});foreach(${${"\x47\x4cO\x42\x41\x4cS"}["g\x6c\x6bn\x74\x6fgr\x72\x68d\x67"]} AS${${"G\x4c\x4fB\x41\x4cS"}["\x65\x71\x6cx\x6e\x66\x64h\x71h\x6f\x66"]}=>${${"\x47\x4c\x4fB\x41\x4c\x53"}["\x6a\x6f\x73\x63\x68\x62\x69r\x63\x68\x6b"]}){if(self::IsProductInLinkedCategory(intval(${${"G\x4c\x4fB\x41L\x53"}["\x6a\x6fsc\x68\x62\x69rch\x6b"]}["\x70r\x6f\x64uc\x74_i\x64"]))){${"\x47L\x4f\x42\x41\x4c\x53"}["i\x64\x69v\x74s\x70\x6fx\x61p"]="pro\x64\x75c\x74\x5f\x76\x61l\x75e";${"G\x4c\x4fB\x41\x4cS"}["\x74\x68y\x63p\x64i\x66n\x6c"]="\x70r\x6f\x64uct";${"\x47L\x4f\x42A\x4c\x53"}["\x68\x6dw\x67\x76\x6d\x63ht\x63"]="\x70\x72\x6f\x64\x75ct\x5fv\x61lue";${${"G\x4c\x4f\x42A\x4c\x53"}["\x69d\x69\x76\x74\x73\x70o\x78\x61\x70"]}=${${"G\x4cOBA\x4c\x53"}["\x6a\x6f\x73c\x68bi\x72\x63\x68\x6b"]}["\x70r\x6f\x64\x75c\x74\x5fp\x72\x69ce"]*intval(${${"\x47LO\x42\x41\x4cS"}["\x74\x68y\x63\x70d\x69\x66n\x6c"]}["p\x72\x6f\x64uct\x5fq\x75\x61\x6e\x74\x69ty"]);${${"\x47\x4c\x4f\x42A\x4c\x53"}["j\x69\x78\x72\x6dbwij\x76"]}=${${"G\x4cOB\x41\x4c\x53"}["j\x69x\x72\x6d\x62w\x69j\x76"]}+AgilePrepaidCredit::ConvertPrice2Tokens($order->id_currency,${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x68\x6d\x77\x67\x76\x6d\x63\x68t\x63"]});}}}if(${$fvccprwvj}!=0){${"\x47\x4c\x4f\x42\x41\x4cS"}["\x63\x69\x64\x68t\x62\x6d\x67\x76\x76"]="m\x65\x6d\x6f";$trokvflxue="\x73ql";$nxlrstmi="\x73\x71\x6c";$uqcpqfkdfw="\x6d\x65\x6do";${${"\x47\x4c\x4fB\x41\x4c\x53"}["ci\x64\x68\x74\x62m\x67\x76\x76"]}=(${${"\x47\x4cO\x42A\x4c\x53"}["\x6ai\x78\x72\x6d\x62\x77\x69\x6a\x76"]}>0)?$this->l('Token/Credit Purchase'):$this->l('Token/Credit Payment');${$trokvflxue}="I\x4eS\x45\x52\x54 \x49N\x54\x4f `"._DB_PREFIX_."cus\x74o\x6d\x65r\x5fc\x72\x65\x64i\x74\x60 (\x69d_custo\x6d\x65r,id\x5f\x6f\x72\x64\x65\x72,i\x64_re\x61\x73on,\x75\x6e\x69t\x73,\x64a\x74\x65\x5fa\x64\x64, \x6d\x65\x6do)\x20VA\x4c\x55\x45\x53\x20(".$order->id_customer.",".$order->id.",".(int)${${"G\x4c\x4fB\x41\x4c\x53"}["\x62\x6d\x66ik\x6a\x6c"]}.",".${${"GL\x4f\x42\x41\x4c\x53"}["j\x69x\x72mb\x77\x69jv"]}.",'".date("Y-m-\x64 H:\x69:\x73")."',\x27".${$uqcpqfkdfw}."')";Db::getInstance()->Execute(${$nxlrstmi});}return"";}public function procesTokenRewards($id_order,$orderStatus){$immimstso="\x69\x64\x5f\x6f\x72\x64er";$pkoxrwfzn="\x69d_\x6f\x72de\x72";if(!${$immimstso})return;if($orderStatus->id!=_PS_OS_PAYMENT_ AND$orderStatus->id!=_PS_OS_WS_PAYMENT_)return;$pomgumksgvei="\x6f\x72\x64e\x72";$xqyfimujx="\x72e\x77a\x72\x64\x73";${"G\x4c\x4fB\x41\x4c\x53"}["\x6b\x74\x73\x69z\x69"]="\x73\x71\x6c";${$pomgumksgvei}=new Order(${${"\x47\x4c\x4fBA\x4cS"}["m\x6a\x63\x74\x7a\x64"]});$wdlnqivlc="\x63\x61\x72\x74";$ymwcubhpck="s\x71\x6c";if(!Validate::isLoadedObject(${${"\x47\x4c\x4f\x42\x41L\x53"}["\x6b\x7ay\x62i\x71"]}))return;${$ymwcubhpck}="\x53\x45\x4cE\x43\x54 i\x64\x5fo\x72de\x72 F\x52OM\x20\x60"._DB_PREFIX_."\x63usto\x6der_\x63\x72ed\x69t\x60 \x57HE\x52E\x20\x69\x64_or\x64\x65\x72=".${$pkoxrwfzn}."\x20A\x4eD i\x64_cu\x73tom\x65\x72=".$order->id_customer."\x20A\x4e\x44\x20id\x5frea\x73on \x49\x4e\x20(".AgilePrepaidCredit::CREDIT_REASON_PURCHASE_REWARD.")";${"G\x4cOBA\x4cS"}["xm\x65\x6e\x62\x73\x6d\x6dx\x72\x78"]="\x65\x78i\x73t\x73";${${"\x47\x4cO\x42\x41\x4c\x53"}["\x70\x68h\x78\x68\x65y\x69ct\x70"]}=Db::getInstance()->getValue(${${"\x47L\x4f\x42\x41\x4c\x53"}["\x6b\x74\x73\x69z\x69"]});if(${${"\x47\x4c\x4f\x42AL\x53"}["\x78\x6d\x65\x6eb\x73\x6dm\x78rx"]}>0)return;${$wdlnqivlc}=new Cart($order->id_cart);${"G\x4c\x4f\x42\x41\x4c\x53"}["\x77\x68\x65oj\x74g\x76\x6ch\x7a"]="ca\x72\x74";include_once(_PS_ROOT_DIR_."/module\x73/\x61gi\x6cep\x72\x65\x70\x61id\x63\x72\x65\x64it/Gr\x6f\x75pR\x65\x77\x61r\x64\x2ep\x68\x70");${$xqyfimujx}=AgilePrepaidCredit::ConvertPrice2Tokens($cart->id_currency,GroupReward::getCartRewardableValue(${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x77heojt\x67v\x6c\x68z"]}));if(${${"\x47\x4c\x4f\x42\x41L\x53"}["i\x67\x64\x6f\x73f\x79\x75"]}>0){${"\x47\x4cO\x42\x41\x4c\x53"}["ygkv\x70\x79\x79\x64\x6c\x6ai\x66"]="s\x71l";${${"\x47\x4c\x4f\x42\x41L\x53"}["\x6e\x79\x74v\x7av\x61\x64m"]}="IN\x53\x45RT\x20IN\x54O\x20`"._DB_PREFIX_."\x63\x75\x73t\x6f\x6d\x65\x72_\x63\x72\x65\x64\x69\x74`\x20(id\x5f\x63u\x73\x74o\x6d\x65\x72,i\x64_ord\x65\x72,\x69\x64_r\x65\x61\x73\x6fn,un\x69t\x73,\x64\x61\x74\x65\x5fa\x64d, \x6dem\x6f)\x20\x56\x41\x4cUE\x53 (".$order->id_customer.",".$order->id.",".AgilePrepaidCredit::CREDIT_REASON_PURCHASE_REWARD.",".${${"\x47\x4c\x4fB\x41\x4cS"}["\x69\x67\x64\x6f\x73\x66\x79u"]}.",'".date("Y-\x6d-\x64 H:i:s")."\x27,'".$this->l('Tokens/Credit Rewards')."')";Db::getInstance()->Execute(${${"\x47\x4c\x4fB\x41\x4cS"}["\x79\x67\x6b\x76\x70y\x79\x64l\x6aif"]});}}public static function tokenValueHasBennPaid($order_reference){${"G\x4c\x4fB\x41\x4cS"}["\x73\x66fv\x72i\x69\x76\x68\x73u"]="\x73q\x6c";${${"\x47LO\x42A\x4c\x53"}["s\x66\x66\x76\x72ii\x76\x68s\x75"]}="\x53\x45\x4cEC\x54\x20\x61\x6d\x6fu\x6e\x74 F\x52\x4f\x4d\x20"._DB_PREFIX_."or\x64er\x5fp\x61yme\x6e\x74\x20WH\x45\x52\x45 o\x72\x64e\x72_\x72\x65fere\x6ec\x65='".${${"\x47\x4c\x4fB\x41\x4cS"}["t\x6a\x6ct\x65q\x65"]}."'\x20A\x4e\x44\x20t\x72\x61\x6es\x61c\x74\x69o\x6e\x5fid\x3d\x27\x61gileprepaid\x63\x72\x65\x64\x69t\x27";${${"\x47LO\x42\x41LS"}["\x67\x6b\x64j\x63\x72"]}=floatval(Db::getInstance()->getValue(${${"\x47\x4cO\x42\x41LS"}["ny\x74v\x7av\x61\x64m"]}));return${${"G\x4c\x4fB\x41\x4c\x53"}["\x67\x6bdj\x63r"]};}public function processTokensUsageInNormalCheckout($id_order){global$cookie;$avtgbtnjm="\x74\x6ft\x61l\x5f\x74\x6f\x6b\x65\x6e\x5f\x76al\x75\x65";$jkyouepkl="\x6fr\x64\x65r";$eeobvvp="s\x71l";if(!${${"\x47\x4cO\x42\x41\x4c\x53"}["\x6dj\x63\x74zd"]})return;$ocvtrrrp="\x69\x64_c\x75s\x74\x6f\x6d\x65r_cre\x64\x69\x74";${${"\x47\x4c\x4fBA\x4cS"}["n\x79\x74v\x7a\x76\x61\x64\x6d"]}="S\x45\x4cEC\x54\x20\x69\x64\x5fc\x75st\x6fmer_\x63\x72e\x64\x69t\x20FR\x4f\x4d "._DB_PREFIX_."cust\x6fm\x65\x72\x5fcredi\x74\x20\x57HER\x45\x20\x69\x64_o\x72de\x72\x3d".(int)${${"\x47\x4c\x4fB\x41\x4cS"}["m\x6act\x7a\x64"]}." \x41ND\x20i\x64\x5fr\x65\x61so\x6e = ".AgilePrepaidCredit::CREDIT_REASON_NORMAL_CHECKOUT_PAYMENT;${"\x47\x4cO\x42\x41L\x53"}["\x6c\x7acp\x6f\x71\x69\x74x\x76"]="\x73\x71l";${${"\x47L\x4fB\x41LS"}["qc\x77d\x6d\x64\x6f\x62g"]}=intval(DB::getInstance()->getValue(${${"\x47\x4c\x4fB\x41\x4c\x53"}["lz\x63\x70\x6f\x71i\x74\x78\x76"]}));if(${$ocvtrrrp}>0)return;${"G\x4cO\x42\x41\x4c\x53"}["\x72\x6eqj\x65i"]="\x63\x72\x65\x64\x69\x74s";${$jkyouepkl}=new Order(${${"\x47LO\x42A\x4cS"}["mjct\x7a\x64"]});if(!Validate::isLoadedObject(${${"\x47\x4c\x4f\x42\x41\x4cS"}["kzyb\x69\x71"]}))return;${"\x47\x4cO\x42A\x4cS"}["\x63\x66\x69l\x6c\x6afy"]="\x63r\x65\x64\x69\x74s";$vmvzpilh="s\x71\x6c";${${"\x47\x4c\x4f\x42AL\x53"}["u\x77i\x74\x7a\x66\x62\x67\x73\x77"]}=floatval(self::tokens_used_in_cart($order->id_cart));${"\x47L\x4f\x42\x41L\x53"}["v\x62\x73d\x73\x76i\x64\x67s"]="\x73\x71\x6c";if(${${"G\x4cO\x42A\x4cS"}["uwi\x74zf\x62gs\x77"]}<=0)return;${$vmvzpilh}="I\x4eSERT\x20\x49NT\x4f\x20\x60"._DB_PREFIX_."\x63us\x74\x6f\x6de\x72\x5fcre\x64\x69\x74` (\x69\x64\x5fcu\x73to\x6de\x72,id_\x6f\x72d\x65\x72, \x69\x64\x5f\x72e\x61\x73o\x6e ,u\x6e\x69ts, \x64a\x74\x65\x5f\x61dd, m\x65\x6d\x6f) \x56A\x4cUES\x20\n   \x20\x20\x20 \x20\x20    \x20\x20 (".$order->id_customer.",".$order->id.",".AgilePrepaidCredit::CREDIT_REASON_NORMAL_CHECKOUT_PAYMENT.",-".${${"GLOB\x41\x4c\x53"}["rnqj\x65\x69"]}.",'".date("Y-\x6d-\x64\x20\x48:i:s")."','".$this->l('Token/Credit payment')."\x27)\x20\n \x20\x20\x20 \x20 \x20 \x20   \x20 \x20 ";Db::getInstance()->Execute(${$eeobvvp});${$avtgbtnjm}=AgilePrepaidCredit::ConvertTokens2Price(${${"\x47LOB\x41LS"}["\x63\x66\x69lljf\x79"]},$order->id_currency);${${"GL\x4f\x42\x41\x4c\x53"}["\x76b\x73\x64\x73\x76\x69d\x67s"]}="\x53\x45\x4cEC\x54\x20a\x6doun\x74 FR\x4fM "._DB_PREFIX_."o\x72\x64er\x5f\x70ay\x6dent\x20WHERE \x6f\x72\x64e\x72\x5fr\x65\x66e\x72\x65n\x63\x65='".$order->reference."\x27 A\x4e\x44\x20tr\x61nsa\x63tio\x6e\x5f\x69\x64\x3d\x27a\x67\x69\x6cepre\x70ai\x64\x63\x72e\x64it\x27";${${"G\x4c\x4f\x42AL\x53"}["\x6d\x6dg\x6c\x6cc\x65\x70h\x6fuo"]}=floatval(Db::getInstance()->getValue(${${"\x47L\x4fBAL\x53"}["\x6ey\x74\x76z\x76\x61\x64m"]}));if(${${"G\x4cO\x42\x41\x4c\x53"}["\x6d\x6d\x67\x6c\x6c\x63\x65\x70\x68\x6fu\x6f"]}<=0){$vwlxsswdjc="orderpay\x6d\x65\x6et";$dklmfhwis="\x74\x6ft\x61\x6c\x5fto\x6be\x6e_\x76\x61\x6c\x75e";${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x64koknn\x6bf"]}=new Currency($order->id_currency);${$vwlxsswdjc}=new OrderPayment();$orderpayment->payment_method=$this->l('Paid by token');$orderpayment->amount=${$dklmfhwis};$orderpayment->id_currency=$order->id_currency;$orderpayment->order_reference=$order->reference;$orderpayment->conversion_rate=$currency->conversion_rate;$orderpayment->transaction_id="agil\x65pr\x65\x70a\x69d\x63r\x65\x64it";$orderpayment->save();}}public static function GetTokenBalance($id_customer){$xylmqypyuf="\x69\x64\x5f\x63\x75st\x6f\x6d\x65\x72";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x6e\x62g\x7ad\x69r"]="\x69\x64\x5fcu\x73t\x6f\x6der";${"\x47\x4cO\x42A\x4c\x53"}["\x6evji\x76a\x62\x69h"]="\x72\x65\x73u\x6ct";if(!intval(${${"\x47\x4cO\x42A\x4c\x53"}["\x6ebgz\x64\x69\x72"]}))return 0;${${"\x47L\x4f\x42\x41\x4c\x53"}["n\x79\x74\x76\x7avadm"]}="\x53\x45L\x45C\x54 SUM(un\x69t\x73)\x20\x41\x53 b\x61lan\x63\x65\x20\x46\x52O\x4d \x60"._DB_PREFIX_."cu\x73t\x6fm\x65\x72\x5f\x63\x72edit` W\x48E\x52E \x69\x64_\x63us\x74\x6fm\x65r=".${$xylmqypyuf};${${"GL\x4fB\x41LS"}["\x6e\x76j\x69v\x61\x62\x69\x68"]}=Db::getInstance()->getRow(${${"GL\x4f\x42\x41\x4c\x53"}["n\x79t\x76\x7a\x76a\x64m"]});if(isset(${${"\x47L\x4f\x42\x41LS"}["\x74\x70\x73\x63w\x69\x70ij\x66\x6c\x74"]}["b\x61la\x6ec\x65"])AND floatval(${${"\x47LOB\x41\x4c\x53"}["tp\x73\x63w\x69\x70\x69\x6a\x66l\x74"]}["\x62al\x61\x6ece"])>0)return floatval(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x74\x70\x73\x63w\x69\x70i\x6af\x6c\x74"]}["ba\x6can\x63e"]);return 0;}public static function get_unitcurrency(){${"\x47\x4c\x4fB\x41\x4c\x53"}["q\x6d\x65\x78\x71h\x74\x79a\x6dk\x61"]="\x69\x64_c\x75\x72\x72\x65n\x63\x79";$fkcelgejoslw="i\x64\x5fcu\x72r\x65\x6e\x63\x79";${${"\x47\x4c\x4f\x42AL\x53"}["q\x6d\x65xq\x68t\x79a\x6dka"]}=(int)Configuration::getGlobalValue("\x41\x47\x49\x4cE_\x50C\x52\x45\x44IT_U\x4eITC\x55\x52RE\x4e\x43\x59");${${"\x47\x4cO\x42\x41\x4c\x53"}["\x73o\x64j\x79f\x6egq"]}=new Currency(${$fkcelgejoslw});if(Validate::isLoadedObject(${${"\x47L\x4f\x42\x41L\x53"}["s\x6f\x64\x6ayfn\x67q"]})&&$unitcurrency->conversion_rate!=0)return${${"\x47LO\x42\x41LS"}["s\x6fd\x6a\x79fngq"]};return new Currency((int)Configuration::get("PS\x5f\x43\x55RR\x45N\x43\x59_DEFAU\x4cT"));}public static function ConvertPrice2Tokens($id_currency,$amount){$uybtrocxrqc="\x61mo\x75\x6et";$xeecrgosthe="\x75\x6e\x69\x74\x70\x72\x69\x63\x65";${"\x47L\x4fB\x41\x4cS"}["\x78\x70\x65\x68\x68\x68\x6a\x76"]="\x75\x6e\x69\x74\x70\x72i\x63\x65";${"G\x4c\x4f\x42A\x4c\x53"}["\x74\x62\x75\x6d\x66\x78\x72s\x71"]="\x63urren\x63\x79";$tysieqihl="\x69\x64\x5fc\x75\x72\x72\x65\x6e\x63\x79";${"\x47LOB\x41\x4cS"}["z\x6ej\x70\x69\x6dxb\x64\x68\x78"]="u\x6e\x69t\x70\x72\x69\x63e";${$xeecrgosthe}=floatval(Configuration::getGlobalValue("\x41GILE_PC\x52E\x44I\x54_\x55\x4eI\x54PR\x49C\x45"));if(${${"G\x4c\x4f\x42A\x4c\x53"}["\x6f\x70\x6e\x77r\x62\x6e\x72\x6d\x6ad"]}==0)${${"\x47L\x4fB\x41L\x53"}["x\x70\x65h\x68\x68\x6av"]}=1;${${"\x47\x4c\x4f\x42\x41LS"}["tb\x75\x6d\x66x\x72\x73q"]}=new Currency(${$tysieqihl});${${"\x47\x4c\x4fB\x41\x4cS"}["s\x6f\x64\x6a\x79\x66ngq"]}=AgilePrepaidCredit::get_unitcurrency();${${"\x47L\x4f\x42\x41\x4cS"}["ji\x78\x72\x6db\x77\x69\x6av"]}=${$uybtrocxrqc}/${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x7a\x6e\x6a\x70i\x6d\x78\x62\x64hx"]}/($currency->conversion_rate/$unitcurrency->conversion_rate);return${${"\x47L\x4f\x42\x41\x4c\x53"}["ji\x78\x72\x6d\x62\x77i\x6a\x76"]};}public static function ConvertTokens2Price($tokens,$id_currency){$mdtsvjco="\x76\x61l\x75\x65";${"G\x4c\x4fB\x41L\x53"}["\x74mf\x76\x6c\x76\x6e\x6f\x68\x79\x6a"]="\x75\x6e\x69\x74\x70ric\x65";${"\x47\x4c\x4f\x42\x41L\x53"}["\x70\x79qn\x64\x70vl\x79m\x71"]="\x74\x6fk\x65ns";${${"\x47L\x4f\x42\x41L\x53"}["\x74\x6df\x76\x6cvn\x6f\x68yj"]}=floatval(Configuration::getGlobalValue("AG\x49\x4c\x45_\x50\x43RED\x49\x54\x5f\x55\x4e\x49TP\x52\x49CE"));${"\x47\x4c\x4f\x42ALS"}["\x67\x6ef\x71\x62\x6e\x73e\x74vvg"]="u\x6e\x69\x74c\x75\x72\x72\x65\x6e\x63\x79";${"\x47\x4c\x4f\x42\x41L\x53"}["h\x66e\x6c\x74\x63e\x62"]="\x76\x61\x6cue";if(${${"\x47\x4c\x4fBA\x4c\x53"}["\x6f\x70n\x77\x72\x62n\x72mj\x64"]}==0)${${"\x47\x4cOB\x41LS"}["\x6f\x70\x6ew\x72\x62\x6e\x72\x6d\x6a\x64"]}=1;$iweqap="\x75n\x69t\x70\x72ic\x65";$zlnled="v\x61lu\x65";${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x64k\x6f\x6b\x6en\x6b\x66"]}=new Currency(${${"\x47L\x4fB\x41\x4cS"}["k\x79i\x6a\x6be\x66\x75\x76\x74"]});${"\x47L\x4f\x42A\x4c\x53"}["\x66j\x6fi\x76o\x78w\x68"]="\x76al\x75\x65";${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x67\x6e\x66\x71\x62ns\x65\x74\x76\x76\x67"]}=new Currency((int)Configuration::getGlobalValue("\x41GI\x4cE_\x50\x43RED\x49T_\x55\x4eITC\x55\x52\x52\x45\x4eCY"));${${"G\x4c\x4f\x42\x41\x4cS"}["\x68\x66\x65\x6c\x74\x63\x65b"]}=(${${"\x47L\x4fB\x41LS"}["\x70y\x71\x6e\x64\x70\x76\x6c\x79m\x71"]}*${$iweqap});${$mdtsvjco}=${${"\x47LO\x42\x41L\x53"}["f\x6a\x6f\x69v\x6f\x78w\x68"]}*($currency->conversion_rate/$unitcurrency->conversion_rate);return${$zlnled};}public static function tokens_used_in_cart($id_cart){${"G\x4c\x4f\x42\x41\x4c\x53"}["\x65i\x68n\x6a\x6c\x78i\x62"]="\x76\x61\x6c";$lcvfbvi="i\x64\x5f\x63a\x72\x74";$wktlulko="\x76\x61\x6c";$jzpgdgmhm="\x73ql";if(!${$lcvfbvi})return 0;${$jzpgdgmhm}="\x53E\x4cEC\x54 \x74\x6fke\x6e\x73\x20F\x52OM "._DB_PREFIX_."\x63a\x72\x74\x5ft\x6f\x6b\x65n\x73\x20WHE\x52\x45 \x69d\x5fc\x61rt\x3d".intval(${${"G\x4c\x4fB\x41\x4c\x53"}["ii\x63d\x72\x62t\x6a"]});${${"GLOBALS"}["\x65i\x68n\x6al\x78i\x62"]}=Db::getInstance()->getValue(${${"GL\x4fB\x41\x4c\x53"}["ny\x74\x76\x7a\x76a\x64\x6d"]});return floatval(${$wktlulko});}public static function has_tokens_contained_in_cart($id_cart){$bpuescmjsjyh="\x69d_car\x74";${"\x47\x4cOBA\x4c\x53"}["\x65q\x75b\x64f\x73"]="va\x6c";if(!${$bpuescmjsjyh})return false;${${"G\x4c\x4fB\x41\x4c\x53"}["\x6ey\x74v\x7av\x61\x64\x6d"]}="SELECT m\x61\x78(ct\x2ei\x64\x5f\x70\x72\x6f\x64\x75\x63t) \n\t\t\t\tFR\x4f\x4d "._DB_PREFIX_."\x63\x61r\x74_pr\x6fdu\x63\x74\x20c\x74\n\t\t\t\t\t\x4c\x45F\x54 J\x4fI\x4e\x20"._DB_PREFIX_."\x63a\x74\x65go\x72y\x5fp\x72o\x64\x75c\x74 c\x79 \x4fN (ct.i\x64_pr\x6f\x64uc\x74\x3d\x63y.\x69d_\x70\x72od\x75\x63t)\n\t\t\t\t\x20W\x48\x45RE\x20\x69d\x5f\x63\x61\x72t\x3d".intval(${${"\x47\x4cO\x42AL\x53"}["i\x69\x63\x64\x72b\x74\x6a"]})."\n\t\t\t\t\t\x20\x41\x4e\x44\x20\x49FNU\x4c\x4c(\x63\x79.i\x64_\x63ateg\x6fry,0) = ".intval(Configuration::getGlobalValue("\x41G\x49L\x45\x5fP\x43R\x45D\x49T\x5f\x43\x49\x44"));${${"G\x4c\x4fBAL\x53"}["\x65q\x75b\x64fs"]}=intval(Db::getInstance()->getValue(${${"\x47\x4c\x4f\x42\x41L\x53"}["\x6ey\x74vz\x76\x61d\x6d"]}));return(${${"\x47L\x4fBA\x4c\x53"}["\x63mz\x6czsy\x65p\x75"]}>0);}function addCreditsToCart(){${"\x47LOBA\x4cS"}["\x78\x6a\x66\x63\x6b\x6c\x73"]="cr\x65\x64i\x74s";${"G\x4c\x4f\x42\x41\x4cS"}["\x70s\x67\x76\x68e\x6cx\x78"]="\x73\x71\x6c";global$cookie,$cart;$qxnkuwnqdcvd="\x63r\x65\x64\x69\x74s";${"GL\x4f\x42\x41\x4c\x53"}["\x6bg\x76kligvr\x77"]="\x63\x72\x65\x64\x69\x74s";${"\x47L\x4f\x42A\x4c\x53"}["\x76\x6e\x76\x6c\x61\x70w\x79"]="\x73\x71\x6c";$zujtxioadxf="\x61\x70\x63Ord\x65\x72T\x6f\x74\x61l";$cuppdhgtt="a\x70\x63\x4fr\x64\x65\x72\x54\x6f\x74a\x6c";if(!Tools::isSubmit("\x73ubm\x69t\x41\x64\x64C\x72\x65di\x74s"))return$this->l('Invalid data posted');$ydmjyfgqqn="s\x71l";${"GLO\x42\x41L\x53"}["ol\x69p\x63\x6c\x64y"]="\x63\x72\x65d\x69\x74\x73";${$qxnkuwnqdcvd}=floatval(Tools::getValue("cr\x65di\x74\x73\x5f\x74o_\x75\x73e"));if(${${"G\x4cO\x42A\x4c\x53"}["\x78j\x66\x63\x6b\x6c\x73"]}<0)return$this->l('Invalid credit value entered');if(self::has_tokens_contained_in_cart($cart->id)){return$this->l('You can not buy tokens using tokens.');}${"\x47\x4c\x4f\x42A\x4c\x53"}["eu\x76m\x70\x6c\x66g\x79d\x6a"]="apcO\x72d\x65\x72\x54\x6f\x74\x61\x6c_\x74\x6fk\x65n\x73";${${"\x47L\x4fB\x41LS"}["\x75n\x73\x61\x6f\x68\x63\x70"]}=self::GetTokenBalance($cookie->id_customer);if(${${"\x47L\x4f\x42\x41\x4c\x53"}["\x75w\x69tz\x66b\x67\x73w"]}>${${"\x47\x4c\x4f\x42A\x4cS"}["u\x6e\x73a\x6fhc\x70"]})return$this->l('You can not enter a credit value that is more than your available credits.');${$ydmjyfgqqn}="DEL\x45TE \x46\x52OM "._DB_PREFIX_."ca\x72\x74\x5ft\x6fken\x73 W\x48ER\x45 \x69d\x5f\x63\x61\x72\x74=".intval($cart->id);Db::getInstance()->Execute(${${"\x47\x4cOB\x41\x4cS"}["\x6ey\x74\x76\x7a\x76\x61\x64\x6d"]});${$cuppdhgtt}=$cart->getOrderTotal();${${"G\x4cO\x42\x41L\x53"}["\x65u\x76mp\x6c\x66\x67\x79\x64\x6a"]}=AgilePrepaidCredit::ConvertPrice2Tokens($cart->id_currency,${$zujtxioadxf});if((float)(${${"\x47\x4cOB\x41\x4c\x53"}["\x6fl\x69pc\x6c\x64\x79"]}-${${"\x47\x4c\x4f\x42ALS"}["\x62\x6a\x64\x78\x62\x62\x75\x69\x65r"]})>0.00001){return$this->l('You can not enter a credit value that is more than the order total amount.');}${${"\x47LO\x42A\x4cS"}["vn\x76\x6c\x61\x70w\x79"]}="INS\x45\x52\x54 INTO "._DB_PREFIX_."\x63ar\x74\x5f\x74\x6f\x6b\x65ns (id\x5fcar\x74, \x74o\x6bens) VA\x4cU\x45\x53 (".intval($cart->id).",".floatval(${${"\x47\x4c\x4fB\x41\x4c\x53"}["\x6b\x67\x76k\x6c\x69\x67\x76\x72w"]}).")";Db::getInstance()->Execute(${${"G\x4cO\x42AL\x53"}["p\x73\x67\x76\x68el\x78x"]});return"";}public static function adjustCreditsInCart(){$wehwgpomrszk="\x63\x61rt";${"\x47LO\x42AL\x53"}["x\x6a\x67\x76k\x72\x77"]="\x73q\x6c";${${"GL\x4fB\x41LS"}["\x78\x66\x64o\x71\x7aj\x79vs\x79"]}=Context::getContext();$fgkddebegi="\x61p\x63O\x72\x64\x65\x72\x54\x6f\x74\x61l";${$wehwgpomrszk}=$context->cart;$xwcufna="to\x6be\x6es";${"\x47\x4c\x4f\x42A\x4cS"}["u\x65\x79p\x66\x6b\x6e"]="\x61\x70c\x4fr\x64\x65r\x54\x6f\x74a\x6c\x5f\x74o\x6b\x65n\x73";$hehdcekdmg="\x74\x6fke\x6e\x73";${${"G\x4c\x4f\x42\x41\x4c\x53"}["\x6e\x79t\x76\x7a\x76\x61\x64\x6d"]}="\x53E\x4c\x45C\x54\x20tok\x65n\x73\x20F\x52O\x4d "._DB_PREFIX_."ca\x72t\x5f\x74ok\x65n\x73\x20\x57\x48\x45\x52\x45\x20id_c\x61r\x74\x3d".(int)$cart->id;${${"GLOB\x41\x4cS"}["\x6ai\x78\x72\x6d\x62\x77\x69j\x76"]}=(float)Db::getInstance()->getValue(${${"GL\x4fB\x41\x4cS"}["\x6e\x79\x74vz\x76ad\x6d"]});if(${${"\x47\x4cO\x42\x41LS"}["ji\x78\x72\x6db\x77i\x6a\x76"]}==0)return;$aooeiizuu="a\x70\x63\x4fr\x64er\x54\x6ft\x61\x6c";Db::getInstance()->Execute("\x44EL\x45\x54E\x20F\x52\x4fM "._DB_PREFIX_."cart\x5ftok\x65ns\x20W\x48\x45R\x45\x20\x69\x64\x5f\x63a\x72\x74=".(int)$cart->id);${$fgkddebegi}=$cart->getOrderTotal();${${"\x47\x4c\x4f\x42AL\x53"}["bj\x64\x78b\x62\x75\x69\x65r"]}=AgilePrepaidCredit::ConvertPrice2Tokens($cart->id_currency,${$aooeiizuu});if((${$hehdcekdmg}-${${"\x47L\x4f\x42AL\x53"}["b\x6a\x64x\x62\x62\x75\x69\x65\x72"]})>0)${${"\x47LOBA\x4c\x53"}["\x6a\x69\x78r\x6d\x62\x77ij\x76"]}=${${"G\x4c\x4fBAL\x53"}["\x75\x65y\x70\x66\x6bn"]};${${"\x47LO\x42A\x4c\x53"}["\x78j\x67\x76\x6br\x77"]}="\x49N\x53\x45\x52\x54\x20IN\x54\x4f\x20"._DB_PREFIX_."\x63\x61rt\x5f\x74\x6f\x6ben\x73 (i\x64_ca\x72\x74, \x74\x6f\x6be\x6e\x73)\x20\x56AL\x55\x45S (".intval($cart->id).",".floatval(${$xwcufna}).")";Db::getInstance()->Execute(${${"\x47L\x4fBA\x4c\x53"}["n\x79t\x76zvadm"]});}public static function IsProductPaidByCustomer($id_product,$id_customer){${"\x47\x4c\x4f\x42\x41LS"}["\x72d\x63\x7aw\x68\x65but\x77"]="\x69d_\x63\x75\x73\x74\x6f\x6der";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["i\x6b\x69\x6f\x77vr\x63\x74\x6es"]="\x69\x64_\x70\x72o\x64\x75\x63\x74";if(!intval(${${"G\x4c\x4fB\x41LS"}["\x71\x79\x62\x6b\x76w\x6f\x6d\x69\x6e"]}))return false;$cqckbjwivl="\x72es\x75\x6c\x74";if(!intval(${${"GL\x4f\x42\x41\x4c\x53"}["r\x64\x63z\x77\x68\x65\x62\x75\x74w"]}))return false;${"\x47\x4c\x4fB\x41L\x53"}["\x75\x68\x70l\x6db\x62\x79"]="\x72es\x75lt";${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x6eytvz\x76\x61d\x6d"]}="\x53E\x4c\x45C\x54 C\x4f\x55\x4eT(*)\x20\x41S \x70a\x69\x64\x20\n  \x20\x20  \x20\x20\x20\x20    \x20\x20 \x20\x20 FR\x4fM\x20"._DB_PREFIX_."cust\x6fmer\x5f\x63red\x69t a\n\x20\x20  \x20\x20 \x20\x20 \x20\x20\x20  \x20 \x20  \x20\x20 L\x45\x46T\x20\x4a\x4f\x49N "._DB_PREFIX_."ord\x65r\x5f\x64\x65\x74\x61il\x20pd\x20\x4f\x4e a\x2e\x69d_o\x72\x64er\x20\x3d\x20\x70d.\x69\x64_o\x72de\x72\n  \x20  \x20  \x20 \x20\x20  \x20\x20   \x20W\x48E\x52\x45\x20\x61.id\x5fc\x75s\x74omer = ".intval(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["ul\x62\x73\x62l\x76\x67\x65\x64"]})."\x20\x41\x4eD pd\x2ep\x72\x6fdu\x63\x74\x5f\x69\x64 =".intval(${${"\x47\x4c\x4fBA\x4c\x53"}["\x69\x6b\x69o\x77\x76\x72c\x74\x6e\x73"]});${${"G\x4c\x4f\x42AL\x53"}["\x74\x70\x73\x63\x77ip\x69j\x66\x6c\x74"]}=Db::getInstance()->getRow(${${"\x47L\x4f\x42A\x4c\x53"}["\x6e\x79\x74\x76\x7a\x76\x61dm"]});if(isset(${$cqckbjwivl}["paid"])AND intval(${${"G\x4cO\x42AL\x53"}["\x75h\x70l\x6d\x62\x62\x79"]}["\x70\x61id"])>0)return true;return false;}public static function IsProductInLinkedCategory($id_product){$mqwmmaytnm="\x69\x64\x5f\x70\x72\x6fdu\x63\x74";$qkcmfqvwlzp="\x72\x65sul\x74";${${"\x47L\x4f\x42\x41LS"}["\x6e\x79tv\x7a\x76\x61d\x6d"]}="SELECT\x20\x60\x69d_cat\x65g\x6f\x72y\x60\x20\x66r\x6fm\x20`"._DB_PREFIX_."\x63at\x65go\x72\x79_\x70rodu\x63\x74`\x20W\x48ERE\x20`id\x5fc\x61\x74eg\x6fry`=".(int)Configuration::getGlobalValue("A\x47\x49\x4cE\x5f\x50CRE\x44IT_CI\x44")."\x20\x41\x4e\x44 i\x64\x5f\x70r\x6f\x64\x75\x63\x74\x20\x3d".${$mqwmmaytnm};${"\x47\x4c\x4fB\x41\x4c\x53"}["\x73j\x73\x61\x78u"]="\x72\x65\x73\x75\x6c\x74";${${"G\x4cO\x42\x41\x4cS"}["\x73\x6a\x73ax\x75"]}=Db::getInstance()->getRow(${${"\x47\x4cOBALS"}["\x6e\x79tvzvad\x6d"]});if(isset(${${"\x47\x4cO\x42\x41\x4c\x53"}["\x74\x70\x73c\x77\x69\x70\x69\x6a\x66\x6c\x74"]}["\x69\x64_c\x61tegory"])AND intval(${$qkcmfqvwlzp}["id_\x63at\x65go\x72\x79"])>0)return true;return false;}public function getBlockSettings(){${"\x47\x4cO\x42\x41\x4c\x53"}["\x78\x61k\x6b\x6bh\x74\x62\x63"]="\x69\x74\x65m\x73";$ilxlho="\x73\x65\x74\x74\x69ng\x73";$egiglurqjrif="ite\x6d\x73";${"G\x4c\x4f\x42\x41\x4c\x53"}["ym\x6e\x65\x65\x6c"]="dat\x66\x69le";$erqspjbmfm="it\x65\x6d\x73";${"\x47LO\x42A\x4c\x53"}["\x63\x6bv\x79\x79\x7a"]="it\x65m";${$ilxlho}=array();${${"\x47\x4c\x4f\x42\x41LS"}["y\x6d\x6e\x65el"]}=dirname(__FILE__)."/bl\x6f\x63\x6b\x73et\x74\x69\x6egs.d\x61\x74";${"GLO\x42\x41L\x53"}["\x70x\x70h\x78ej\x69\x68\x71"]="\x64\x61\x74a";$ojvwdsb="da\x74a";${$ojvwdsb}=file_exists(${${"\x47LO\x42\x41L\x53"}["g\x6b\x64\x6cgk\x6etx"]})?file(${${"\x47L\x4f\x42\x41LS"}["\x67\x6b\x64\x6c\x67\x6b\x6e\x74x"]}):array();${$erqspjbmfm}=$this->getInitSetting();if(!empty(${${"G\x4c\x4f\x42\x41\x4cS"}["p\x78p\x68x\x65\x6a\x69h\x71"]}))${${"\x47L\x4fB\x41\x4c\x53"}["\x78a\x6b\x6bk\x68t\x62\x63"]}=explode(",",${${"GLOBA\x4c\x53"}["\x70\x62\x66\x62\x6bw"]}[0]);foreach(${$egiglurqjrif} AS${${"\x47L\x4f\x42\x41\x4cS"}["\x63\x6bv\x79yz"]}){${"\x47LO\x42\x41\x4c\x53"}["y\x69kij\x73t"]="\x73e\x74\x74\x69\x6e\x67\x73";${"G\x4cOB\x41\x4c\x53"}["gv\x63\x6f\x72\x6f\x69\x79\x62\x6d"]="n\x76";$jiekkguz="l\x65\x6e";$nedmiwmt="n\x76";${${"G\x4cOB\x41\x4c\x53"}["\x67\x76\x63\x6froi\x79\x62m"]}=explode(":",${${"\x47\x4c\x4fBAL\x53"}["\x77\x66rfl\x6ac\x6d"]});if(empty(${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x72\x77s\x75\x6f\x7a\x72b"]}))continue;${$jiekkguz}=count(${${"G\x4c\x4fB\x41\x4cS"}["r\x77\x73u\x6f\x7a\x72b"]});if(${${"\x47\x4cO\x42A\x4cS"}["\x74kud\x68\x6d\x78\x62\x6a\x6ff"]}==1)${${"\x47LO\x42A\x4c\x53"}["pa\x6f\x71d\x74\x63\x62d"]}[${$nedmiwmt}[0]]=1;else${${"\x47L\x4f\x42A\x4cS"}["\x79i\x6b\x69j\x73\x74"]}[${${"\x47\x4c\x4fB\x41\x4c\x53"}["r\x77\x73\x75\x6f\x7a\x72b"]}[0]]=${${"G\x4cO\x42\x41\x4c\x53"}["rw\x73u\x6f\x7ar\x62"]}[1];}return${${"G\x4c\x4f\x42\x41L\x53"}["\x70\x61\x6f\x71d\x74\x63\x62\x64"]};}private function saveBlockSettings(){$ngdkibs="\x62\x6c\x6f\x63\x6b";${"\x47LOB\x41\x4cS"}["c\x69m\x79\x6cp\x6cr\x64\x72"]="\x64\x61ta";${${"\x47L\x4f\x42\x41L\x53"}["c\x69my\x6c\x70lrd\x72"]}="";${"\x47L\x4fB\x41\x4c\x53"}["\x79\x71\x6bd\x70\x70\x72\x69"]="\x68\x61n\x64\x6c\x65";${"\x47\x4c\x4f\x42\x41LS"}["h\x6d\x69\x6c\x71v\x66x\x6f\x6f"]="\x6d\x61p\x70\x69\x6e\x67";$yehuksvu="ha\x6e\x64le";foreach($this->getInfoBlocks()AS${$ngdkibs}=>${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["hmi\x6cq\x76\x66xo\x6f"]}){${"\x47\x4cO\x42A\x4c\x53"}["xx\x70\x6atk\x74"]="\x64a\x74\x61";${"G\x4c\x4fB\x41\x4c\x53"}["\x71zggs\x74r"]="\x62lo\x63\x6b";if(!empty(${${"\x47LOB\x41\x4cS"}["\x70\x62fb\x6b\x77"]}))${${"\x47\x4cO\x42\x41L\x53"}["\x70\x62\x66b\x6b\x77"]}=${${"\x47\x4cOB\x41\x4cS"}["pb\x66b\x6b\x77"]}.",";${${"GL\x4f\x42AL\x53"}["\x78x\x70\x6a\x74k\x74"]}=${${"G\x4c\x4f\x42AL\x53"}["\x70bf\x62kw"]}.${${"\x47\x4c\x4fB\x41\x4c\x53"}["\x71\x7a\x67g\x73t\x72"]}.":".$_POST["vi\x73\x69bi\x6c\x69ty\x5f".${${"\x47\x4c\x4f\x42ALS"}["\x78\x6c\x6e\x78tm\x61\x75\x73"]}];}${$yehuksvu}=fopen(dirname(__FILE__)."/b\x6co\x63kse\x74\x74i\x6eg\x73.d\x61\x74","\x77");if(!${${"\x47L\x4f\x42\x41L\x53"}["\x79\x71k\x64\x70\x70r\x69"]})return;fwrite(${${"\x47\x4cO\x42\x41\x4c\x53"}["\x70\x74u\x6e\x79\x6bz\x6e\x70\x71\x69"]},${${"G\x4c\x4f\x42\x41L\x53"}["\x70b\x66\x62kw"]});fclose(${${"\x47LO\x42A\x4c\x53"}["pt\x75\x6e\x79kz\x6ep\x71\x69"]});}public function getInfoBlocks(){${"G\x4c\x4fBAL\x53"}["\x67d\x77\x73\x71x\x6c\x6a"]="\x69\x6e\x66\x6fBl\x6f\x63\x6b\x73";$glidsxieo="\x69\x6e\x66\x6f\x42l\x6fc\x6bs";${"\x47\x4cOB\x41L\x53"}["\x75n\x76\x61\x6br\x72z\x63"]="i\x6e\x66\x6f\x42\x6c\x6f\x63\x6bs";${${"\x47\x4c\x4fB\x41L\x53"}["\x67d\x77\x73qx\x6cj"]}=array();${"G\x4c\x4fB\x41\x4c\x53"}["\x78\x77\x6e\x71\x65\x66p\x75"]="i\x6e\x66o\x42\x6c\x6f\x63\x6b\x73";${${"\x47\x4cO\x42A\x4cS"}["\x6e\x74\x68asl\x65"]}["I\x6da\x67es"]=$this->l('Product Image Block');${${"\x47\x4c\x4fB\x41L\x53"}["\x6et\x68a\x73le"]}["\x53h\x6frt\x44esc"]=$this->l('Short Description Block');${$glidsxieo}["Bu\x79Bl\x6f\x63\x6b"]=$this->l('Price Buy Block');${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x6et\x68\x61s\x6c\x65"]}["\x43\x6fl\x6f\x72Pi\x63\x6b\x65r"]=$this->l('Color Picker Block');$vmifaihjtam="\x69nf\x6f\x42\x6c\x6f\x63\x6b\x73";${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x78wn\x71e\x66\x70u"]}["Q\x75a\x6et\x69\x74yD\x69\x73\x63\x6funt"]=$this->l('Quantity Discount Block');${${"G\x4c\x4fBA\x4c\x53"}["\x75\x6e\x76a\x6brrz\x63"]}["More\x49\x6e\x66o"]=$this->l('More Info Block');return${$vmifaihjtam};}private function getInitSetting(){${"G\x4c\x4fB\x41L\x53"}["o\x76\x6e\x66\x6f\x67x\x63\x71tn\x65"]="\x62\x6c\x6fck";$cuwokuhubf="\x69t\x65\x6ds";${$cuwokuhubf}=array();foreach($this->getInfoBlocks()AS${${"G\x4cOB\x41L\x53"}["\x6f\x76\x6ef\x6f\x67xcqt\x6ee"]}=>${${"\x47\x4c\x4f\x42AL\x53"}["n\x69r\x63\x6ed\x75"]}){${"\x47L\x4f\x42\x41\x4c\x53"}["\x77\x6dk\x69\x68\x67p\x66\x69mf"]="\x62\x6c\x6fc\x6b";${${"GL\x4fBAL\x53"}["\x65l\x67gxxc"]}[]=${${"\x47\x4c\x4fBA\x4c\x53"}["\x77\x6d\x6b\x69\x68g\x70\x66\x69\x6d\x66"]}.":\x31";}return${${"G\x4c\x4f\x42A\x4c\x53"}["elg\x67x\x78c"]};}public static function add_to_cart_handler(){${"GL\x4fB\x41\x4c\x53"}["\x69\x65\x71uc\x74\x73y"]="\x61\x76\x61i\x6cab\x6c\x65";$rgzkpb="\x71\x74\x79";$huktsrkmpnm="pay\x5f\x6d\x6f\x64\x65";${"\x47\x4cOB\x41\x4c\x53"}["l\x6a\x6d\x79\x72\x6bp"]="\x61\x67\x69\x6c\x65_\x70\x69d";${"\x47\x4cO\x42\x41L\x53"}["\x71\x66bv\x6a\x61q\x7a\x74"]="\x69\x73pa\x69d";global$cart,$cookie;if(Tools::getValue("d\x65\x6c\x65t\x65")==1)return;${"\x47\x4cO\x42\x41L\x53"}["\x69\x6c\x6dwr\x77\x68\x69"]="\x61g\x69\x6c\x65\x5f\x70\x61i\x64";$xfssiflmy="\x61\x67i\x6c\x65_p\x61\x69\x64";${$huktsrkmpnm}=intval(Configuration::getGlobalValue("AGI\x4cE\x5fPCR\x45DIT_\x50A\x59\x5f\x4dO\x44\x45"));${"\x47LO\x42\x41\x4c\x53"}["\x69\x62i\x64u\x71oo\x77z\x73\x71"]="\x70rod";$ftjktnolqp="\x70\x61\x79\x5fm\x6f\x64\x65";${"G\x4cO\x42A\x4c\x53"}["k\x68v\x67yi\x76"]="\x71t\x79";if(${${"G\x4cO\x42\x41\x4c\x53"}["\x6b\x63f\x71o\x79"]}==AgilePrepaidCredit::PAY_MODE_NORMAL)return;if(${$ftjktnolqp}==AgilePrepaidCredit::PAY_MODE_COMBINATION AND$cart->getOrderTotal()>0)return;$byhmftjr="\x71\x74y";$uulrmihbcu="\x72\x65\x70\x75r\x63\x68\x61\x73\x65";${${"\x47\x4cOB\x41L\x53"}["\x72\x6bo\x75\x68\x62\x6c\x71i"]}=intval(Tools::getValue("\x69d\x5f\x70\x72o\x64u\x63t"));${$xfssiflmy}=intval(Tools::getValue("\x69\x64_pr\x6f\x64u\x63t\x5fa\x74t\x72\x69bu\x74\x65"));${${"\x47\x4c\x4f\x42\x41\x4cS"}["ib\x69\x64\x75q\x6f\x6f\x77z\x73\x71"]}=new Product(${${"GL\x4f\x42AL\x53"}["r\x6b\x6f\x75\x68bl\x71\x69"]});${"\x47\x4c\x4fB\x41L\x53"}["t\x77\x6b\x6f\x6f\x76\x6f\x74\x71\x76\x62"]="\x72\x65\x70u\x72\x63ha\x73e";${"\x47LO\x42A\x4c\x53"}["ke\x70\x65eh\x65\x6e\x62os\x64"]="a\x67\x69\x6c\x65\x5f\x70\x69\x64";if(self::any_empty_required_file_customization_field(${${"GLO\x42ALS"}["\x75\x69\x72\x6f\x68\x79u\x72\x66"]},${${"G\x4c\x4f\x42AL\x53"}["\x71\x74\x6e\x61u\x6e\x6a"]})OR self::any_empty_required_text_customization_field(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x75\x69\x72\x6f\x68y\x75\x72\x66"]},${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x71\x74\x6e\x61u\x6e\x6a"]})){return;}${${"G\x4c\x4fBA\x4c\x53"}["\x6d\x76x\x70a\x67\x68\x76\x6e"]}=!agileprepaidcredit::IsProductInLinkedCategory(${${"G\x4cO\x42\x41\x4c\x53"}["r\x6b\x6fu\x68b\x6c\x71\x69"]});$ecojfs="\x73\x71\x6c";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["yw\x65\x6fd\x64ay"]="\x61\x76a\x69l\x61\x62\x6ce";${"G\x4cO\x42\x41\x4cS"}["r\x77\x6a\x6fy\x7af\x61\x6b"]="\x69sLo\x67\x67\x65\x64";${${"\x47\x4cO\x42AL\x53"}["\x71\x66\x62\x76\x6a\x61\x71z\x74"]}=agileprepaidcredit::IsProductPaidByCustomer(${${"\x47\x4c\x4fB\x41\x4c\x53"}["\x72\x6b\x6f\x75\x68\x62\x6cq\x69"]},$cookie->id_customer);${${"\x47\x4cOB\x41\x4c\x53"}["\x74\x77\x6boov\x6f\x74\x71vb"]}=intval(Configuration::getGlobalValue("A\x47ILE\x5fP\x43R\x45\x44IT_R\x45P\x55\x52\x43\x48\x41\x53\x45"));${$byhmftjr}=intval(Tools::getValue("qt\x79"));if(!${$uulrmihbcu} OR${${"G\x4c\x4f\x42\x41L\x53"}["u\x6d\x6bt\x73\x6e\x77p"]}<1)${${"\x47\x4cO\x42\x41\x4c\x53"}["\x6b\x68vg\x79\x69\x76"]}=1;${${"GLO\x42\x41\x4c\x53"}["\x65\x72\x6bzo\x75\x73\x63\x62\x71"]}=Context::getContext()->shop->id;${${"\x47LOBALS"}["n\x79t\x76zva\x64\x6d"]}="\x53\x45\x4cECT\x20\x71ua\x6eti\x74y\x20F\x52\x4f\x4d `"._DB_PREFIX_."st\x6f\x63\x6b\x5fa\x76\x61ilabl\x65`\x20\x57H\x45\x52\x45 i\x64_\x70ro\x64u\x63\x74\x3d".${${"G\x4c\x4f\x42ALS"}["r\x6b\x6f\x75hb\x6c\x71i"]}." AND\x20\x60i\x64_shop` \x3d".${${"G\x4cOBA\x4c\x53"}["\x65r\x6bz\x6f\x75\x73c\x62q"]};if(${${"GL\x4f\x42\x41L\x53"}["\x69\x6cm\x77\x72\x77h\x69"]}>0)${$ecojfs}="SE\x4cE\x43T qu\x61n\x74i\x74\x79 \x46\x52OM \x60"._DB_PREFIX_."st\x6f\x63\x6b_\x61va\x69\x6cab\x6ce` \x20\x57HE\x52E `\x69d_\x70\x72o\x64\x75ct`\x20=".${${"G\x4c\x4f\x42\x41\x4c\x53"}["\x6cj\x6d\x79\x72\x6b\x70"]}."\x20\x41ND \x60i\x64\x5fp\x72oduc\x74_\x61\x74tr\x69\x62\x75t\x65\x60\x20=".${${"\x47L\x4f\x42\x41\x4cS"}["\x71\x74na\x75nj"]}." \x41\x4eD `id_\x73h\x6f\x70\x60\x20\x3d".${${"G\x4c\x4f\x42\x41\x4c\x53"}["er\x6b\x7a\x6f\x75\x73\x63\x62\x71"]};${${"GL\x4f\x42\x41\x4cS"}["y\x77\x65\x6fd\x64\x61\x79"]}=intval(Db::getInstance()->getValue(${${"G\x4c\x4f\x42\x41\x4c\x53"}["ny\x74\x76\x7a\x76\x61\x64m"]}));if(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x69e\x71\x75c\x74s\x79"]}<${$rgzkpb}){${"\x47\x4c\x4f\x42\x41LS"}["\x6f\x68t\x78\x71\x63\x61\x6ct\x63"]="re\x64\x69r\x65\x63\x74\x5fu\x72l";${"G\x4c\x4f\x42A\x4c\x53"}["ow\x7a\x61k\x69\x6co"]="a\x67\x69\x6c\x65_\x70\x69\x64";${${"\x47\x4cO\x42\x41\x4cS"}["\x6fh\x74\x78q\x63a\x6ctc"]}=Context::getContext()->link->getModuleLink("\x61\x67il\x65\x70\x72e\x70\x61\x69\x64c\x72e\x64i\x74","o\x75\x74o\x66\x73\x74ock",array("\x69\x64_pro\x64\x75\x63\x74"=>${${"G\x4cOBAL\x53"}["owz\x61\x6bi\x6c\x6f"]}),true);Tools::redirect(${${"G\x4c\x4f\x42\x41L\x53"}["ciq\x78gh\x64\x79"]});}${${"\x47\x4c\x4f\x42\x41LS"}["\x72\x77\x6ao\x79\x7a\x66a\x6b"]}=Context::getContext()->customer->isLogged();if(${${"\x47LO\x42\x41\x4cS"}["mv\x78pag\x68\x76n"]} AND${${"GLO\x42AL\x53"}["\x6b\x65p\x65\x65\x68\x65n\x62o\x73\x64"]}){$kdjywtk="a\x67\x69\x6ce_p\x61\x69d";$bjpbmhdy="\x71\x74\x79";$kweqrryz="\x70ri\x63e";if(!${${"\x47L\x4fB\x41\x4c\x53"}["\x6b\x67x\x6b\x64\x66\x72\x76\x67q"]}){Tools::redirect("\x69\x6e\x64e\x78\x2e\x70\x68p?c\x6f\x6e\x74\x72\x6f\x6c\x6cer\x3d\x61\x75t\x68e\x6e\x74\x69\x63\x61tion");}$jfujse="t\x6fke\x6e\x73";${${"\x47\x4c\x4f\x42ALS"}["\x75n\x73\x61\x6f\x68\x63\x70"]}=agileprepaidcredit::GetTokenBalance($cookie->id_customer);$golbunx="\x69\x64\x5f\x70\x72\x6f\x64\x75\x63\x74\x5f\x64o\x77\x6e\x6co\x61\x64";$gmjlxrpyen="p\x72od\x75\x63\x74D\x6f\x77nlo\x61\x64";${${"G\x4c\x4f\x42\x41\x4c\x53"}["\x69\x78\x78\x65\x75\x73\x68\x79"]}=$prod->getPrice(true,${$kdjywtk},6)*${$bjpbmhdy};${"GL\x4fB\x41\x4cS"}["\x72\x6ci\x69\x68g\x76"]="\x69\x73p\x61id";${${"\x47LO\x42AL\x53"}["\x6a\x69\x78\x72\x6d\x62w\x69\x6av"]}=AgilePrepaidCredit::ConvertPrice2Tokens($cookie->id_currency,${$kweqrryz});if(floatval(${${"G\x4c\x4f\x42\x41L\x53"}["\x75ns\x61\x6f\x68c\x70"]})<floatval(${$jfujse})){$nmxxplhzode="p\x61\x79\x5f\x6do\x64e";if(${$nmxxplhzode}==AgilePrepaidCredit::PAY_MODE_COMBINATION)return;Tools::redirect("\x69\x6ede\x78.\x70\x68\x70?i\x64_cat\x65\x67o\x72\x79=".Configuration::getGlobalValue("AGI\x4cE\x5f\x50C\x52\x45D\x49T\x5fC\x49\x44")."&\x63on\x74r\x6fll\x65r\x3dc\x61t\x65gor\x79");}if(!${${"G\x4cO\x42A\x4c\x53"}["rli\x69hg\x76"]} OR${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x62\x76\x75s\x77\x65"]}){${"G\x4c\x4fB\x41\x4c\x53"}["m\x79om\x69\x62\x73\x79"]="\x61\x67i\x6ce\x5fp\x69\x64";${"G\x4cO\x42\x41LS"}["\x72\x68x\x6c\x66\x64\x68\x68\x6a"]="a\x67\x69\x6c\x65_p\x61\x69\x64";${${"\x47\x4cO\x42\x41L\x53"}["\x76\x6d\x76\x63\x6b\x71p"]}[]=array("id\x5f\x70\x72\x6f\x64\x75\x63t"=>${${"\x47L\x4fB\x41LS"}["m\x79\x6f\x6d\x69\x62s\x79"]},"i\x64\x5fp\x72\x6fd\x75\x63\x74_attrib\x75\x74\x65"=>${${"\x47L\x4fB\x41\x4c\x53"}["\x72\x68\x78\x6cf\x64\x68h\x6a"]},"\x71u\x61\x6etit\x79"=>${${"\x47\x4c\x4f\x42\x41L\x53"}["umkt\x73\x6e\x77\x70"]});if(!self::one_click_checkout(${${"\x47L\x4f\x42ALS"}["\x76\x6d\x76\x63\x6b\x71\x70"]}))Tools::redirect("i\x6e\x64ex.ph\x70?\x69d\x5f\x63at\x65g\x6fr\x79\x3d".Configuration::getGlobalValue("AG\x49LE\x5f\x50\x43RED\x49T_C\x49\x44")."\x26c\x6f\x6e\x74ro\x6c\x6c\x65\x72\x3dcategor\x79");}${$gmjlxrpyen}=new ProductDownload();if(${$golbunx}=$productDownload->getIdFromIdProduct($prod->id)){$yndvoygwrvx="p\x72\x6f\x64\x75c\x74Do\x77\x6e\x6co\x61d";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["w\x77\x6a\x79\x79e"]="\x70\x72\x6f\x64u\x63\x74\x44\x6fw\x6e\x6c\x6fa\x64";${${"G\x4cOB\x41LS"}["\x77\x77\x6a\x79y\x65"]}=new ProductDownload(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["x\x79\x76o\x6d\x66"]});if(Validate::isLoadedObject(${$yndvoygwrvx})AND!empty($productDownload->display_filename)){include_once(_PS_ROOT_DIR_."/\x6d\x6fd\x75\x6ce\x73/a\x67\x69\x6c\x65\x70r\x65\x70\x61i\x64\x63\x72e\x64it/\x64o\x77nlo\x61d\x2ep\x68p");}}Tools::redirect("in\x64\x65x\x2eph\x70?con\x74r\x6f\x6c\x6cer\x3d\x68i\x73\x74\x6f\x72y");}}private static function get_requred_fields_15x($id_prod,$attr_id,$type,$index){$rvuedjlncu="at\x74\x72_\x69d";$kihzup="\x69\x6e\x64\x65\x78";$kttldwte="\x63\x75\x73t\x6f\x6di\x7aa\x74\x69o\x6e";$bxtbdmoijr="\x69\x64\x5fpr\x6f\x64";global$cart;${${"\x47\x4c\x4fBA\x4c\x53"}["\x6e\x79\x74\x76\x7a\x76\x61dm"]}="\n\t\t\t\t\x53\x45\x4cECT\x20cu.\x60\x69\x64_\x63us\x74omi\x7a\x61t\x69\x6f\x6e\x60,\x20cd\x2e\x60\x69\x6e\x64ex`, \x63\x64.`\x76a\x6cue`\x20A\x53 v\x61l\x75\x65,\x20cd.`\x74\x79\x70e\x60\x20\x46\x52\x4fM\x20\x60"._DB_PREFIX_."cus\x74\x6fmiz\x61\x74\x69on`\x20cu\n\t\t\t\t\x4cE\x46\x54 JO\x49\x4e\x20`"._DB_PREFIX_."c\x75\x73\x74omize\x64\x5f\x64a\x74a\x60 \x63d\n\t\t\t\t\x4fN\x20\x63u\x2e`id\x5f\x63ust\x6fm\x69zat\x69o\x6e`\x20=\x20\x63d\x2e\x60\x69d\x5fcu\x73\x74\x6fm\x69z\x61ti\x6f\x6e\x60\n\t\t\t\tWHE\x52E \x63\x75.\x69d\x5f\x63\x61r\x74 \x3d ".(int)$cart->id."\n\t\t\t\tAND\x20\x63\x75\x2e\x69\x64_\x70rodu\x63\x74\x20\x3d\x20".(int)${$bxtbdmoijr}."\n\t\t\t\tA\x4e\x44\x20cu\x2eid_\x70ro\x64u\x63\x74_a\x74t\x72ibute \x3d\x20".(int)${$rvuedjlncu}."\n\t\t\t\tAN\x44 \x63\x64\x2et\x79pe \x3d\x20".(int)${${"G\x4c\x4fBAL\x53"}["\x61\x6e\x76xqn\x63\x6b"]}."\n\t\t\t\tAN\x44\x20\x63\x64.ind\x65\x78\x20\x3d\x20".(int)${$kihzup}."\n\t\t\t\t\x41\x4eD\x20i\x6e\x5f\x63ar\x74\x20= 0\n\t\t\t\t";${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x76\x73\x75\x6e\x72\x68"]}=Db::getInstance()->getRow(${${"GL\x4f\x42\x41\x4cS"}["\x6eyt\x76z\x76\x61d\x6d"]});if(!isset(${${"G\x4c\x4f\x42\x41\x4c\x53"}["vs\x75\x6er\x68"]}))return"";if(!isset(${$kttldwte}["v\x61lu\x65"]))return"";return${${"GL\x4f\x42A\x4c\x53"}["vsu\x6er\x68"]}["v\x61l\x75e"];}private static function any_empty_required_text_customization_field($prod,$attrid){global$cookie;${"\x47\x4c\x4f\x42\x41\x4c\x53"}["kx\x67\x66\x68\x74\x73\x62b\x6c"]="\x61u\x74\x68o\x72\x69\x7a\x65d\x54\x65\x78tF\x69\x65l\x64\x73";$teqnufrjrc="\x66ie\x6c\x64\x49d\x73";${"\x47\x4cO\x42A\x4cS"}["\x74\x78\x78\x70\x76\x67\x6b"]="a\x75t\x68o\x72\x69ze\x64\x54ex\x74F\x69\x65\x6cds";if(!${${"\x47\x4c\x4fBA\x4cS"}["\x76\x78\x78\x71\x73\x77\x6a"]}=$prod->getCustomizationFieldIds())return false;${"G\x4cO\x42A\x4c\x53"}["tr\x6a\x62\x65\x73u\x66\x64\x6a\x6b\x6a"]="\x69n\x64e\x78\x65\x73";$ythwqgxy="fie\x6cdN\x61\x6d\x65";${${"\x47\x4c\x4fB\x41L\x53"}["\x6bx\x67\x66h\x74s\x62\x62\x6c"]}=array();foreach(${$teqnufrjrc} AS${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x67\x67\x62\x6c\x76\x6b\x6a\x72mb"]}){$etybzrkkcw="f\x69e\x6c\x64I\x64";$swoeexrqhb="\x61u\x74\x68\x6fr\x69\x7ae\x64\x54e\x78\x74F\x69eld\x73";if(${${"\x47\x4c\x4fB\x41L\x53"}["\x67\x67\x62\x6c\x76\x6b\x6a\x72\x6d\x62"]}["\x74y\x70e"]==_CUSTOMIZE_TEXTFIELD_)${$swoeexrqhb}[(int)(${${"\x47L\x4f\x42A\x4c\x53"}["\x67g\x62l\x76\x6b\x6a\x72m\x62"]}["\x69d\x5f\x63u\x73\x74o\x6diza\x74\x69\x6f\x6e_fie\x6c\x64"])]="t\x65\x78t\x46\x69eld".(int)(${$etybzrkkcw}["\x69d_\x63ust\x6fm\x69z\x61\x74io\x6e_\x66ield"]);}${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x74r\x6a\x62\x65\x73u\x66\x64j\x6bj"]}=array_flip(${${"\x47L\x4f\x42\x41L\x53"}["\x74xx\x70vgk"]});foreach(${${"\x47\x4cO\x42A\x4c\x53"}["z\x66v\x69pvfar"]} as${$ythwqgxy}){${"\x47\x4cO\x42\x41\x4cS"}["\x73\x64\x69\x72\x78x\x6e\x79"]="i\x6e\x64\x65\x78\x65\x73";$olyvldnbl="f\x69\x65\x6c\x64N\x61m\x65";$krsvdh="\x61t\x74ri\x64";${${"G\x4cO\x42ALS"}["\x66\x6b\x65\x65\x6e\x69\x79"]}=${${"GLO\x42AL\x53"}["\x73\x64\x69\x72\x78x\x6e\x79"]}[${$olyvldnbl}];${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x67j\x66\x6b\x69\x76\x68\x72"]="\x76\x61\x6c\x75\x65";${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x67\x6a\x66k\x69vh\x72"]}=self::get_requred_fields_15x($prod->id,${$krsvdh},_CUSTOMIZE_TEXTFIELD_,${${"\x47L\x4f\x42\x41\x4c\x53"}["\x66\x6bee\x6e\x69\x79"]});if(empty(${${"\x47\x4cO\x42\x41\x4c\x53"}["\x6f\x63\x6e\x69\x62k\x79\x77\x68\x70\x6f"]}))return true;}return false;}private static function any_empty_required_file_customization_field($prod,$attrid){global$cookie;$jxtvztb="au\x74\x68\x6friz\x65\x64Fi\x6ce\x46ie\x6c\x64s";if(!${${"\x47\x4cO\x42\x41\x4cS"}["\x76\x78\x78qs\x77\x6a"]}=$prod->getCustomizationFieldIds())return false;${${"\x47L\x4fBAL\x53"}["pvdjddu"]}=array();foreach(${${"\x47\x4c\x4fBA\x4cS"}["\x76\x78\x78\x71\x73w\x6a"]} AS${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x67\x67\x62\x6c\x76k\x6arm\x62"]}){$mkazyx="\x61\x75\x74ho\x72\x69\x7aed\x46\x69\x6ce\x46\x69el\x64\x73";$rorrjsnhbvpi="\x66\x69\x65ldI\x64";$biagyo="\x66\x69\x65\x6c\x64\x49\x64";${"\x47L\x4fBA\x4c\x53"}["\x70\x72\x74yx\x63e\x68"]="\x66\x69\x65\x6cd\x49d";if(${${"G\x4c\x4f\x42\x41\x4cS"}["p\x72\x74y\x78ce\x68"]}["\x74\x79p\x65"]==_CUSTOMIZE_FILE_)${$mkazyx}[(int)(${$biagyo}["\x69\x64\x5fcustomi\x7a\x61\x74i\x6fn\x5f\x66\x69e\x6cd"])]="f\x69\x6c\x65".(int)(${$rorrjsnhbvpi}["i\x64\x5fcus\x74o\x6d\x69\x7aation_\x66\x69eld"]);}${${"\x47LO\x42\x41L\x53"}["\x73\x78\x68\x68\x62\x79\x70\x71"]}=array_flip(${$jxtvztb});foreach(${${"G\x4cO\x42\x41\x4c\x53"}["pvdj\x64\x64\x75"]} as${${"\x47\x4c\x4fBAL\x53"}["\x72\x69chm\x66\x71v\x6d\x71\x62"]}){${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x74\x76b\x76\x74b\x78e\x73w"]="\x76ar\x4e\x61\x6de";$msztnplumgo="\x76\x61\x6cu\x65";${"\x47\x4c\x4fB\x41\x4c\x53"}["j\x63d\x63\x79\x68\x6a\x67"]="\x61\x74t\x72\x69\x64";${"\x47L\x4fB\x41\x4cS"}["\x67\x66\x6c\x65h\x79f\x61e"]="i\x6e\x64\x65\x78\x65s";${${"G\x4c\x4f\x42A\x4c\x53"}["\x66k\x65\x65\x6ei\x79"]}=${${"G\x4cO\x42\x41\x4cS"}["\x67f\x6ce\x68\x79\x66\x61\x65"]}[${${"\x47L\x4fB\x41\x4c\x53"}["\x72\x69\x63\x68m\x66\x71\x76m\x71b"]}];${${"GL\x4fBAL\x53"}["\x74vbv\x74b\x78\x65\x73\x77"]}="\x70ic\x74\x75\x72es_".(int)($prod->id)."_".(int)(${${"\x47\x4cO\x42\x41\x4c\x53"}["\x66k\x65\x65\x6ei\x79"]});${$msztnplumgo}=self::get_requred_fields_15x($prod->id,${${"\x47L\x4f\x42AL\x53"}["\x6a\x63d\x63\x79hj\x67"]},_CUSTOMIZE_FILE_,${${"G\x4cO\x42\x41L\x53"}["\x66ke\x65n\x69\x79"]});if(empty(${${"G\x4c\x4f\x42A\x4c\x53"}["o\x63\x6e\x69\x62k\x79\x77h\x70o"]}))return true;}return false;}public static function one_click_checkout($items){$rfdlipyijvi="sq\x6c";$crrklehyto="\x69\x64\x5f\x61d\x64r\x65ss";global$cookie;$optdfhqxoi="n\x65\x77\x63\x61\x72\x74";${$crrklehyto}=Address::getFirstCustomerAddressId($cookie->id_customer);${$optdfhqxoi}=new Cart();$newcart->id_customer=$cookie->id_customer;$newcart->id_lang=$cookie->id_lang;${"GLOBA\x4cS"}["t\x69\x68\x63\x69\x6b\x67\x73\x6c"]="\x69\x64_a\x64\x64\x72\x65\x73\x73";$newcart->id_carrier=0;$newcart->id_address_delivery=${${"\x47LO\x42\x41\x4c\x53"}["\x74i\x68\x63ikg\x73\x6c"]};${"GL\x4f\x42\x41\x4cS"}["\x65h\x6b\x73\x78\x6a\x71c\x6f"]="\x70m\x6fd\x75\x6c\x65";$newcart->id_address_invoice=${${"\x47\x4cOBA\x4c\x53"}["\x6b\x69\x76he\x6cr"]};$newcart->id_currency=$cookie->id_currency;$bpwgfvq="\x74ok\x65\x6es";${"GL\x4f\x42\x41L\x53"}["\x72\x6d\x79po\x75\x68"]="\x63\x75\x73t\x6f\x6de\x72\x5f\x63\x61\x72t_\x69d";$newcart->id_guest=0;$newcart->recyclable=0;$kdqgxdxamjob="i\x74e\x6d";$newcart->gift=0;$newcart->gift_message="";$dgxnnayxaml="\x73q\x6c";$newcart->add();$vfustrearww="\x63\x61r\x74\x74\x6f\x74\x61\x6c";foreach(${${"\x47\x4cO\x42\x41\x4cS"}["\x65\x6c\x67\x67x\x78\x63"]} as${$kdqgxdxamjob}){${"\x47L\x4f\x42\x41\x4cS"}["t\x63l\x74\x76n\x6ddf"]="it\x65\x6d";${"G\x4c\x4fB\x41L\x53"}["\x63i\x69\x6ew\x62"]="\x69\x74\x65\x6d";${"G\x4c\x4fBA\x4c\x53"}["s\x76\x6ck\x67k\x6d"]="\x73\x71\x6c";${${"\x47\x4cOBA\x4c\x53"}["\x6e\x79t\x76zv\x61\x64m"]}="I\x4eS\x45\x52T\x20\x49NT\x4f\x20`"._DB_PREFIX_."\x63art_\x70\x72\x6f\x64uc\x74\x60 (id_\x63\x61\x72\x74,\x69d_p\x72o\x64uct,\x69d\x5fp\x72od\x75\x63t_\x61\x74\x74\x72\x69bute,quant\x69\x74\x79,\x64\x61t\x65_a\x64d) V\x41\x4cU\x45\x53\x20(".$newcart->id.",".${${"\x47L\x4fB\x41L\x53"}["\x63\x69i\x6e\x77\x62"]}["\x69\x64_prod\x75\x63\x74"].",".${${"\x47\x4c\x4f\x42AL\x53"}["\x77f\x72\x66ljcm"]}["\x69d\x5fp\x72o\x64uc\x74_\x61tt\x72\x69but\x65"].",".${${"G\x4c\x4f\x42\x41\x4c\x53"}["\x77f\x72f\x6c\x6ac\x6d"]}["\x71u\x61\x6e\x74\x69t\x79"].",\x27".date("Y-\x6d-\x64 \x48:i:s")."')";$qxyuuypy="\x69t\x65\x6d";Db::getInstance()->Execute(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x73\x76lkg\x6b\x6d"]});self::save_customization_data($newcart->id,${$qxyuuypy}["id_\x70rodu\x63\x74"],${${"\x47L\x4f\x42\x41LS"}["w\x66\x72\x66l\x6a\x63\x6d"]}["i\x64_\x70r\x6f\x64\x75\x63t_att\x72ibu\x74e"],${${"\x47\x4cO\x42A\x4cS"}["t\x63\x6c\x74\x76\x6e\x6d\x64\x66"]}["qua\x6et\x69\x74y"],${${"\x47\x4cOBA\x4c\x53"}["\x6b\x69v\x68\x65\x6c\x72"]});}${$vfustrearww}=$newcart->getOrderTotal();${${"\x47\x4c\x4fB\x41\x4cS"}["u\x6e\x73\x61\x6f\x68\x63p"]}=agileprepaidcredit::GetTokenBalance($cookie->id_customer);${${"\x47\x4cO\x42\x41L\x53"}["\x6a\x69\x78\x72mb\x77i\x6av"]}=AgilePrepaidCredit::ConvertPrice2Tokens($cookie->id_currency,${${"\x47\x4cO\x42\x41LS"}["\x75\x68f\x68tm\x73\x75pa\x65"]});${"\x47\x4cO\x42\x41\x4cS"}["\x63\x67y\x78\x6e\x6a\x6e\x67\x6c\x72"]="cus\x74\x6fme\x72_\x63a\x72\x74\x5fi\x64";$wgjiibyffn="\x63\x61\x72\x74";if(${${"\x47\x4cO\x42A\x4cS"}["unsa\x6fh\x63\x70"]}<${$bpwgfvq}){$newcart->delete();return false;}global$cart;${${"\x47\x4c\x4fB\x41\x4cS"}["\x72\x6d\x79po\x75h"]}=$cart->id;${${"GLO\x42\x41L\x53"}["eh\x6bs\x78\x6aqc\x6f"]}=new AgilePrepaidCredit();$pmodule->validateOrder($newcart->id,intval(Configuration::getGlobalValue("AGIL\x45\x5fP\x43\x52E\x44I\x54\x5f\x57\x41ITI\x4eG\x5f\x53\x54\x41T\x45")),$newcart->getOrderTotal(),NULL,NULL,array(),NULL,false);${$wgjiibyffn}=new cart(${${"G\x4c\x4f\x42\x41\x4c\x53"}["c\x67y\x78n\x6an\x67\x6c\x72"]});${$rfdlipyijvi}="\x49\x4e\x53E\x52\x54\x20IN\x54O\x20`"._DB_PREFIX_."\x6f\x72d\x65r_t\x6fk\x65n\x6do\x64\x65\x60 (\x69\x64_ord\x65r,\x20use_\x74\x6f\x6ben) \x56\x41\x4c\x55\x45S (".$pmodule->currentOrder.",\x31)";Db::getInstance()->Execute(${$dgxnnayxaml});self::update_order_state($pmodule->currentOrder,Configuration::getGlobalValue("\x50\x53\x5f\x4fS_PAYM\x45\x4e\x54"));return$pmodule->currentOrder;}private static function save_customization_data($id_cart,$id_product,$id_product_attribute,$quantity,$id_address){$dypspaj="\x73\x71l";${"GL\x4fB\x41\x4c\x53"}["x\x63a\x72\x72\x6d\x70\x72p"]="\x66\x69\x72st";global$cookie;${"\x47L\x4fBA\x4c\x53"}["\x65\x6cy\x6a\x68\x63l\x74f\x62o\x61"]="\x70ro\x64";${"G\x4c\x4f\x42A\x4c\x53"}["\x78t\x6c\x6c\x63\x73\x6a\x79\x70g"]="i\x64\x5fp\x72\x6fd\x75\x63\x74";${${"\x47\x4c\x4fB\x41\x4c\x53"}["n\x79\x74\x76\x7av\x61\x64\x6d"]}="I\x4e\x53E\x52\x54 \x49\x4eTO\x20`"._DB_PREFIX_."cu\x73\x74om\x69\x7a\x61\x74\x69o\x6e`\x20(\x69d\x5f\x63a\x72\x74,\x20\x69\x64_ad\x64\x72ess\x5fdeliver\x79,\x20\x69d\x5fpr\x6fd\x75\x63t_a\x74\x74r\x69but\x65, \x69\x64_product, \x71\x75anti\x74\x79, \x69\x6e_c\x61r\x74)\n\t\t\tV\x41L\x55\x45\x53(".(int)${${"\x47\x4c\x4fB\x41LS"}["i\x69\x63\x64\x72\x62tj"]}.",".(int)${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x6b\x69\x76\x68\x65l\x72"]}.",\x20".(int)${${"\x47\x4c\x4f\x42ALS"}["m\x64\x77\x67\x63\x69kb"]}.", ".(int)${${"\x47\x4cO\x42AL\x53"}["\x71\x79\x62k\x76w\x6f\x6d\x69\x6e"]}.", ".(int)${${"\x47\x4c\x4fB\x41L\x53"}["\x77\x70l\x77\x78r\x71\x70"]}.",1)";${"G\x4cOB\x41L\x53"}["\x71\x68\x73\x62\x6eo\x6f\x64"]="f\x69\x72\x73\x74";Db::getInstance(_PS_USE_SQL_SLAVE_)->Execute(${$dypspaj});${${"G\x4c\x4f\x42\x41\x4cS"}["n\x68qc\x79w\x64"]}=Db::getInstance(_PS_USE_SQL_SLAVE_)->Insert_ID();${"G\x4c\x4fBA\x4c\x53"}["\x6e\x6c\x67u\x67\x68v\x6b"]="\x66\x69\x65\x6cd\x49ds";${${"\x47\x4c\x4fBAL\x53"}["\x78\x63a\x72\x72mp\x72\x70"]}=true;${${"\x47LO\x42\x41L\x53"}["\x71\x6fo\x72p\x70\x69y\x6ev\x63\x79"]}="\x49N\x53\x45R\x54\x20\x49N\x54O\x20"._DB_PREFIX_."\x63\x75\x73\x74omized\x5fda\x74a (`i\x64\x5f\x63u\x73t\x6fmiz\x61ti\x6fn\x60, \x60\x74\x79pe\x60,\x20\x60\x69\x6ed\x65\x78`, `va\x6c\x75\x65`)\x20V\x41\x4c\x55\x45\x53 ";${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x65ly\x6a\x68\x63\x6c\x74\x66\x62\x6fa"]}=new Product(${${"\x47\x4c\x4f\x42\x41L\x53"}["\x78\x74\x6clcs\x6ay\x70g"]});if(${${"\x47\x4c\x4fBAL\x53"}["\x6elg\x75ghv\x6b"]}=$prod->getCustomizationFieldIds()){$smkpaimuiv="\x61u\x74\x68or\x69ze\x64\x54\x65\x78\x74\x46\x69\x65\x6c\x64s";$kdxmbndug="\x61u\x74h\x6f\x72i\x7a\x65\x64\x54\x65\x78\x74F\x69\x65\x6c\x64s";$itnjirmrrf="i\x6ed\x65\x78\x65\x73";${"\x47\x4c\x4f\x42A\x4c\x53"}["\x6c\x67etj\x68r"]="a\x75\x74h\x6f\x72\x69\x7a\x65\x64Tex\x74Fi\x65l\x64s";$nuyggpbne="\x66ie\x6cdI\x64s";$vddmwwqci="\x61\x75\x74\x68\x6fri\x7a\x65\x64\x46\x69\x6c\x65F\x69\x65\x6c\x64s";${"G\x4c\x4fBA\x4cS"}["\x73\x7a\x61\x6cq\x68\x6b\x65\x62\x75n\x61"]="\x66\x69\x65\x6c\x64I\x64";${"G\x4cO\x42\x41LS"}["\x77\x69e\x75\x6fh\x76"]="f\x69e\x6cdId\x73";$lisqqle="a\x75\x74\x68o\x72i\x7a\x65\x64Fi\x6ce\x46\x69\x65\x6c\x64\x73";${$lisqqle}=array();$jjelgwht="\x66ie\x6c\x64N\x61\x6d\x65";foreach(${${"\x47\x4cO\x42\x41\x4cS"}["\x77\x69\x65\x75\x6fh\x76"]} AS${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x73\x7a\x61\x6c\x71h\x6beb\x75\x6e\x61"]}){$jaumfvozm="\x66\x69\x65l\x64\x49\x64";if(${${"\x47L\x4fBA\x4c\x53"}["g\x67\x62l\x76\x6bj\x72m\x62"]}["\x74ype"]==_CUSTOMIZE_FILE_)${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x70\x76djd\x64\x75"]}[(int)(${${"\x47\x4c\x4f\x42\x41L\x53"}["\x67\x67\x62\x6c\x76\x6bj\x72\x6d\x62"]}["\x69d_cu\x73\x74omi\x7a\x61\x74i\x6f\x6e\x5f\x66iel\x64"])]="fi\x6c\x65".(int)(${$jaumfvozm}["i\x64_\x63\x75\x73\x74\x6f\x6diz\x61ti\x6fn\x5f\x66\x69el\x64"]);}${${"G\x4c\x4f\x42\x41LS"}["s\x78h\x68\x62y\x70\x71"]}=array_flip(${$vddmwwqci});foreach(${${"\x47\x4cO\x42\x41\x4cS"}["\x70\x76\x64\x6a\x64\x64\x75"]} as${${"\x47L\x4f\x42\x41\x4c\x53"}["\x72\x69c\x68m\x66\x71\x76mq\x62"]}){$fuhjyyt="\x76a\x6c\x75\x65";$ytqpbweeran="\x69d\x5f\x70\x72od\x75\x63\x74";$xmoeah="\x76\x61\x72\x4ea\x6de";$ubtfndzghb="i\x6ed\x65\x78e\x73";$zgcnfnhvqn="id_\x70rod\x75\x63\x74_a\x74\x74\x72\x69b\x75\x74\x65";${${"\x47\x4cO\x42ALS"}["\x66\x6b\x65eni\x79"]}=${$ubtfndzghb}[${${"G\x4cO\x42\x41LS"}["r\x69\x63\x68m\x66\x71v\x6d\x71\x62"]}];${"\x47L\x4f\x42A\x4cS"}["r\x6f\x66\x63\x61\x6e\x7a\x66"]="\x73\x71l\x5f\x63u\x73\x74\x6f\x6d_d\x61\x74\x61";${$xmoeah}="\x70\x69\x63t\x75re\x73\x5f".(int)($prod->id)."_".(int)(${${"GL\x4f\x42\x41L\x53"}["fke\x65n\x69\x79"]});${$fuhjyyt}=self::get_requred_fields_15x(${$ytqpbweeran},${$zgcnfnhvqn},_CUSTOMIZE_FILE_,${${"\x47\x4cO\x42\x41L\x53"}["\x66k\x65e\x6e\x69y"]});if(!${${"\x47\x4c\x4f\x42A\x4cS"}["\x6c\x68t\x6f\x77\x75xa\x6a"]})${${"\x47\x4cO\x42AL\x53"}["\x71\x6fo\x72\x70pi\x79\x6e\x76\x63\x79"]}.=",";else${${"GLO\x42\x41\x4c\x53"}["\x6ch\x74\x6fwu\x78\x61\x6a"]}=false;${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x72o\x66c\x61n\x7a\x66"]}.="(".(int)${${"G\x4c\x4f\x42\x41LS"}["\x6e\x68\x71c\x79wd"]}.",\x20"._CUSTOMIZE_FILE_.",\x20".(int)${${"G\x4cO\x42\x41\x4c\x53"}["\x66\x6b\x65\x65\x6e\x69\x79"]}.",\x20\x27".pSQL(${${"\x47\x4cO\x42\x41\x4c\x53"}["o\x63\x6e\x69\x62\x6b\x79wh\x70o"]})."')";}${$smkpaimuiv}=array();foreach(${$nuyggpbne} AS${${"\x47\x4c\x4f\x42A\x4c\x53"}["g\x67bl\x76\x6b\x6a\x72mb"]}){${"\x47\x4cOBA\x4c\x53"}["h\x79x\x68v\x71\x6d\x72"]="\x66\x69e\x6c\x64\x49\x64";if(${${"\x47LOBA\x4c\x53"}["g\x67b\x6c\x76kjrmb"]}["\x74y\x70\x65"]==_CUSTOMIZE_TEXTFIELD_)${${"\x47L\x4fB\x41L\x53"}["zf\x76\x69\x70\x76\x66\x61\x72"]}[(int)(${${"\x47\x4c\x4f\x42\x41LS"}["\x67\x67\x62l\x76kjr\x6d\x62"]}["id_\x63u\x73\x74o\x6d\x69\x7aa\x74\x69on\x5ffi\x65l\x64"])]="\x74ex\x74Fie\x6cd".(int)(${${"\x47\x4c\x4fB\x41L\x53"}["\x68\x79xhv\x71\x6d\x72"]}["i\x64_cus\x74\x6fm\x69\x7aa\x74io\x6e\x5ff\x69\x65\x6c\x64"]);}${$itnjirmrrf}=array_flip(${$kdxmbndug});foreach(${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x6c\x67e\x74\x6ah\x72"]} as${$jjelgwht}){${"\x47\x4c\x4fB\x41\x4c\x53"}["sq\x63\x76\x6f\x61\x6e\x63\x68"]="\x69\x6edex";$gjkwwicgxrh="\x69\x6e\x64\x65x";${"\x47\x4c\x4f\x42AL\x53"}["\x6e\x6c\x74\x64\x6cf\x68\x64"]="\x69\x64_pr\x6f\x64uc\x74";$mwbrjwcys="\x73\x71l_\x63u\x73\x74\x6f\x6d\x5fd\x61\x74\x61";$fpxwqoa="firs\x74";$vjwjjxyltohy="\x66i\x72\x73\x74";${"GL\x4f\x42\x41\x4c\x53"}["\x74\x63r\x71\x64\x63\x62r\x69\x6e"]="\x76\x61\x72\x4ea\x6de";${$gjkwwicgxrh}=${${"GL\x4f\x42\x41\x4cS"}["sxh\x68byp\x71"]}[${${"\x47L\x4f\x42\x41\x4c\x53"}["\x72\x69c\x68m\x66\x71\x76\x6d\x71b"]}];${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x74\x63\x72q\x64\x63b\x72\x69\x6e"]}="\x74\x65x\x74F\x69\x65\x6c\x64\x73\x5f".(int)($prod->id)."_".(int)(${${"G\x4cO\x42\x41LS"}["s\x71cvo\x61n\x63h"]});${${"\x47LO\x42\x41L\x53"}["\x6fcni\x62\x6by\x77\x68p\x6f"]}=self::get_requred_fields_15x(${${"\x47\x4c\x4fB\x41\x4c\x53"}["\x6e\x6c\x74d\x6cf\x68d"]},${${"\x47\x4c\x4f\x42\x41L\x53"}["m\x64w\x67ci\x6bb"]},_CUSTOMIZE_TEXTFIELD_,${${"\x47LO\x42\x41\x4c\x53"}["\x66\x6b\x65en\x69y"]});if(!${$vjwjjxyltohy})${$mwbrjwcys}.=",";else${$fpxwqoa}=false;${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["q\x6f\x6f\x72\x70\x70iyn\x76\x63\x79"]}.="(".(int)${${"\x47L\x4f\x42\x41\x4c\x53"}["\x6e\x68\x71c\x79\x77\x64"]}.", "._CUSTOMIZE_TEXTFIELD_.", ".(int)${${"\x47\x4c\x4fB\x41L\x53"}["\x66k\x65\x65\x6eiy"]}.", '".pSQL(${${"GLOB\x41L\x53"}["\x6fc\x6e\x69b\x6by\x77\x68\x70o"]})."\x27)";}}if(!${${"\x47L\x4f\x42\x41\x4cS"}["\x71\x68\x73b\x6e\x6f\x6f\x64"]})Db::getInstance(_PS_USE_SQL_SLAVE_)->Execute(${${"\x47LOB\x41\x4c\x53"}["\x71\x6fo\x72\x70\x70\x69\x79n\x76\x63\x79"]});}private static function update_order_state($id_order,$newOrderStatusId){$abekgzrrthf="h\x69\x73\x74\x6fry";$yctyoodssr="n\x65\x77\x4f\x72\x64e\x72S\x74a\x74\x75\x73\x49\x64";${"GL\x4f\x42\x41\x4cS"}["llk\x74\x71\x62s\x7a"]="\x63\x61\x72\x72i\x65\x72";${"G\x4c\x4f\x42A\x4c\x53"}["\x6eb\x72\x78\x6dv\x6d\x71\x65\x67"]="\x74\x65\x6d\x70\x6cat\x65Va\x72\x73";${$abekgzrrthf}=new OrderHistory();$history->id_order=(int)${${"GLO\x42\x41\x4cS"}["\x6dj\x63t\x7ad"]};$history->id_employee=0;$ipyhbnij="o\x72\x64\x65\x72";$history->changeIdOrderState((int)(${$yctyoodssr}),intval(${${"\x47\x4c\x4fBA\x4c\x53"}["\x6d\x6act\x7ad"]}));${$ipyhbnij}=new Order((int)${${"G\x4cO\x42\x41\x4cS"}["mjc\x74zd"]});${${"\x47\x4cOB\x41\x4cS"}["\x6c\x6ck\x74\x71\x62\x73\x7a"]}=new Carrier((int)($order->id_carrier),(int)($order->id_lang));${${"G\x4cO\x42\x41\x4c\x53"}["\x68\x64\x74\x6bvv\x6fk\x64"]}=array();${"\x47L\x4f\x42\x41\x4c\x53"}["d\x6c\x70xeb"]="\x74\x65\x6d\x70\x6c\x61\x74eV\x61\x72\x73";if($history->id_order_state==Configuration::getGlobalValue("PS_\x4fS\x5f\x53\x48I\x50P\x49\x4eG")AND$order->shipping_number)${${"G\x4cO\x42\x41\x4cS"}["\x68dtk\x76\x76\x6f\x6b\x64"]}=array("{\x66\x6fl\x6co\x77u\x70}"=>str_replace("\x40",$order->shipping_number,$carrier->url));elseif($history->id_order_state==Configuration::getGlobalValue("PS\x5f\x4f\x53\x5fC\x48\x45\x51\x55E"))${${"\x47L\x4fBA\x4c\x53"}["\x64\x6c\x70\x78e\x62"]}=array("{c\x68eque_n\x61\x6d\x65}"=>(Configuration::getGlobalValue("CHEQ\x55\x45\x5f\x4eAM\x45")?Configuration::getGlobalValue("C\x48\x45QUE\x5fNA\x4d\x45"):""),"{ch\x65que\x5fa\x64\x64r\x65ss\x5f\x68\x74\x6d\x6c}"=>(Configuration::getGlobalValue("C\x48\x45\x51U\x45_\x41DDRESS")?nl2br(Configuration::getGlobalValue("CH\x45Q\x55E_\x41\x44D\x52E\x53\x53")):""));elseif($history->id_order_state==Configuration::getGlobalValue("\x50\x53\x5fOS\x5fB\x41N\x4b\x57IR\x45"))${${"G\x4cOBAL\x53"}["\x68\x64\x74\x6b\x76\x76\x6f\x6bd"]}=array("{\x62a\x6e\x6b\x77\x69\x72e\x5f\x6fwne\x72}"=>(Configuration::getGlobalValue("B\x41\x4e\x4b\x5fW\x49R\x45\x5f\x4f\x57\x4eER")?Configuration::getGlobalValue("B\x41NK\x5f\x57IR\x45_\x4f\x57\x4eE\x52"):""),"{\x62\x61\x6e\x6bwir\x65\x5fde\x74a\x69l\x73}"=>(Configuration::getGlobalValue("BANK\x5fW\x49\x52E_D\x45\x54A\x49L\x53")?nl2br(Configuration::getGlobalValue("BAN\x4b_\x57IR\x45_\x44\x45TAI\x4cS")):""),"{b\x61nkw\x69r\x65_\x61\x64\x64\x72\x65\x73s}"=>(Configuration::getGlobalValue("B\x41\x4e\x4b\x5fW\x49\x52\x45\x5f\x41\x44\x44RE\x53S")?nl2br(Configuration::getGlobalValue("\x42\x41\x4eK\x5fWI\x52E\x5fAD\x44\x52E\x53\x53")):""));$history->addWithemail(true,${${"G\x4c\x4f\x42A\x4cS"}["\x6e\x62\x72x\x6dvm\x71\x65\x67"]});}public static function is_token_payment_underway($id_cart){${"G\x4c\x4fB\x41\x4cS"}["\x78\x64\x71u\x70\x77y\x63"]="id\x5f\x63\x61r\x74";@session_start();${${"\x47LO\x42\x41L\x53"}["\x65q\x6c\x78\x6e\x66\x64h\x71\x68\x6f\x66"]}=self::get_session_key(${${"\x47\x4c\x4f\x42\x41L\x53"}["xd\x71\x75\x70\x77\x79\x63"]});return(isset($_SESSION[${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x65q\x6cx\x6ef\x64\x68qh\x6ff"]}])AND$_SESSION[${${"G\x4c\x4f\x42\x41L\x53"}["\x65ql\x78\x6e\x66d\x68q\x68o\x66"]}]==1);}public static function get_session_key($id_cart){${"G\x4c\x4fB\x41\x4c\x53"}["uc\x69\x77\x70\x73\x74\x72j\x61\x64"]="\x69d\x5fc\x61r\x74";return"\x53E\x53SIO\x4e_T\x4f\x4b\x45N\x5fP\x52O\x43ESSING\x5f\x4d\x41R\x4bE\x52_".intval(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x75ciwp\x73\x74r\x6aa\x64"]});}public static function set_token_payment_processing_marker($id_cart,$turn_on){${"\x47L\x4f\x42A\x4c\x53"}["\x71p\x6cb\x6f\x73\x69i"]="\x6b\x65\x79";${"\x47L\x4f\x42\x41\x4c\x53"}["\x79c\x70r\x61\x66\x6e"]="id\x5f\x63\x61\x72\x74";@session_start();${${"\x47\x4cO\x42\x41\x4c\x53"}["\x71p\x6cbo\x73i\x69"]}=self::get_session_key(${${"G\x4cO\x42ALS"}["ycp\x72af\x6e"]});if(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["e\x6b\x76\x6c\x75\x75\x6d"]})$_SESSION[${${"\x47L\x4f\x42\x41LS"}["\x65q\x6c\x78\x6e\x66d\x68\x71hof"]}]=1;else unset($_SESSION[${${"\x47\x4c\x4fB\x41\x4c\x53"}["\x65\x71\x6c\x78\x6e\x66\x64\x68\x71\x68\x6f\x66"]}]);}public static function replace_amount2pay($templateVars){${"\x47L\x4f\x42\x41\x4cS"}["fj\x6av\x72\x64\x77l"]="\x6fr\x64\x65r";${"G\x4c\x4f\x42\x41L\x53"}["\x74s\x66\x6b\x66\x61fi\x6fm\x77\x70"]="o\x72d\x65\x72";$tscmmsw="id\x5fo\x72d\x65r";$oyodsbgqmyj="\x74\x6fk\x65n\x73\x5f\x76\x61\x6c\x75\x65";$gwfmqcmpw="t\x6f\x74a\x6c\x5f\x70\x61\x69\x64";${"\x47\x4cO\x42\x41\x4cS"}["chwio\x6e\x79\x6fl"]="temp\x6c\x61t\x65\x56\x61\x72\x73";${"\x47L\x4f\x42\x41\x4c\x53"}["k\x76c\x74xt\x76\x73\x62"]="t\x6f\x74\x61\x6c\x5fpa\x69d";${"\x47\x4cO\x42\x41\x4c\x53"}["\x6b\x6d\x72t\x78\x64\x6a\x78l\x6b\x6c"]="\x74\x65\x6dp\x6c\x61te\x56\x61\x72s";${$tscmmsw}=AgileSellerManager::get_order_id_from_maildata(${${"\x47L\x4fB\x41\x4c\x53"}["\x68\x64\x74\x6b\x76\x76\x6f\x6b\x64"]});if(${${"GLOB\x41\x4c\x53"}["mjct\x7a\x64"]}<=0)return${${"\x47LO\x42A\x4cS"}["\x68\x64t\x6b\x76v\x6f\x6b\x64"]};${"\x47L\x4f\x42\x41\x4c\x53"}["\x75\x61\x70s\x66e"]="tem\x70l\x61\x74\x65\x56\x61\x72\x73";${"\x47\x4cOB\x41\x4c\x53"}["\x68\x64l\x72\x77\x78in\x75\x75\x63"]="\x74o\x74a\x6c\x5f\x70a\x69\x64";${${"\x47\x4c\x4fBA\x4c\x53"}["\x66jj\x76\x72dwl"]}=new Order(${${"\x47\x4c\x4f\x42ALS"}["\x6d\x6ac\x74\x7a\x64"]});${"GL\x4fBA\x4cS"}["vnd\x66\x75\x7ac\x67\x69\x65"]="i\x64\x5f\x6f\x72\x64\x65\x72";$rnzcqyibxbhd="\x74o\x74a\x6c\x5f\x70\x61\x69\x64";if(!Validate::isLoadedObject(${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x74sf\x6b\x66\x61\x66\x69omwp"]}))return${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x6b\x6d\x72\x74\x78\x64\x6a\x78l\x6b\x6c"]};${${"\x47\x4c\x4f\x42\x41L\x53"}["\x6ba\x78x\x62\x66g\x62\x73\x6a\x73"]}=AgilePrepaidCredit::tokens_used_in_cart($order->id_cart);if(${${"\x47\x4c\x4f\x42A\x4cS"}["\x6b\x61\x78\x78b\x66\x67\x62s\x6as"]}<=0)return${${"\x47L\x4f\x42\x41\x4c\x53"}["\x75\x61p\x73\x66\x65"]};${$oyodsbgqmyj}=AgilePrepaidCredit::ConvertTokens2Price(${${"\x47\x4c\x4fBALS"}["\x6b\x61\x78\x78\x62\x66\x67\x62\x73j\x73"]},$order->id_currency);${${"\x47\x4cOB\x41\x4c\x53"}["kvc\x74\x78t\x76\x73\x62"]}=floatval(Db::getInstance()->getValue("\x53ELE\x43T total\x5fp\x61id\x20F\x52O\x4d\x20"._DB_PREFIX_."\x6fr\x64\x65rs\x20\x57\x48\x45R\x45 id_o\x72\x64\x65r=".${${"\x47L\x4fBAL\x53"}["\x76n\x64\x66\x75\x7a\x63\x67\x69\x65"]}));${${"\x47LOB\x41LS"}["\x79\x62\x68s\x66\x75"]}=${${"\x47\x4c\x4f\x42\x41L\x53"}["\x79b\x68\x73fu"]}-${${"\x47L\x4f\x42\x41L\x53"}["\x78\x74b\x69\x75duh\x78\x6d"]};if(${$gwfmqcmpw}<=0)${${"\x47L\x4f\x42\x41\x4cS"}["h\x64\x6c\x72\x77\x78i\x6e\x75\x75\x63"]}=0;${${"G\x4cO\x42AL\x53"}["\x68\x64tk\x76\x76\x6fkd"]}["{\x74ota\x6c\x5fpa\x69\x64}"]=Tools::displayPrice(${$rnzcqyibxbhd},new Currency($order->id_currency));return${${"\x47L\x4f\x42\x41L\x53"}["\x63h\x77\x69\x6f\x6e\x79\x6f\x6c"]};}public static function isPaymentErrorCausedByTokens($templateVars){${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x71\x66\x76\x73\x76\x71\x77\x7a\x6e\x67\x61\x78"]="\x74o\x6ben\x73\x5f\x75\x73e\x64_\x69\x6e\x5f\x63\x61r\x74";${"G\x4c\x4fB\x41\x4c\x53"}["\x77\x65\x79sd\x64\x65ou\x6ft\x77"]="\x74\x65mp\x6c\x61\x74\x65\x56a\x72\x73";${${"GL\x4fB\x41LS"}["\x6dj\x63\x74\x7a\x64"]}=AgileSellerManager::get_order_id_from_maildata(${${"GL\x4f\x42AL\x53"}["\x77\x65\x79\x73d\x64\x65\x6fu\x6f\x74\x77"]});if(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["m\x6a\x63t\x7a\x64"]}<=0)return 0;${${"\x47LOB\x41\x4c\x53"}["\x6bz\x79biq"]}=new Order(${${"\x47\x4c\x4fB\x41\x4c\x53"}["\x6d\x6a\x63\x74z\x64"]});if(!Validate::isLoadedObject(${${"\x47\x4cO\x42\x41\x4c\x53"}["\x6b\x7a\x79\x62\x69q"]}))return 0;${${"\x47\x4c\x4fB\x41\x4c\x53"}["\x71f\x76s\x76\x71w\x7a\x6e\x67\x61x"]}=AgilePrepaidCredit::tokens_used_in_cart($order->id_cart);if(${${"\x47LO\x42\x41\x4c\x53"}["\x6b\x61\x78\x78\x62\x66\x67\x62\x73j\x73"]}>0){$oubxgfrmmydl="\x69\x64\x5f\x6f\x72d\x65r";return${$oubxgfrmmydl};}return 0;}public static function setStatusPaymentAccepted($id_order){$wrydhbbwysd="\x6f\x72\x64er\x5f\x73t\x61te";${$wrydhbbwysd}=new OrderState(_PS_OS_PAYMENT_);${"GLOB\x41\x4c\x53"}["\x73\x6f\x6b\x67fz\x6b\x76\x62"]="\x68\x69\x73\x74\x6fr\x79";$lvfumlrc="\x69\x64\x5f\x6fr\x64\x65\x72";${${"G\x4c\x4fB\x41\x4c\x53"}["so\x6b\x67f\x7a\x6b\x76\x62"]}=new OrderHistory();$history->id_order=${${"\x47\x4cO\x42\x41L\x53"}["\x6d\x6act\x7a\x64"]};$history->id_employee=0;$history->changeIdOrderState($order_state->id,${$lvfumlrc});$history->addWithemail(true);${${"GLO\x42\x41\x4cS"}["n\x79tv\x7a\x76\x61d\x6d"]}="D\x45\x4cE\x54\x45\x20\x46\x52O\x4d\x20"._DB_PREFIX_."o\x72d\x65r_hi\x73\x74\x6fr\x79\x20\x57HE\x52E \x69\x64_\x6frder=".(int)${${"\x47LOB\x41L\x53"}["\x6dj\x63tz\x64"]}." AN\x44\x20\x69\x64\x5f\x6fr\x64\x65r\x5fs\x74\x61te\x3d"._PS_OS_ERROR_;Db::getInstance()->Execute(${${"\x47\x4c\x4f\x42\x41LS"}["\x6eytv\x7a\x76\x61\x64\x6d"]});}public static function adjustOrderForTokens($id_order){${"\x47\x4c\x4f\x42ALS"}["\x63\x69\x6e\x6d\x72m\x67pe\x69\x6bi"]="ord\x65r";${"GL\x4f\x42A\x4c\x53"}["u\x72\x65\x6dvtppgng"]="t\x6f\x74a\x6c\x5f\x64\x69s\x63\x6f\x75nt\x73_\x74a\x78\x5finc\x6c";$ewxwgabwsu="\x74\x6f\x74\x61l\x5f\x70ai\x64_\x74ax\x5f\x69n\x63\x6c";${"\x47LO\x42\x41\x4c\x53"}["x\x62\x6egq\x6c\x76\x71u"]="\x6f\x72\x64\x65r";$hgibacpnto="\x69\x64\x5fo\x72\x64\x65\x72";if(intval(${${"G\x4c\x4f\x42AL\x53"}["\x6d\x6a\x63tz\x64"]})<=0)return;${${"\x47LOB\x41\x4c\x53"}["c\x69\x6e\x6d\x72\x6d\x67\x70\x65\x69ki"]}=new Order(${$hgibacpnto});if(!Validate::isLoadedObject(${${"G\x4c\x4fB\x41LS"}["\x78\x62\x6e\x67\x71\x6cv\x71u"]}))return;${"\x47\x4cOB\x41LS"}["x\x72q\x6f\x6a\x75\x71\x77\x6aie\x70"]="\x74\x6fk\x65\x6e\x73\x5f\x75s\x65\x64_\x69\x6e_\x63\x61\x72\x74";${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x78\x72qo\x6a\x75\x71w\x6a\x69\x65\x70"]}=AgilePrepaidCredit::tokens_used_in_cart($order->id_cart);${"\x47L\x4fBA\x4c\x53"}["\x74\x69\x75\x6a\x66rrc"]="\x74\x6f\x6b\x65ns\x5f\x76al\x75\x65";${${"G\x4c\x4f\x42\x41L\x53"}["\x78\x74\x62iudu\x68x\x6d"]}=AgilePrepaidCredit::ConvertTokens2Price(${${"\x47L\x4f\x42A\x4c\x53"}["\x6b\x61xx\x62f\x67bs\x6a\x73"]},$order->id_currency);if(${${"\x47L\x4f\x42\x41\x4c\x53"}["\x74\x69u\x6af\x72\x72c"]}<=0)return;${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["x\x70\x79\x62l\x6bj"]}=new Cart($order->id_cart);${${"GLOBA\x4c\x53"}["\x6b\x62\x62eb\x73\x67\x76\x67\x6b\x63\x73"]}=$theCart->getOrderTotal(true,Cart::ONLY_DISCOUNTS);${${"\x47\x4c\x4f\x42\x41\x4cS"}["t\x69of\x6b\x75s\x70\x74\x77k"]}=$theCart->getOrderTotal(false,Cart::ONLY_DISCOUNTS);$mfnkijqsegs="t\x6f\x74a\x6c_\x70\x61\x69\x64\x5f\x74\x61\x78_e\x78\x63\x6c";${"\x47\x4cO\x42\x41\x4c\x53"}["\x70y\x6c\x6c\x67\x63y\x78c\x6b\x74"]="\x74oke\x6e\x73_va\x6c\x75\x65";${$ewxwgabwsu}=$theCart->getOrderTotal(true,Cart::BOTH);${$mfnkijqsegs}=$theCart->getOrderTotal(false,Cart::BOTH);if(${${"\x47\x4c\x4f\x42AL\x53"}["\x75\x72\x65\x6dv\x74p\x70\x67\x6eg"]}>=${${"\x47L\x4fB\x41\x4cS"}["p\x79ll\x67c\x79x\x63\x6bt"]}){$gnskzkfggy="t\x6f\x6b\x65\x6e\x73\x5f\x76\x61\x6c\x75e";${"\x47\x4c\x4fBA\x4c\x53"}["\x72mcv\x75\x78nnq\x77m"]="\x74\x6f\x6b\x65\x6e\x73\x5f\x76\x61\x6cu\x65";${"\x47\x4c\x4f\x42A\x4c\x53"}["\x6dr\x62\x74fg\x71t\x78\x71"]="t\x6fta\x6c\x5fp\x61\x69d_\x74\x61\x78_\x69\x6ec\x6c";${${"\x47L\x4f\x42\x41L\x53"}["\x6b\x62\x62e\x62\x73\x67\x76\x67\x6b\x63s"]}-=${$gnskzkfggy};${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x74\x69o\x66\x6b\x75\x73ptwk"]}-=${${"G\x4cO\x42\x41L\x53"}["x\x74\x62\x69\x75duh\x78\x6d"]};$wmbboloypozr="t\x6fta\x6c\x5fp\x61\x69d\x5ft\x61x\x5f\x65\x78c\x6c";${${"\x47L\x4f\x42A\x4c\x53"}["\x6d\x72\x62\x74\x66g\x71\x74\x78\x71"]}+=${${"GL\x4fBA\x4cS"}["\x72\x6d\x63\x76\x75\x78n\x6e\x71w\x6d"]};${$wmbboloypozr}+=${${"\x47\x4c\x4fB\x41\x4c\x53"}["\x78\x74\x62iu\x64u\x68xm"]};$vkirfugspkqi="\x73\x71l";${$vkirfugspkqi}="UP\x44AT\x45\x20"._DB_PREFIX_."\x6f\x72de\x72\x73 \x53ET\x20to\x74al_dis\x63\x6f\x75n\x74s=$total_discounts_tax_incl, to\x74al_\x64\x69s\x63o\x75n\x74s\x5fta\x78_excl\x3d$total_discounts_tax_excl, \x74ota\x6c\x5f\x64is\x63oun\x74s_\x74ax_\x69n\x63l=$total_discounts_tax_incl\x20,to\x74\x61l_\x70\x61id_\x74\x61\x78\x5f\x65\x78\x63l\x3d$total_paid_tax_excl,t\x6ft\x61l_\x70a\x69\x64_\x74a\x78\x5finc\x6c\x3d$total_paid_tax_incl,t\x6f\x74al_pa\x69\x64=$total_paid_tax_incl  WHER\x45 \x69d_\x6fr\x64\x65\x72=".$order->id;Db::getInstance()->Execute(${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x6e\x79t\x76\x7avad\x6d"]});}if($order->current_state==_PS_OS_ERROR_){AgilePrepaidCredit::setStatusPaymentAccepted(${${"\x47L\x4f\x42A\x4cS"}["m\x6a\x63tzd"]});$ppwkhjjvr="p\x61\x79m\x65\x6e\x74m\x6f\x64ul\x65";${"G\x4c\x4f\x42\x41\x4c\x53"}["q\x6ek\x6f\x77\x69\x76\x6cnwl\x70"]="id_ord\x65\x72";${$ppwkhjjvr}=new AgilePrepaidCredit();$paymentmodule->sendOrderConfirmationEmail(${${"\x47\x4c\x4fBA\x4c\x53"}["q\x6e\x6b\x6fw\x69\x76\x6c\x6e\x77\x6cp"]});}}public static function checkOrderInvoicePayment($id_order){${"G\x4cO\x42ALS"}["\x78bw\x75\x79w\x76"]="\x69d_o\x72\x64e\x72";$xdnpcocpwvk="\x6fr\x64e\x72";$ydwkwym="s\x71l";${"G\x4c\x4f\x42\x41L\x53"}["w\x79yg\x74o\x71\x76\x77\x70\x67g"]="p\x61\x79\x70a\x6c\x50\x61y\x6de\x6e\x74";${"\x47L\x4fBA\x4cS"}["g\x6b\x63\x6arwwe"]="\x73q\x6c";${"GL\x4f\x42\x41L\x53"}["\x62\x74hevbp\x68r"]="\x69\x64\x5f\x6fr\x64\x65r";${"G\x4c\x4f\x42\x41\x4c\x53"}["\x6fol\x6d\x77\x63\x63\x6c\x64j"]="\x69\x64\x5fo\x72\x64\x65r_i\x6ev\x6f\x69\x63\x65";${"\x47\x4c\x4f\x42\x41LS"}["\x63\x63\x6flcqu"]="\x73q\x6c";${"\x47\x4cOB\x41L\x53"}["\x6a\x70\x64\x6f\x70y\x63\x6b\x67\x6d\x66"]="\x6fr\x64\x65\x72";${"G\x4cO\x42\x41L\x53"}["\x67ch\x78e\x6dw"]="\x69d_or\x64e\x72\x5f\x69\x6e\x76\x6f\x69\x63\x65";${"\x47LO\x42ALS"}["\x71\x72\x64etf\x74ws\x71"]="\x69\x64\x5f\x6fr\x64\x65\x72";$zilelvkgq="\x73q\x6c";${$xdnpcocpwvk}=new Order(${${"\x47L\x4fB\x41\x4c\x53"}["xb\x77\x75\x79\x77\x76"]});$tvkcmebgm="\x69d\x5fo\x72\x64er\x5f\x69n\x76o\x69ce";${"\x47\x4c\x4f\x42A\x4cS"}["xn\x66c\x76j\x79y\x6d\x62"]="\x73q\x6c";if(!Validate::isLoadedObject(${${"G\x4c\x4f\x42A\x4c\x53"}["\x6a\x70\x64op\x79\x63k\x67mf"]}))return;${${"\x47\x4c\x4f\x42AL\x53"}["\x6e\x79\x74\x76\x7a\x76\x61\x64m"]}="SELE\x43\x54\x20\x69\x64_\x6f\x72\x64\x65\x72\x5f\x69\x6e\x76\x6f\x69c\x65 \x46\x52\x4f\x4d\x20"._DB_PREFIX_."\x6frde\x72_\x69\x6evoice\x20WHERE\x20\x69d\x5f\x6f\x72de\x72=".(int)${${"\x47\x4c\x4f\x42\x41L\x53"}["qrd\x65tf\x74\x77\x73\x71"]};${"\x47\x4c\x4f\x42A\x4c\x53"}["ms\x79\x6a\x7a\x73p\x70fg"]="\x74\x6f\x6b\x65\x6e\x50\x61\x79m\x65n\x74";${${"\x47\x4c\x4fB\x41\x4c\x53"}["g\x63hx\x65m\x77"]}=(int)Db::getInstance()->getValue(${${"\x47\x4c\x4f\x42AL\x53"}["\x63\x63\x6fl\x63q\x75"]});if(${$tvkcmebgm}<=0)return;${${"G\x4c\x4fB\x41\x4cS"}["\x67\x6b\x63\x6ar\x77w\x65"]}="\x53E\x4c\x45\x43\x54 *\x20\x46\x52\x4f\x4d\x20 "._DB_PREFIX_."\x6frde\x72_p\x61\x79m\x65nt\x20\x57HE\x52E\x20\x20\x74ransa\x63t\x69\x6f\x6e_i\x64 \x3d\x27\x61gil\x65\x70\x72e\x70aid\x63\x72\x65d\x69\x74'\x20AN\x44\x20or\x64\x65\x72\x5f\x72\x65f\x65r\x65nc\x65 ='".$order->reference."'";${${"GLOBAL\x53"}["h\x68r\x68\x6bx\x66\x76\x65\x64gq"]}=Db::getInstance()->getRow(${${"G\x4c\x4fB\x41\x4c\x53"}["xn\x66\x63\x76j\x79\x79\x6db"]});if((int)${${"\x47L\x4f\x42\x41\x4c\x53"}["\x68hr\x68\x6b\x78\x66\x76e\x64\x67\x71"]}["\x69\x64\x5fo\x72d\x65\x72\x5fp\x61\x79\x6de\x6et"]<=0)return;$kmaytnwnthh="i\x64\x5f\x6f\x72\x64e\x72";$lauvftjgpav="\x73\x71\x6c";${$zilelvkgq}="\x53E\x4c\x45C\x54 * F\x52OM\x20 "._DB_PREFIX_."o\x72\x64er\x5f\x70\x61y\x6de\x6et\x20WHE\x52E\x20\x20\x49\x46\x4e\x55\x4cL(tr\x61n\x73act\x69o\x6e_i\x64,'') != \x27\x61\x67\x69lep\x72e\x70\x61\x69dc\x72edi\x74\x27 \x41N\x44 \x49\x46\x4e\x55\x4cL(tr\x61nsa\x63t\x69\x6fn\x5fid,'\x27)\x20!\x3d '' AN\x44\x20\x6f\x72\x64\x65\x72\x5fr\x65f\x65ren\x63\x65 ='".$order->reference."\x27";${${"GLO\x42A\x4c\x53"}["\x70\x6br\x76\x6d\x64\x7a\x70\x61\x64p"]}=Db::getInstance()->getRow(${${"\x47\x4cO\x42\x41\x4c\x53"}["\x6e\x79t\x76\x7av\x61\x64\x6d"]});if((int)${${"G\x4c\x4fBA\x4c\x53"}["p\x6b\x72\x76\x6dd\x7apad\x70"]}["id\x5f\x6frde\x72\x5fp\x61y\x6de\x6e\x74"]<=0)return;${${"G\x4c\x4f\x42AL\x53"}["\x6e\x79t\x76z\x76a\x64m"]}="\x44E\x4cETE \x46\x52O\x4d\x20"._DB_PREFIX_."\x6fr\x64e\x72_pay\x6d\x65n\x74 W\x48\x45R\x45 \x20I\x46NU\x4cL(\x74r\x61n\x73\x61\x63\x74\x69o\x6e_id,\x27\x27) \x3d'\x27\x20\x41ND\x20L\x4f\x57E\x52(p\x61ym\x65\x6et\x5fm\x65t\x68\x6f\x64) li\x6be \x27%\x70ayp\x61l%\x27\x20A\x4eD o\x72\x64e\x72_r\x65\x66\x65r\x65\x6ec\x65\x20='".$order->reference."\x27";Db::getInstance()->Execute(${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x6ey\x74\x76\x7a\x76a\x64m"]});${$ydwkwym}="\x44\x45\x4cETE F\x52OM\x20\x20"._DB_PREFIX_."or\x64er_i\x6e\x76o\x69\x63\x65\x5fp\x61y\x6d\x65\x6et WH\x45\x52E\x20\x69d\x5f\x6f\x72de\x72\x3d".(int)${$kmaytnwnthh};Db::getInstance()->Execute(${${"G\x4cOB\x41L\x53"}["\x6ey\x74v\x7a\x76\x61\x64m"]});$wogxgdtp="s\x71l";${$lauvftjgpav}="I\x4e\x53\x45R\x54 \x49\x4e\x54\x4f\x20"._DB_PREFIX_."\x6f\x72\x64er_\x69nv\x6fi\x63\x65\x5fpa\x79m\x65n\x74\x20(id_\x6f\x72\x64e\x72_\x69\x6ev\x6fi\x63e,\x20\x69\x64\x5ford\x65r_pay\x6den\x74,\x20i\x64_\x6fr\x64er) valu\x65\x73 (".${${"G\x4c\x4f\x42\x41LS"}["\x6agc\x68\x65\x68\x79\x6a\x70"]}.",".(int)${${"\x47L\x4f\x42A\x4c\x53"}["\x6d\x73\x79\x6az\x73\x70\x70f\x67"]}["\x69\x64_or\x64\x65r_\x70\x61yme\x6et"].",".(int)${${"\x47\x4cO\x42\x41\x4cS"}["b\x74\x68\x65\x76\x62p\x68r"]}.")";Db::getInstance()->Execute(${${"\x47L\x4f\x42A\x4cS"}["\x6ey\x74\x76\x7a\x76\x61d\x6d"]});${${"\x47\x4c\x4fB\x41LS"}["n\x79\x74\x76z\x76ad\x6d"]}="\x49\x4eSE\x52T\x20\x49\x4e\x54O "._DB_PREFIX_."\x6frder\x5finv\x6f\x69ce_pay\x6d\x65\x6et\x20(i\x64_o\x72d\x65\x72\x5f\x69nvo\x69c\x65,\x20\x69d_o\x72\x64er_\x70\x61\x79me\x6e\x74, i\x64\x5f\x6f\x72\x64er)\x20\x76a\x6c\x75\x65\x73\x20(".${${"\x47L\x4f\x42A\x4c\x53"}["oolmw\x63c\x6c\x64\x6a"]}.",".(int)${${"\x47L\x4f\x42AL\x53"}["\x77\x79y\x67\x74o\x71v\x77p\x67\x67"]}["\x69d_o\x72\x64er_p\x61ymen\x74"].",".(int)${${"G\x4c\x4fBAL\x53"}["\x6djc\x74\x7ad"]}.")";Db::getInstance()->Execute(${$wogxgdtp});}public static function adjustOrderPaymentAmount($id_order,$modulename){$luoyquumhdrk="\x6do\x64\x75\x6ce\x6e\x61m\x65";$gjipilwnbhkz="i\x64\x5fo\x72\x64\x65\x72";if(${$gjipilwnbhkz}<=0)return;${"GL\x4f\x42\x41\x4c\x53"}["\x77n\x66\x65\x6cw\x66\x63ue\x73"]="\x6d\x6f\x64\x75l\x65n\x61m\x65";if(${$luoyquumhdrk}=="\x61\x67\x69\x6cepa\x79pa\x6c\x70\x61r\x61\x6c\x6c\x65\x6c"||${${"G\x4c\x4f\x42\x41\x4c\x53"}["\x77\x6e\x66\x65\x6c\x77f\x63\x75\x65\x73"]}=="\x61\x67\x69\x6ce\x70ay\x70a\x6c\x61\x64\x61\x70\x74\x69v\x65"){${"\x47L\x4f\x42ALS"}["\x76\x6do\x6d\x68\x6av\x6b\x6e"]="\x73q\x6c";$ocxllglmh="pa\x69d\x42\x79T\x6f\x6b\x65n\x73";${${"\x47\x4c\x4fBA\x4c\x53"}["\x66\x70\x6b\x75\x71p\x76\x6c"]}=new Order(${${"G\x4c\x4f\x42\x41LS"}["m\x6a\x63\x74z\x64"]});${${"\x47\x4cO\x42A\x4c\x53"}["vm\x6f\x6dh\x6a\x76\x6b\x6e"]}="\x53\x45L\x45\x43T\x20amo\x75\x6e\x74 FR\x4f\x4d\x20\x20"._DB_PREFIX_."\x6frder_p\x61\x79men\x74\x20W\x48\x45RE\x20\x20\x74ran\x73act\x69\x6fn_\x69\x64\x20=\x20'agile\x70r\x65pai\x64\x63\x72\x65dit\x27\x20A\x4eD\x20ord\x65\x72\x5fr\x65f\x65r\x65\x6e\x63\x65 ='".$ord->reference."\x27";${"\x47\x4c\x4f\x42A\x4cS"}["\x76\x6c\x7av\x6d\x76"]="s\x71\x6c";${$ocxllglmh}=(float)Db::getInstance()->getValue(${${"\x47\x4cO\x42\x41\x4c\x53"}["\x76\x6cz\x76\x6d\x76"]});$lymkdf="\x70\x61\x69\x64\x42\x79\x54o\x6b\x65\x6es";if(${$lymkdf}>0){$qcqfwlccrxc="\x73ql";$lhfrtiplvxms="\x70\x61\x69\x64\x42\x79\x54ok\x65\x6e\x73";${$qcqfwlccrxc}="\x55\x50\x44A\x54\x45\x20 "._DB_PREFIX_."o\x72\x64\x65r_\x70\x61\x79m\x65n\x74 se\x74\x20\x61\x6d\x6f\x75\x6et \x3d\x20 \x61\x6do\x75nt\x20- ".${$lhfrtiplvxms}." \x57\x48E\x52\x45 \x74\x72\x61n\x73\x61cti\x6fn_\x69d \x21\x3d '\x61g\x69le\x70\x72\x65p\x61\x69dcre\x64i\x74'\x20\x41ND \x6f\x72\x64er_\x72efer\x65nc\x65\x20='".$ord->reference."'";Db::getInstance()->Execute(${${"\x47\x4cOB\x41\x4c\x53"}["\x6ey\x74\x76\x7a\x76\x61\x64m"]});}}}public function process_mycredit(){global$cookie,$smarty;${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x61\x76w\x61\x61\x72\x70\x62\x71\x74k"]="my\x63re\x64\x69\x74";${${"\x47\x4cO\x42ALS"}["jsoo\x73\x6fi\x64"]}=array();${${"\x47\x4cO\x42\x41\x4c\x53"}["c\x62\x78\x65\x79\x62\x6chc\x68"]}=0;$nvsdwzeklv="\x70\x69\x6ere\x63";${${"\x47L\x4fBA\x4cS"}["r\x6d\x6f\x6b\x6d\x68h\x64"]}="";${$nvsdwzeklv}=array();if(Tools::isSubmit("\x73\x75\x62\x6ditP\x49N")){$xcdrbfplbr="\x70i\x6e_c\x6fd\x65";$ulybhtt="\x70\x69\x6e\x5f\x63\x6fd\x65";$xhcrutwvjj="\x65\x72\x72\x6fr";${$xcdrbfplbr}=Tools::getValue("pin\x5fco\x64\x65");if(strlen(${$ulybhtt})<12)${$xhcrutwvjj}[]=Tools::displayError("\x49nvalid\x20PI\x4e\x20co\x64\x65");else{$hpulutyp="\x70\x69\x6er\x65\x63";${"\x47\x4cO\x42\x41\x4cS"}["\x72\x63\x66\x72ps\x67\x68\x75\x63m\x6c"]="p\x69\x6e\x72ec";${"\x47LOB\x41\x4c\x53"}["g\x69\x61\x67l\x6d\x76"]="pin\x5fco\x64\x65";${$hpulutyp}[]=RandomPin::getValidPin(${${"\x47\x4c\x4f\x42\x41L\x53"}["\x67\x69\x61\x67\x6c\x6d\x76"]});if(!sizeof(${${"\x47\x4cO\x42AL\x53"}["\x68\x6a\x65i\x69\x79u\x69w\x64r"]})||empty(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x72\x63\x66r\x70\x73gh\x75\x63\x6d\x6c"]}[0]))${${"G\x4c\x4f\x42\x41\x4cS"}["j\x73oo\x73\x6f\x69d"]}[]=Tools::displayError("In\x76al\x69d \x50\x49N\x20code");}if(!sizeof(${${"G\x4c\x4f\x42\x41\x4c\x53"}["j\x73\x6f\x6f\x73\x6fi\x64"]})&&!empty(${${"G\x4c\x4f\x42A\x4c\x53"}["h\x6aeii\x79u\x69\x77dr"]}[0])){${"\x47\x4c\x4f\x42ALS"}["\x6b\x75wd\x66\x77ag"]="id\x5f\x61\x67\x69le\x5f\x72an\x64o\x6d\x70\x69n";$oyzftijmv="re\x741";$ysuxmcusb="cc";$abaiifccr="r\x65t\x31";${$ysuxmcusb}=new CustomerCredit();$cc->date_add=date("\x59-\x6d-d\x20\x48:i:\x73");$cc->id_customer=intval($cookie->id_customer);$jaqtatv="\x70\x69\x6e_c\x6f\x64e";$yhiuivgkdcfo="ret2";$cc->units=AgilePrepaidCredit::ConvertPrice2Tokens((int)Configuration::get("PS_\x43\x55\x52R\x45N\x43Y\x5fD\x45F\x41UL\x54"),${${"\x47LO\x42AL\x53"}["\x68\x6ae\x69\x69\x79\x75\x69\x77\x64\x72"]}[0]["\x70in_v\x61\x6cue"]);$cc->id_reason=AgilePrepaidCredit::CREDIT_REASON_PURCHASE;$cc->memo=$this->l('PIN code:').${$jaqtatv};${$oyzftijmv}=$cc->save();${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x6b\x75wd\x66\x77a\x67"]}=intval(${${"\x47\x4c\x4fBA\x4c\x53"}["\x68\x6a\x65i\x69\x79u\x69\x77\x64\x72"]}[0]["i\x64\x5f\x61g\x69\x6c\x65_\x72a\x6ed\x6f\x6dpi\x6e"]);${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x6c\x64\x65\x67\x7a\x6ck\x65w\x68\x78"]}=new RandomPin(${${"GL\x4f\x42ALS"}["lm\x65\x64\x76i\x69"]});$rp->date_used=date("Y-\x6d-d\x20H:i:\x73");$fvfqunytsdl="\x72\x65\x74\x32";$rp->id_customer=intval($cookie->id_customer);${$fvfqunytsdl}=$rp->update();if(${$abaiifccr}&&${$yhiuivgkdcfo}){${${"\x47L\x4f\x42A\x4c\x53"}["cb\x78\x65\x79blh\x63\x68"]}=1;}else{${${"G\x4c\x4f\x42\x41\x4cS"}["\x6a\x73\x6f\x6f\x73\x6f\x69\x64"]}[]=Tools::displayError("\x69\x6dp\x6f\x73\x73\x69\x62le\x20t\x6f\x20up\x64ate\x20\x69n\x66o\x72\x6da\x74ion");}}}${${"G\x4c\x4f\x42A\x4c\x53"}["\x61\x76\x77a\x61\x72\x70bqt\x6b"]}=CustomerCredit::getCreditsByCustomerID((intval($cookie->id_customer)));$smarty->assign(array("\x6d\x65rr\x6frs"=>${${"\x47\x4c\x4fB\x41L\x53"}["\x6a\x73\x6f\x6fso\x69\x64"]},"\x6dycr\x65d\x69t"=>${${"\x47L\x4f\x42\x41\x4c\x53"}["\x73\x77\x72x\x70\x68\x64i\x79n\x78"]},"\x63\x6f\x6efi\x72m\x61\x74\x69\x6fn"=>${${"\x47\x4cOB\x41LS"}["\x63\x62x\x65\x79b\x6ch\x63h"]},"p\x69n_\x63od\x65"=>${${"G\x4cO\x42\x41\x4c\x53"}["\x72m\x6fk\x6dh\x68\x64"]}));}private function getModuleLinkedCategory(){$dibweyo="\x69\x64\x5f\x63\x61t\x65";${"G\x4cOB\x41L\x53"}["\x74\x67\x65\x6ds\x75\x6f"]="\x63ate\x67\x6f\x72\x79";global$cookie;include_once(_PS_ROOT_DIR_."/mod\x75l\x65\x73/\x61\x67i\x6cep\x72\x65\x70\x61\x69\x64\x63redit/a\x67\x69l\x65pre\x70ai\x64cr\x65\x64it\x2e\x70\x68\x70");${$dibweyo}=(int)Configuration::getGlobalValue("\x41G\x49L\x45\x5fP\x43\x52E\x44I\x54\x5f\x43ID");$hhjltcmxnae="\x69\x6d\x61\x67e\x75\x72l";${"\x47\x4cO\x42\x41\x4cS"}["t\x70\x78\x79v\x62q\x6bz\x75"]="\x63a\x74e\x67o\x72y";${${"G\x4cOB\x41\x4cS"}["t\x70\x78\x79\x76\x62\x71\x6bzu"]}=new Category(${${"\x47\x4c\x4fB\x41\x4c\x53"}["\x67\x67\x73\x70\x66\x64\x6ej\x64\x78q"]});if(Validate::isLoadedObject(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x74\x73aegnn\x70r\x6c"]}))return${${"\x47L\x4fBA\x4c\x53"}["\x74\x67e\x6d\x73\x75\x6f"]};${${"G\x4c\x4f\x42\x41\x4c\x53"}["t\x73\x61\x65\x67n\x6e\x70r\x6c"]}=AgileHelper::createCategoryByName("\x54o\x6b\x65\x6e\x73");${$hhjltcmxnae}=Tools::getShopDomain(true,true).__PS_BASE_URI__."/mod\x75\x6c\x65\x73/agi\x6cepr\x65pa\x69d\x63\x72\x65dit/i\x6d\x67/t\x6f\x6ben\x73-\x6carge.\x6a\x70g";if(!AgileHelper::addCategoryImage($category->id,${${"GL\x4f\x42\x41LS"}["\x6e\x68qy\x73d\x78\x79"]})){$this->_errors[]=$this->l('Failed to add a image for Tokens category.');}$this->prepareTokensProduct($category->id,"\x3200 T\x6fk\x65n\x73",200);$this->prepareTokensProduct($category->id,"10\x300\x20To\x6ben\x73",1000);return${${"\x47\x4cOBAL\x53"}["t\x73\x61\x65\x67nn\x70\x72\x6c"]};}private function prepareTokensProduct($id_category,$name,$price){${"\x47\x4c\x4f\x42\x41\x4cS"}["lnpc\x67pk"]="\x70\x72\x6f\x64u\x63\x74";$xqzxzfl="produc\x74";$gomlljqqer="\x70\x72\x69\x63\x65";${$xqzxzfl}=new Product();${${"\x47L\x4f\x42\x41\x4c\x53"}["\x6cn\x70\x63\x67\x70\x6b"]}=AgileHelper::createProductWithBasics(${${"\x47\x4c\x4fB\x41\x4c\x53"}["\x67\x65r\x74\x64\x7aq\x71g\x65\x6d"]},${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x62\x75\x65zc\x6e\x67\x61\x65sy\x63"]},${$gomlljqqer});${${"\x47LO\x42A\x4cS"}["\x6e\x68\x71\x79\x73\x64\x78y"]}=Tools::getShopDomain(true,true).__PS_BASE_URI__."/mo\x64ules/a\x67i\x6cep\x72\x65\x70\x61id\x63\x72\x65d\x69\x74/im\x67/t\x6f\x6be\x6es-lar\x67\x65\x2ej\x70g";AgileHelper::addProductImage($product->id,${${"GL\x4f\x42\x41L\x53"}["\x6e\x68q\x79\x73\x64\x78\x79"]});return${${"\x47L\x4fB\x41\x4cS"}["\x6a\x6fs\x63\x68\x62\x69\x72c\x68k"]};}public function getL($key){${"\x47\x4cO\x42\x41\x4c\x53"}["\x65\x79\x6d\x66\x6czi\x61b\x6e\x7a"]="\x74\x72\x61\x6e\x73\x6ca\x74i\x6f\x6es";$wqvkbwbefbp="tr\x61ns\x6c\x61tio\x6es";${$wqvkbwbefbp}=array("P\x61i\x64 \x62y\x20\x74\x6f\x6b\x65\x6e"=>$this->l('Paid by token'),"Agi\x6ce \x54\x6fke\x6e \x50\x61ym\x65\x6et"=>$this->l('Agile Token Payment'),"P\x61y\x20\x6f\x72\x64\x65r\x20b\x79\x20To\x6b\x65n"=>$this->l('Pay order by Token'));${"G\x4c\x4f\x42\x41\x4cS"}["\x66\x73o\x7a\x79q\x62b"]="\x6bey";${"\x47LO\x42\x41\x4c\x53"}["co\x78\x73w\x67\x66\x77\x68\x6a"]="\x74\x72\x61\x6e\x73\x6ca\x74\x69\x6fn\x73";if(isset(${${"\x47L\x4f\x42ALS"}["\x65\x79\x6d\x66\x6czi\x61\x62\x6e\x7a"]}[${${"\x47\x4c\x4fB\x41\x4cS"}["eq\x6cxn\x66\x64\x68\x71\x68\x6f\x66"]}]))return${${"\x47\x4cO\x42\x41\x4c\x53"}["c\x6fx\x73w\x67f\x77\x68j"]}[${${"\x47\x4c\x4f\x42A\x4c\x53"}["e\x71\x6cx\x6e\x66d\x68\x71\x68\x6ff"]}];return${${"\x47LO\x42A\x4c\x53"}["f\x73\x6f\x7a\x79\x71b\x62"]};}public function hookDisplayPayment($params){if(!$this->active)return;${${"\x47LO\x42\x41\x4c\x53"}["\x75\x6e\x73\x61\x6f\x68c\x70"]}=self::GetTokenBalance($this->context->customer->id);if(${${"\x47L\x4fB\x41\x4cS"}["\x75\x6e\x73\x61\x6fh\x63\x70"]}<=0)return;$this->prepareToekenApplyFormData(true);return$this->display(__FILE__,"\x76i\x65ws/t\x65\x6d\x70\x6ca\x74\x65\x73/\x68ook/u\x73e\x63\x72editfo\x72\x6d.\x74\x70\x6c");}public function validateOrder($id_cart,$id_order_state,$amount_paid,$payment_method='Unknown',$message=null,$extra_vars=array(),$currency_special=null,$dont_touch_amount=false,$secure_key=false,Shop$shop=null){$bgaqqsqkw="e\x78t\x72\x61\x5f\x76\x61rs";${"\x47\x4cO\x42A\x4cS"}["e\x75\x66\x6d\x72rw\x6f\x79\x72c"]="id_or\x64e\x72\x5f\x73\x74\x61t\x65";${"G\x4c\x4f\x42\x41LS"}["\x64ro\x6as\x6b\x76j\x70cl"]="\x73\x68\x6f\x70";${"\x47\x4cO\x42\x41\x4cS"}["t\x68q\x79gz\x66\x6b\x74"]="c\x75\x72\x72en\x63\x79\x5fspe\x63\x69\x61\x6c";${"GL\x4f\x42\x41\x4c\x53"}["\x64\x67\x70ty\x64i"]="\x6d\x65s\x73ag\x65";${$bgaqqsqkw}["\x74r\x61n\x73ac\x74ion_\x69\x64"]="\x61\x67\x69\x6cep\x72ep\x61\x69d\x63red\x69t";${${"\x47\x4c\x4f\x42\x41L\x53"}["\x62yj\x63\x78\x6b\x79\x77\x67\x71"]}=parent::validateOrder(${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x69i\x63d\x72b\x74\x6a"]},${${"\x47L\x4fB\x41\x4c\x53"}["\x65\x75f\x6dr\x72wo\x79\x72\x63"]},${${"GL\x4f\x42\x41LS"}["\x77l\x72\x6a\x63\x6bo\x72\x6a\x75"]},$this->getL("\x50\x61id by t\x6fk\x65n"),${${"G\x4c\x4fB\x41\x4cS"}["\x64gp\x74y\x64\x69"]},${${"\x47L\x4f\x42\x41\x4c\x53"}["tmj\x71\x75\x62o\x6c\x67\x66"]},${${"\x47\x4cO\x42\x41L\x53"}["t\x68\x71\x79g\x7a\x66kt"]},${${"GL\x4f\x42\x41L\x53"}["\x71\x69b\x71\x6d\x61\x79f\x77\x67k\x78"]},${${"G\x4c\x4f\x42\x41\x4cS"}["\x77\x76\x70\x75\x61d\x70\x65\x74dk"]},${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x64roj\x73k\x76\x6ap\x63\x6c"]});return${${"GLO\x42A\x4c\x53"}["b\x79jc\x78ky\x77g\x71"]};}public function sendOrderConfirmationEmail($id_order){${"\x47L\x4f\x42A\x4cS"}["\x6f\x74\x6a\x75p\x75\x78f\x6db"]="\x63\x61rt\x5fr\x75\x6c\x65s";$kwtlkenx="o\x72\x64e\x72";${"G\x4c\x4f\x42A\x4c\x53"}["el\x6a\x69\x72\x77\x69\x6a\x75"]="\x63u\x73t\x6f\x6d\x65r";$smvwlvckvju="\x63\x75\x72\x72en\x63\x79";${"\x47\x4cO\x42\x41L\x53"}["\x64u\x63\x69\x67\x61\x73\x63\x69\x7a\x77"]="ke\x79";global$smarty;$ghqqww="cu\x72\x72\x65\x6e\x63\x79";$mhmxenejob="\x64a\x74\x61";${"\x47\x4c\x4fBA\x4c\x53"}["\x74y\x69j\x63\x67\x6eur\x6c\x6a"]="\x70\x72\x6f\x64\x75cts";${"GLOB\x41\x4c\x53"}["\x68yh\x73\x6f\x79\x74hx\x66\x6d\x67"]="\x63\x61\x72t";${"\x47\x4c\x4f\x42AL\x53"}["\x73\x70l\x74\x75d\x6fw\x66"]="\x70r\x6f\x64\x75\x63\x74\x73_lis\x74";${$kwtlkenx}=new Order(${${"\x47\x4cO\x42\x41L\x53"}["\x6d\x6a\x63tz\x64"]});${${"G\x4c\x4fBA\x4c\x53"}["\x65lj\x69rwi\x6au"]}=new Customer($order->id_customer);${"\x47L\x4f\x42\x41\x4cS"}["\x69i\x78n\x73\x6b"]="v\x69\x72t\x75\x61\x6c_\x70\x72\x6f\x64uc\x74";$qhmltmvo="\x66i\x6c\x65\x5f\x61\x74\x74\x61\x63he\x6de\x6e\x74";${$ghqqww}=new Currency($order->id_currency);${${"\x47L\x4f\x42\x41\x4c\x53"}["\x68\x79\x68so\x79t\x68\x78fm\x67"]}=new Cart($order->id_cart);${"GL\x4f\x42\x41\x4c\x53"}["\x73\x6al\x74\x79\x77"]="\x63\x61\x72\x74\x5fr\x75l\x65s\x5f\x6c\x69\x73t";${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x74\x79\x69\x6ac\x67\x6e\x75\x72\x6c\x6a"]}=$cart->getProducts();${"\x47\x4c\x4f\x42\x41L\x53"}["\x69jc\x65\x6cwyw"]="\x69\x6e\x76\x6f\x69\x63e_\x73\x74\x61\x74e";$faykovtn="\x63u\x72\x72\x65\x6e\x63\x79";$nbwtkccij="\x70r\x6fd\x75ct\x73_l\x69\x73\x74";${${"\x47LOB\x41\x4c\x53"}["\x6f\x74j\x75p\x75\x78\x66\x6d\x62"]}=$cart->getCartRules();${${"\x47LOB\x41\x4c\x53"}["\x69\x77\x64\x65\x6f\x6f\x69\x6b"]}=new Address($order->id_address_invoice);${${"\x47\x4c\x4fBAL\x53"}["tnuplw\x72\x76\x73t\x77\x6f"]}=new Address($order->id_address_delivery);${"\x47LOBALS"}["\x66\x61\x68\x6d\x65\x71\x75\x6fw\x61"]="\x64\x65l\x69v\x65\x72\x79";${${"\x47LOB\x41LS"}["x\x63\x63\x76\x64\x6ejv\x67"]}=$delivery->id_state?new State($delivery->id_state):false;${${"\x47\x4cO\x42\x41\x4c\x53"}["\x69\x6ac\x65\x6c\x77y\x77"]}=$invoice->id_state?new State($invoice->id_state):false;${"\x47L\x4f\x42\x41\x4cS"}["\x67\x75\x67\x68pbn\x72i"]="\x69\x6e\x76\x6fi\x63e";${${"G\x4cO\x42\x41\x4c\x53"}["\x65o\x73\x63a\x68\x75"]}=new Carrier($order->id_carrier);${$nbwtkccij}="";${${"G\x4cOBA\x4c\x53"}["\x72\x72\x6d\x64t\x6fy\x6e\x69\x74\x64"]}=true;foreach(${${"G\x4c\x4f\x42\x41\x4cS"}["v\x6d\x76\x63\x6bq\x70"]} as${${"G\x4cO\x42AL\x53"}["\x64\x75\x63\x69\x67\x61sc\x69\x7a\x77"]}=>${${"\x47\x4c\x4f\x42\x41LS"}["\x6ao\x73\x63\x68\x62\x69\x72c\x68\x6b"]}){$jmtheuunqfh="p\x72\x6fd\x75\x63\x74";$deyxhikuyi="cus\x74\x6f\x6diz\x61\x74\x69\x6f\x6e_q\x75\x61\x6e\x74\x69\x74\x79";${"\x47L\x4f\x42A\x4c\x53"}["j\x64\x75\x6ep\x75\x6f\x63"]="p\x72\x6fdu\x63t";$cubzjzdjxfdm="\x63\x75\x73\x74\x6f\x6d\x69\x7ae\x64\x5f\x64\x61\x74\x61\x73";$rlgorciyst="\x70\x72\x6fduct";$oppwgfq="\x70\x72\x6fduc\x74";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x65fb\x79\x72\x6emm"]="\x70\x72o\x64uct";$iouvcjgk="\x70r\x6f\x64\x75\x63\x74";$idfxulluqwj="\x63u\x73\x74o\x6d\x69\x7a\x61\x74io\x6e\x5fq\x75ant\x69\x74\x79";$uwprvr="\x63\x75\x73to\x6diz\x61\x74\x69\x6f\x6e\x5f\x71\x75a\x6e\x74i\x74y";$tetgihjerk="\x70\x72i\x63e";${"\x47\x4c\x4f\x42AL\x53"}["gl\x78\x79\x77w\x67\x78\x78\x6aq\x77"]="p\x72oduc\x74";${"\x47\x4cO\x42A\x4cS"}["\x68\x76x\x6fzj\x67\x77\x74\x62"]="\x70r\x69ce_\x77\x74";$yxxqgrgz="\x70\x72\x69\x63\x65\x5f\x77\x74";${$tetgihjerk}=Product::getPriceStatic((int)${${"G\x4cO\x42\x41\x4cS"}["\x6ao\x73\x63\x68bi\x72\x63\x68k"]}["id\x5fpr\x6f\x64uc\x74"],false,(${$jmtheuunqfh}["\x69d_\x70r\x6fdu\x63t_\x61t\x74\x72ibut\x65"]?(int)${${"G\x4c\x4f\x42\x41\x4cS"}["j\x6f\x73c\x68\x62\x69rch\x6b"]}["\x69\x64\x5f\x70r\x6f\x64uct_at\x74ri\x62\x75t\x65"]:null),6,null,false,true,${${"\x47L\x4fBALS"}["\x6a\x64\x75\x6ep\x75\x6fc"]}["c\x61\x72t_q\x75a\x6e\x74\x69\x74y"],false,(int)$order->id_customer,(int)$order->id_cart,(int)$order->{Configuration::get("\x50\x53_TA\x58_\x41\x44\x44RE\x53\x53_T\x59\x50\x45")});${"\x47\x4c\x4f\x42A\x4cS"}["qn\x7aos\x79\x73"]="p\x72\x69c\x65";${$yxxqgrgz}=Product::getPriceStatic((int)${${"\x47\x4c\x4f\x42A\x4c\x53"}["j\x6fsc\x68\x62\x69r\x63\x68k"]}["\x69d\x5f\x70\x72o\x64\x75\x63\x74"],true,(${${"G\x4c\x4fBAL\x53"}["j\x6fs\x63\x68\x62ir\x63\x68\x6b"]}["id\x5fp\x72o\x64u\x63\x74\x5f\x61t\x74\x72\x69\x62u\x74\x65"]?(int)${$rlgorciyst}["id\x5fpro\x64u\x63\x74_att\x72\x69\x62ut\x65"]:null),2,null,false,true,${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x67lx\x79\x77\x77g\x78xj\x71\x77"]}["car\x74\x5fq\x75an\x74\x69\x74y"],false,(int)$order->id_customer,(int)$order->id_cart,(int)$order->{Configuration::get("PS\x5fT\x41\x58_A\x44DRES\x53_TY\x50\x45")});$xdyfhoa="\x76\x69\x72\x74\x75a\x6c_pro\x64u\x63\x74";${$idfxulluqwj}=0;${"GL\x4f\x42\x41L\x53"}["\x6b\x73\x69\x63\x62\x67\x6c"]="\x63\x75\x72\x72\x65n\x63\x79";${${"G\x4c\x4fB\x41\x4c\x53"}["\x69\x79\x6f\x65h\x77\x66\x67\x71\x6e"]}=Product::getAllCustomizedDatas((int)$order->id_cart);$msothpkj="\x70r\x6f\x64u\x63t\x73_lis\x74";if(isset(${$cubzjzdjxfdm}[${${"\x47\x4c\x4fB\x41\x4c\x53"}["j\x6fs\x63\x68b\x69\x72\x63\x68k"]}["\x69d_p\x72\x6fd\x75\x63t"]][${${"\x47LOBA\x4cS"}["\x6a\x6f\x73\x63\x68\x62\x69\x72ch\x6b"]}["i\x64\x5f\x70\x72oduct\x5fa\x74\x74ribu\x74\x65"]])){$lkturo="\x63\x75s\x74\x6f\x6d\x69\x7aat\x69\x6f\x6e\x5f\x74\x65\x78\x74";${"\x47L\x4fBAL\x53"}["b\x77\x69d\x76\x71\x77"]="\x70rod\x75\x63t";${"\x47\x4c\x4f\x42A\x4c\x53"}["\x77\x68\x62\x74\x72\x63\x6bs\x62\x62z"]="\x70\x72\x6f\x64\x75ct";$uufsvkd="c\x75\x73\x74\x6fm\x69z\x61t\x69\x6f\x6e\x5f\x74ex\x74";$kmfhbifetnu="\x63\x75rr\x65\x6e\x63y";${"\x47L\x4f\x42\x41L\x53"}["ci\x63\x61\x61sl\x74x"]="\x63\x75\x73\x74\x6f\x6d\x69\x7aa\x74i\x6f\x6e\x5f\x74\x65\x78t";$fgeyedu="produ\x63\x74";$hsuolecwrvdn="\x63\x75\x73\x74\x6f\x6d\x69zati\x6f\x6e";$vacpqwdr="\x63\x75\x73to\x6d\x69\x7aa\x74\x69\x6f\x6e_\x74\x65\x78\x74";${${"G\x4c\x4f\x42ALS"}["ci\x63\x61\x61\x73\x6c\x74\x78"]}="";foreach(${${"\x47\x4cOB\x41LS"}["\x69y\x6feh\x77\x66g\x71n"]}[${${"\x47\x4cO\x42\x41LS"}["j\x6fsch\x62\x69rchk"]}["\x69d_p\x72\x6f\x64uct"]][${${"\x47L\x4fBAL\x53"}["\x6a\x6f\x73ch\x62\x69r\x63h\x6b"]}["id\x5f\x70r\x6f\x64uc\x74_\x61tt\x72\x69b\x75\x74e"]][$order->id_address_delivery]as${$hsuolecwrvdn}){$colfustdge="\x63\x75\x73to\x6d\x69z\x61t\x69\x6fn\x5ft\x65x\x74";${"\x47L\x4fB\x41L\x53"}["\x75\x6fclg\x6ac\x75\x6a"]="\x63\x75\x73to\x6d\x69\x7a\x61\x74io\x6e\x5f\x74\x65\x78t";if(isset(${${"\x47L\x4fB\x41\x4c\x53"}["\x76su\x6er\x68"]}["d\x61t\x61s"][Product::CUSTOMIZE_TEXTFIELD])){$yyxyvgu="\x74e\x78\x74";foreach(${${"GL\x4fB\x41L\x53"}["\x76sun\x72h"]}["\x64\x61tas"][Product::CUSTOMIZE_TEXTFIELD]as${$yyxyvgu})${${"\x47\x4c\x4f\x42A\x4c\x53"}["o\x77\x68\x68\x6d\x6d\x6d\x61"]}.=${${"G\x4c\x4f\x42AL\x53"}["\x77\x62\x78g\x7a\x64"]}["\x6e\x61me"].": ".${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x77\x62\x78g\x7ad"]}["value"]."\x3cbr\x20/>";}${"G\x4cO\x42\x41LS"}["z\x7a\x6dd\x68oqz\x73\x6f"]="\x63us\x74\x6f\x6d\x69z\x61ti\x6f\x6e";if(isset(${${"G\x4c\x4fB\x41\x4c\x53"}["\x76\x73\x75n\x72h"]}["d\x61\x74\x61s"][Product::CUSTOMIZE_FILE]))${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x75\x6fclgjcu\x6a"]}.=sprintf(Tools::displayError("\x25\x64 i\x6dage(s)"),count(${${"\x47\x4cO\x42\x41\x4cS"}["\x7a\x7am\x64\x68\x6f\x71z\x73\x6f"]}["\x64a\x74\x61s"][Product::CUSTOMIZE_FILE]))."<br\x20/\x3e";${$colfustdge}.="---\x3cbr /\x3e";}$mahxnlr="\x70r\x6fd\x75c\x74";$rfjwydzvu="\x63\x75\x72\x72\x65\x6e\x63y";${"\x47\x4c\x4f\x42\x41\x4c\x53"}["fyc\x6f\x69n\x6a"]="\x70ri\x63\x65\x5f\x77\x74";${$vacpqwdr}=rtrim(${${"\x47L\x4fBAL\x53"}["\x6fw\x68\x68\x6dm\x6d\x61"]},"---<b\x72 />");${"G\x4c\x4fB\x41LS"}["\x70\x6d\x64o\x78\x69u\x65\x68\x70\x70"]="\x70\x72od\x75\x63\x74";${${"\x47LOB\x41\x4c\x53"}["\x62\x74\x64\x76y\x62\x77\x62s\x64\x69"]}=(int)${$mahxnlr}["\x63u\x73\x74\x6f\x6d\x69z\x61tio\x6e_q\x75an\x74\x69\x74y"];${${"G\x4cOB\x41L\x53"}["g\x65\x6f\x6e\x7a\x6fd\x69\x65\x76"]}.="<t\x72 \x73\x74y\x6ce\x3d\"bac\x6b\x67\x72\x6fu\x6e\x64-\x63o\x6co\x72:\x20".(${${"\x47\x4c\x4fB\x41\x4cS"}["\x65\x71\x6cx\x6e\x66\x64\x68\x71\x68\x6f\x66"]}%2?"#\x44D\x45\x32\x456":"\x23EBE\x43E\x45")."\x3b\x22\x3e\n\t\t\t\t\t\x3c\x74d \x73tyl\x65=\x22p\x61dd\x69\x6eg: 0.6\x65m 0\x2e4em\x3b\x77\x69dth:\x20\x315\x25;\x22>".${$fgeyedu}["\x72efe\x72\x65nce"]."</t\x64>\n\t\t\t\t\t\x3ct\x64 \x73ty\x6c\x65\x3d\"p\x61d\x64\x69\x6eg:\x200.6em 0\x2e4e\x6d;\x77\x69d\x74h:\x2030%\x3b\x22\x3e<\x73\x74\x72\x6f\x6eg>".${${"\x47L\x4fBA\x4cS"}["wh\x62tr\x63\x6b\x73\x62\x62z"]}["n\x61m\x65"].(isset(${${"\x47L\x4f\x42A\x4c\x53"}["\x70m\x64o\x78\x69u\x65h\x70\x70"]}["a\x74\x74ri\x62\x75\x74e\x73"])?"\x20-\x20".${${"\x47\x4cO\x42A\x4cS"}["\x62\x77\x69\x64\x76\x71\x77"]}["att\x72ib\x75t\x65\x73"]:"")." -\x20".Tools::displayError("C\x75\x73\x74omi\x7ae\x64").(!empty(${$lkturo})?" -\x20".${$uufsvkd}:"")."\x3c/\x73\x74ron\x67\x3e</\x74\x64\x3e\n\t\t\t\t\t\x3ct\x64\x20\x73ty\x6c\x65\x3d\x22\x70a\x64\x64\x69\x6e\x67: 0.6e\x6d\x20\x30.4e\x6d\x3b\x20\x77\x69\x64\x74\x68:\x202\x30%\x3b\x22\x3e".Tools::displayPrice(Product::getTaxCalculationMethod()==PS_TAX_EXC?Tools::ps_round(${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x69\x78\x78e\x75\x73hy"]},2):${${"\x47\x4cO\x42A\x4cS"}["\x65\x68e\x74d\x6e\x65\x77\x6do\x69"]},${$rfjwydzvu},false)."\x3c/td\x3e\n\t\t\t\t\t<t\x64 st\x79\x6ce=\"\x70\x61\x64di\x6eg: 0\x2e\x36e\x6d \x30.4em;\x20\x77\x69\x64\x74\x68:\x2015\x25;\x22>".${${"\x47\x4c\x4fB\x41LS"}["\x62t\x64vyb\x77\x62\x73\x64i"]}."</\x74d\x3e\n\t\t\t\t\t<\x74\x64 s\x74\x79\x6ce=\x22\x70a\x64\x64\x69n\x67: \x30.6\x65m \x30\x2e4\x65\x6d\x3b w\x69\x64th: \x32\x30\x25\x3b\">".Tools::displayPrice(${${"\x47\x4cO\x42A\x4c\x53"}["\x62\x74d\x76y\x62\x77bs\x64i"]}*(Product::getTaxCalculationMethod()==PS_TAX_EXC?Tools::ps_round(${${"G\x4cO\x42\x41\x4c\x53"}["\x69\x78\x78\x65\x75\x73\x68\x79"]},2):${${"GL\x4f\x42\x41\x4c\x53"}["fyco\x69\x6e\x6a"]}),${$kmfhbifetnu},false)."</t\x64>\n\t\t\t\t</\x74\x72\x3e";}if(!${${"\x47\x4cO\x42\x41\x4c\x53"}["\x62t\x64\x76\x79\x62\x77\x62\x73\x64i"]}||(int)${${"\x47\x4c\x4fB\x41\x4c\x53"}["\x6ao\x73\x63\x68\x62\x69\x72\x63\x68k"]}["c\x61\x72\x74_qu\x61\x6et\x69t\x79"]>${${"GL\x4f\x42\x41LS"}["\x62t\x64v\x79\x62\x77\x62\x73\x64\x69"]})${$msothpkj}.="\x3ctr \x73t\x79\x6ce=\"b\x61c\x6bg\x72ou\x6e\x64-\x63\x6f\x6c\x6f\x72: ".(${${"\x47\x4c\x4fB\x41\x4cS"}["\x65q\x6cx\x6e\x66dhq\x68of"]}%2?"\x23DDE2E6":"\x23E\x42\x45CEE").";\x22>\n\t\t\t\t\t\x3c\x74d s\x74\x79\x6c\x65=\"pa\x64\x64\x69n\x67: \x30\x2e\x36\x65m\x200\x2e4\x65m;width: 1\x35%;\x22>".${${"\x47\x4c\x4fB\x41LS"}["j\x6fs\x63h\x62\x69r\x63\x68\x6b"]}["r\x65fe\x72\x65n\x63\x65"]."</td>\n\t\t\t\t\t\x3ct\x64\x20\x73t\x79le\x3d\"paddi\x6eg: \x30.\x36e\x6d 0\x2e4e\x6d;\x77\x69d\x74h:\x2030%\x3b\x22\x3e\x3cs\x74\x72o\x6eg>".${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["j\x6f\x73\x63\x68\x62\x69\x72\x63hk"]}["n\x61\x6d\x65"].(isset(${${"G\x4c\x4f\x42\x41\x4cS"}["\x65\x66b\x79\x72\x6emm"]}["\x61\x74tri\x62u\x74es"])?"\x20- ".${$oppwgfq}["at\x74r\x69\x62ut\x65s"]:"")."</st\x72\x6fn\x67\x3e</td\x3e\n\t\t\t\t\t\x3c\x74\x64 \x73\x74\x79\x6ce=\"p\x61\x64\x64\x69\x6eg: \x30.\x36\x65\x6d\x20\x30.\x34\x65m\x3b\x20\x77i\x64\x74h: 2\x30\x25;\"\x3e".Tools::displayPrice(Product::getTaxCalculationMethod()==PS_TAX_EXC?Tools::ps_round(${${"\x47\x4c\x4fB\x41L\x53"}["\x69\x78\x78\x65\x75\x73\x68y"]},2):${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x68vx\x6fz\x6a\x67w\x74\x62"]},${${"\x47\x4c\x4fBA\x4c\x53"}["\x64\x6b\x6f\x6b\x6e\x6e\x6b\x66"]},false)."\x3c/\x74\x64\x3e\n\t\t\t\t\t<\x74d \x73ty\x6ce=\"p\x61d\x64\x69n\x67: 0.6em\x200.\x34\x65m\x3b \x77\x69dth:\x201\x35%\x3b\">".((int)${$iouvcjgk}["c\x61\x72\x74\x5fq\x75\x61\x6et\x69t\x79"]-${$deyxhikuyi})."\x3c/td\x3e\n\t\t\t\t\t<t\x64\x20st\x79l\x65\x3d\"pa\x64di\x6e\x67: 0\x2e\x36\x65m 0\x2e\x34e\x6d\x3b width: \x320\x25\x3b\">".Tools::displayPrice(((int)${${"\x47\x4c\x4fBA\x4cS"}["j\x6f\x73\x63\x68b\x69r\x63h\x6b"]}["c\x61\x72\x74\x5fq\x75\x61\x6etit\x79"]-${$uwprvr})*(Product::getTaxCalculationMethod()==PS_TAX_EXC?Tools::ps_round(${${"\x47\x4cO\x42A\x4cS"}["qn\x7aos\x79\x73"]},2):${${"\x47LO\x42\x41LS"}["eh\x65\x74\x64ne\x77m\x6f\x69"]}),${${"\x47LO\x42ALS"}["k\x73\x69cbg\x6c"]},false)."\x3c/t\x64\x3e\n\t\t\t\t</\x74r\x3e";if(!${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x6aos\x63\x68b\x69\x72\x63\x68k"]}["\x69\x73_v\x69\x72t\x75\x61l"])${$xdyfhoa}&=false;}${"\x47\x4c\x4fB\x41L\x53"}["\x6d\x75\x79\x72r\x6ej\x65\x6e"]="c\x75\x72\x72\x65\x6e\x63y";${"\x47L\x4f\x42\x41L\x53"}["p\x64\x75\x65j\x66\x74"]="i\x6ev\x6f\x69c\x65";${$mhmxenejob}=array("{f\x69\x72\x73tn\x61m\x65}"=>$customer->firstname,"{\x6c\x61stna\x6de}"=>$customer->lastname,"{e\x6da\x69l}"=>$customer->email,"{\x64eliv\x65r\x79\x5fbl\x6f\x63\x6b_\x74\x78\x74}"=>$this->_getFormatedAddress(${${"GLO\x42\x41\x4c\x53"}["fah\x6de\x71\x75\x6f\x77a"]},"\n"),"{\x69\x6evo\x69\x63\x65_b\x6c\x6fc\x6b\x5f\x74\x78t}"=>$this->_getFormatedAddress(${${"\x47\x4cOB\x41L\x53"}["p\x64\x75ejft"]},"\n"),"{\x64\x65\x6c\x69\x76e\x72\x79_\x62\x6co\x63\x6b\x5f\x68t\x6d\x6c}"=>$this->_getFormatedAddress(${${"\x47\x4c\x4f\x42A\x4cS"}["\x74\x6e\x75\x70lw\x72vs\x74\x77\x6f"]},"<b\x72 />",array("\x66\x69rstnam\x65"=>"<\x73\x70an \x73\x74\x79\x6ce\x3d\x22f\x6fn\x74-\x77e\x69\x67ht:bo\x6c\x64;\x22>\x25\x73\x3c/s\x70\x61n>","l\x61stna\x6de"=>"<sp\x61\x6e \x73ty\x6ce=\"font-\x77eigh\x74:\x62ol\x64\x3b\x22\x3e%\x73</\x73\x70a\x6e>")),"{\x69n\x76\x6f\x69\x63e\x5f\x62\x6coc\x6b_\x68\x74\x6dl}"=>$this->_getFormatedAddress(${${"\x47\x4cO\x42\x41\x4cS"}["g\x75gh\x70\x62n\x72\x69"]},"<b\x72\x20/>",array("f\x69\x72st\x6eame"=>"<s\x70\x61\x6e \x73t\x79le=\x22\x66ont-\x77e\x69g\x68\x74:b\x6f\x6c\x64;\x22>%s</s\x70a\x6e>","\x6cas\x74\x6ea\x6de"=>"<s\x70\x61n s\x74\x79le\x3d\x22\x66o\x6et-\x77\x65\x69\x67\x68\x74:\x62\x6f\x6cd\x3b\"\x3e%\x73</spa\x6e\x3e")),"{\x64\x65\x6ci\x76e\x72y_co\x6d\x70a\x6ey}"=>$delivery->company,"{de\x6ci\x76e\x72\x79_\x66ir\x73\x74\x6ea\x6de}"=>$delivery->firstname,"{de\x6c\x69ve\x72y\x5f\x6cas\x74\x6eame}"=>$delivery->lastname,"{d\x65\x6civ\x65\x72y\x5f\x61ddre\x73s1}"=>$delivery->address1,"{\x64e\x6c\x69v\x65\x72\x79\x5faddr\x65\x73s2}"=>$delivery->address2,"{d\x65\x6ci\x76e\x72y_\x63\x69\x74y}"=>$delivery->city,"{\x64e\x6c\x69\x76ery_\x70o\x73ta\x6c_cod\x65}"=>$delivery->postcode,"{\x64\x65\x6c\x69\x76\x65\x72y\x5fco\x75\x6etry}"=>$delivery->country,"{d\x65liver\x79\x5f\x73\x74\x61t\x65}"=>$delivery->id_state?$delivery_state->name:"","{\x64el\x69v\x65\x72y\x5f\x70\x68o\x6e\x65}"=>($delivery->phone)?$delivery->phone:$delivery->phone_mobile,"{d\x65li\x76e\x72\x79_o\x74\x68\x65r}"=>$delivery->other,"{inv\x6f\x69ce_co\x6d\x70\x61\x6e\x79}"=>$invoice->company,"{\x69nvo\x69\x63e_v\x61\x74_\x6e\x75m\x62er}"=>$invoice->vat_number,"{\x69\x6e\x76o\x69ce_\x66\x69rs\x74\x6ea\x6de}"=>$invoice->firstname,"{\x69\x6evoic\x65_la\x73\x74\x6e\x61me}"=>$invoice->lastname,"{\x69nvo\x69c\x65_\x61d\x64\x72\x65ss\x32}"=>$invoice->address2,"{i\x6e\x76\x6f\x69\x63\x65_a\x64d\x72\x65\x73\x731}"=>$invoice->address1,"{\x69n\x76oi\x63\x65_ci\x74\x79}"=>$invoice->city,"{i\x6ev\x6f\x69ce_\x70\x6fst\x61l_code}"=>$invoice->postcode,"{\x69\x6e\x76\x6f\x69c\x65_\x63\x6funtr\x79}"=>$invoice->country,"{\x69nvo\x69\x63\x65_s\x74a\x74e}"=>$invoice->id_state?$invoice_state->name:"","{i\x6ev\x6fi\x63e_\x70\x68\x6f\x6e\x65}"=>($invoice->phone)?$invoice->phone:$invoice->phone_mobile,"{i\x6evoice\x5f\x6f\x74\x68e\x72}"=>$invoice->other,"{\x6f\x72\x64\x65r_\x6ea\x6de}"=>$order->getUniqReference(),"{\x64at\x65}"=>Tools::displayDate(date("Y-m-d\x20\x48:i:s"),null),"{carr\x69\x65\x72}"=>(${${"\x47\x4c\x4f\x42\x41L\x53"}["\x69\x69\x78\x6e\x73k"]}?$this->getL("\x4eo\x20\x43a\x72r\x69\x65\x72"):$carrier->name),"{p\x61yment}"=>Tools::substr($order->payment,0,32),"{\x70roduc\x74\x73}"=>$this->formatProductAndVoucherForEmail(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x73p\x6c\x74\x75\x64\x6f\x77\x66"]}),"{d\x69\x73cou\x6e\x74s}"=>$this->formatProductAndVoucherForEmail(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x73\x6al\x74\x79w"]}),"{total_\x70a\x69\x64}"=>Tools::displayPrice($order->total_paid,${${"G\x4c\x4f\x42\x41L\x53"}["d\x6b\x6f\x6b\x6e\x6e\x6b\x66"]},false),"{t\x6f\x74a\x6c\x5fp\x72od\x75\x63t\x73}"=>Tools::displayPrice($order->total_paid-$order->total_shipping-$order->total_wrapping+$order->total_discounts,${${"\x47LOB\x41\x4cS"}["\x6du\x79\x72\x72\x6ej\x65\x6e"]},false),"{t\x6ftal\x5f\x64\x69s\x63\x6fu\x6et\x73}"=>Tools::displayPrice($order->total_discounts,${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x64kok\x6en\x6bf"]},false),"{tot\x61\x6c_s\x68i\x70\x70\x69\x6eg}"=>Tools::displayPrice($order->total_shipping,${$faykovtn},false),"{\x74o\x74a\x6c\x5f\x77r\x61\x70\x70in\x67}"=>Tools::displayPrice($order->total_wrapping,${$smvwlvckvju},false));${"\x47LO\x42A\x4cS"}["\x78\x6d\x78\x77t\x76v\x71u\x71\x76"]="\x64a\x74\x61";if((int)Configuration::get("\x50\x53_I\x4eV\x4f\x49C\x45")&&$order->invoice_number){$ulfjcle="\x66\x69\x6c\x65\x5f\x61\x74\x74\x61c\x68em\x65\x6e\x74";${"\x47\x4c\x4f\x42A\x4cS"}["rz\x6e\x6cd\x78sj"]="pd\x66";${${"\x47L\x4f\x42\x41LS"}["r\x7anld\x78sj"]}=new PDF($order->getInvoicesCollection(),PDF::TEMPLATE_INVOICE,${${"\x47L\x4f\x42\x41\x4c\x53"}["\x61r\x6b\x73\x62\x6c\x62g\x66d\x6b"]});${$ulfjcle}["\x63\x6fn\x74\x65n\x74"]=$pdf->render(false);${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x6e\x74\x6ao\x79\x6c\x72\x76"]}["\x6ea\x6d\x65"]=Configuration::get("P\x53_\x49\x4eV\x4fI\x43\x45\x5f\x50RE\x46IX",(int)$order->id_lang,null,$order->id_shop).sprintf("%0\x36\x64",$order->invoice_number)."\x2ep\x64f";${${"\x47L\x4fBA\x4c\x53"}["n\x74j\x6fyl\x72\x76"]}["\x6d\x69m\x65"]="applica\x74i\x6fn/\x70d\x66";}else${$qhmltmvo}=null;${${"\x47\x4cO\x42\x41\x4cS"}["\x78mx\x77tvv\x71\x75q\x76"]}=AgilePrepaidCredit::replace_amount2pay(${${"G\x4cO\x42A\x4c\x53"}["pb\x66\x62\x6b\x77"]});if(Validate::isEmail($customer->email)){${"\x47\x4cO\x42\x41\x4cS"}["x\x71\x61\x65b\x65\x6b\x72"]="\x66\x69\x6c\x65\x5f\x61\x74\x74\x61c\x68\x65\x6d\x65\x6e\x74";Mail::Send((int)$order->id_lang,"order_c\x6fn\x66",Mail::l('Order confirmation',(int)$order->id_lang),${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x70\x62f\x62k\x77"]},$customer->email,$customer->firstname." ".$customer->lastname,null,null,${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x78\x71\x61\x65\x62\x65\x6b\x72"]},null,_PS_MAIL_DIR_,false,(int)$order->id_shop);}}}
?>

Function Calls

None

Variables

None

Stats

MD5 72519a151b8a3280b0143a0afb6b2de9
Eval Count 0
Decode Time 221 ms