public static function get_payment_info_paychained() { $puuempdmk = "id_seller"; $wpflcvd = "seller_sales_4com"; $cpetamjwwv = "seller_sales_4payment"; global $cookie, $cart; ${"GLOBALS"}["trfikxjbx"] = "store_paypalemail"; $nqnqquqgr = "seller_sales_4com"; ${$cpetamjwwv} = AgileMultipleSeller::get_seller_sales_from_cart($cart->id, true, true, true); ${"GLOBALS"}["wvfscupoq"] = "payments"; ${"GLOBALS"}["jqyrfshjimu"] = "store_paypalemail"; ${$nqnqquqgr} = AgileMultipleSeller::get_seller_sales_from_cart($cart->id, true, true, false); if (empty(${${"GLOBALS"}["zkaqti"]})) { return; } ${${"GLOBALS"}["wvfscupoq"]} = array(); $lslimubn = "payments"; ${"GLOBALS"}["icfhhgar"] = "payments"; foreach (${$wpflcvd} as ${$puuempdmk} => ${${"GLOBALS"}["eynxyyuyuo"]}) { ${"GLOBALS"}["dsjoejcwhld"] = "seller_commission_amount"; $hwioosaskbpo = "id_seller"; $hxvhmowjc = "payments"; $fjfgeknww = "sales_amount_4com"; ${"GLOBALS"}["slhpjopwg"] = "seller_payment_amount"; $qampyync = "id_seller"; $myxwoehynrl = "seller_paypal_email"; ${$myxwoehynrl} = self::getSelllerPaypalEmail(${$qampyync}); $wkmldijjcg = "id_seller"; ${${"GLOBALS"}["nwuqak"]} = AgileSellerCommission::get_seller_commission_amount(${$hwioosaskbpo}, ${$fjfgeknww}, $cart->id_currency); ${"GLOBALS"}["qpmaobwhe"] = "seller_payment_amount"; if (${${"GLOBALS"}["nwuqak"]} <= 0) { ${${"GLOBALS"}["dsjoejcwhld"]} = 0; } ${${"GLOBALS"}["slhpjopwg"]} = ${${"GLOBALS"}["zkaqti"]}[${$wkmldijjcg}] - ${${"GLOBALS"}["nwuqak"]}; if (floatval(${${"GLOBALS"}["dcdrpqmtzn"]}) < 0) { return; } ${$hxvhmowjc}[${${"GLOBALS"}["qcrytsf"]}] = array("email" => ${${"GLOBALS"}["veauutv"]}, "amount" => ${${"GLOBALS"}["qpmaobwhe"]}); } ${${"GLOBALS"}["trfikxjbx"]} = Configuration::get("AGILE_PAYPALAD_BUSINESS"); if (empty(${${"GLOBALS"}["ouzggjvkw"]})) { return; } ${${"GLOBALS"}["icfhhgar"]}[0] = array("email" => ${${"GLOBALS"}["jqyrfshjimu"]}, "amount" => $cart->getOrderTotal(true, Cart::BOTH)); return ${$lslimubn}; }
public function initContent() { $dujxmdimr = "cms"; $jewjbpezikv = "link_terms"; parent::initContent(); $fojrmoqrqht = "paycommission_url"; global $cookie, $link, $smarty; $this->context->controller->addJQueryPlugin("fancybox"); $this->context->controller->addJQueryUI("ui.sortable"); ${"GLOBALS"}["rfvrgtigtrw"] = "account_balance"; $this->context->controller->addJQueryUI("ui.draggable"); $this->context->controller->addJQueryUI("effects.transfer"); ${${"GLOBALS"}["xwbhtra"]} = Context::getContext()->cookie->id_lang; ${${"GLOBALS"}["hnxcwphyjtg"]} = new CMS((int) Configuration::get("AGILE_MS_SELLER_TERMS"), (int) $cookie->id_lang); $xmyqsx = "paycommission_url"; ${${"GLOBALS"}["cgxcwcw"]} = $link->getCMSLink(${$dujxmdimr}, $cms->link_rewrite, true); $mwkwpdd = "link_terms"; if (!strpos(${${"GLOBALS"}["cgxcwcw"]}, "?")) { ${${"GLOBALS"}["cgxcwcw"]} .= "?content_only=1"; } else { ${$mwkwpdd} .= "&content_only=1"; } $smarty->assign(array("link_terms" => ${$jewjbpezikv}, "id_cms_seller_terms" => intval(Configuration::get("AGILE_MS_SELLER_TERMS")))); ${${"GLOBALS"}["xfocwqwkpk"]} = 0; ${$fojrmoqrqht} = ""; $dsmoyovxdiy = "token_balance"; if (Module::isInstalled("agilesellercommission")) { ${"GLOBALS"}["gfmbcvrxuee"] = "account_balance"; $conmijg = "account_balance"; include_once _PS_ROOT_DIR_ . "/modules/agilesellercommission/agilesellercommission.php"; ${"GLOBALS"}["xteysyfbyd"] = "paycommission_url"; include_once _PS_ROOT_DIR_ . "/modules/agilesellercommission/SellerCommission.php"; $kgsttmvgw = "paydata"; ${"GLOBALS"}["qsgosovu"] = "paydata"; ${$conmijg} = AgileSellerManager::getAccountBalance($this->sellerinfo->id_seller); ${${"GLOBALS"}["qsgosovu"]} = array("record_type" => SellerCommission::RECORD_TYPE_SELLER_PAY_STORE, "id_seller" => $this->sellerinfo->id_seller, "amount_to_pay" => -${${"GLOBALS"}["gfmbcvrxuee"]}, "retkey" => Tools::getValue("token"), "paykey" => Tools::encrypt($this->sellerinfo->id_seller), "isfront" => 1); ${${"GLOBALS"}["xteysyfbyd"]} = AgileSellerCommission::get_paycommission_url(${$kgsttmvgw}); } ${${"GLOBALS"}["gmrvjuvp"]} = 0; if (Module::isInstalled("agileprepaidcredit")) { include_once _PS_ROOT_DIR_ . "/modules/agileprepaidcredit/agileprepaidcredit.php"; ${${"GLOBALS"}["gmrvjuvp"]} = AgilePrepaidCredit::GetTokenBalance($cookie->id_customer); } ${${"GLOBALS"}["pqffvnkmpnf"]} = (int) Configuration::get("PS_CURRENCY_DEFAULT"); self::$smarty->assign(array("seller_tab_id" => 1, "num_products" => $this->isSeller ? AgileSellerManager::getNumOfProducts($this->sellerinfo->id_seller) : 0, "num_orders" => $this->isSeller ? AgileSellerManager::getNumOfOrders($this->sellerinfo->id_seller) : 0, "totals_sold" => AgileSellerManager::getTotalAmountSold($this->sellerinfo->id_seller), "currency" => new Currency(${${"GLOBALS"}["pqffvnkmpnf"]}), "comcurrency" => new Currency((int) Configuration::get("ASC_COMMISSION_CURRENCY")), "paycommission_url" => ${$xmyqsx}, "account_balance" => ${${"GLOBALS"}["rfvrgtigtrw"]}, "token_balance" => ${$dsmoyovxdiy}, "membership_module_integrated" => (Module::isInstalled("agilemembership") and intval(Configuration::get("AGILE_MEMBERSHIP_SELLER_INTE")) > 0) ? 1 : 0, "request_T2B" => $this->l('CHANGE TOKENS TO BALANCE'), "request_B2T" => $this->l('CHANGE BALANCE TO TOKENS'), "request_MPR" => $this->l('MAKE A PEYMENT REQUEST'))); $this->setTemplate("sellersummary.tpl"); }