コード例 #1
0
ファイル: sellerhistory.php プロジェクト: evilscripts/gy
 public function initContent()
 {
     ${"GLOBALS"}["wdbckpmvjlkl"] = "commssionrecords_nb";
     parent::initContent();
     ${"GLOBALS"}["fbrnoyizczqn"] = "commssionrecords";
     ${${"GLOBALS"}["hnfheumjhbu"]} = (int) Configuration::get("ASC_COMMISSION_CURRENCY");
     ${${"GLOBALS"}["wdbckpmvjlkl"]} = SellerCommission::getRecordNb($this->sellerinfo->id_seller);
     $this->pagination(${${"GLOBALS"}["tefcbpam"]});
     ${${"GLOBALS"}["fbrnoyizczqn"]} = SellerCommission::getRecords($this->sellerinfo->id_seller, $this->p, $this->n, $this->orderBy, $this->orderWay);
     self::$smarty->assign(array("seller_tab_id" => 7, "commssionrecords" => ${${"GLOBALS"}["jeysefw"]}, "id_commission_currency" => ${${"GLOBALS"}["hnfheumjhbu"]}));
     $this->setTemplate("sellerhistory.tpl");
 }
コード例 #2
0
 protected function updateSellerCommissionRecordType($record_type, $txn_id)
 {
     if (Module::isInstalled('agilesellercommission')) {
         require_once _PS_ROOT_DIR_ . "/modules/agilesellercommission/SellerCommission.php";
         if ($this->currentOrder > 0) {
             SellerCommission::updateRecordType($this->currentOrder, $record_type, $txn_id);
         }
     }
 }
コード例 #3
0
 public static function convert_balance_to_token($id_customer, $amount_to_convert, $desc)
 {
     $cakdiwup = "account_balance";
     ${"GLOBALS"}["wydinnxpjg"] = "currency";
     global $cookie;
     ${"GLOBALS"}["qdzrwqyyfe"] = "token_units";
     if (!Module::isInstalled("agileprepaidcredit")) {
         return;
     }
     if (!Module::isInstalled("agilesellercommission")) {
         return;
     }
     ${"GLOBALS"}["vwmwnyrlbhw"] = "token_units";
     require_once _PS_ROOT_DIR_ . "/modules/agileprepaidcredit/agileprepaidcredit.php";
     $czpafvny = "sellerinfo";
     $sssdvetl = "apcm";
     $cebtzbvhkvjb = "amount_to_convert";
     require_once _PS_ROOT_DIR_ . "/modules/agileprepaidcredit/CustomerCredit.php";
     require_once _PS_ROOT_DIR_ . "/modules/agilesellercommission/SellerCommission.php";
     require_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
     if (${${"GLOBALS"}["xnhalilbkn"]} <= 0) {
         return Tools::displayError("Invalid convert amount.");
     }
     ${${"GLOBALS"}["atnqtpp"]} = new SellerInfo(SellerInfo::getIdByCustomerId(${${"GLOBALS"}["tivjjbgb"]}));
     ${"GLOBALS"}["cdokbpvfy"] = "amount_to_convert";
     if (!Validate::isLoadedObject(${$czpafvny})) {
         return Tools::displayError("Seller info can not be found.");
     }
     ${${"GLOBALS"}["mvofkxku"]} = AgileSellerManager::getAccountBalance($sellerinfo->id_seller);
     if (${$cakdiwup} < ${${"GLOBALS"}["cdokbpvfy"]}) {
         return Tools::displayError("You do not have enough account balance.");
     }
     ${${"GLOBALS"}["wydinnxpjg"]} = new Currency(Configuration::get("ASC_COMMISSION_CURRENCY"));
     ${${"GLOBALS"}["vwmwnyrlbhw"]} = AgilePrepaidCredit::ConvertPrice2Tokens($currency->id, ${${"GLOBALS"}["xnhalilbkn"]});
     ${${"GLOBALS"}["givutwwah"]} = new CustomerCredit();
     $cc->id = 0;
     $cc->id_customer = $cookie->id_customer;
     $cc->id_order = 0;
     ${$sssdvetl} = new AgilePrepaidCredit();
     if (version_compare($apcm->version, "1.4.9", ">=")) {
         $cc->id_reason = AgilePrepaidCredit::CREDIT_REASON_FROM_SELLERCOMMISSION;
     }
     $cc->units = ${${"GLOBALS"}["qdzrwqyyfe"]};
     $cc->date_add = date("Y-m-d H:i:s");
     $cc->add();
     SellerCommission::addCreditMemoRecord($sellerinfo->id_seller, SellerCommission::RECORD_TYPE_SELLER_DEBIT, ${$cebtzbvhkvjb}, ${${"GLOBALS"}["uzllxeigbbj"]});
     return "";
 }
コード例 #4
0
    }
} else {
    $errors .= $paypal->getL('verified');
}
if (!empty($errors) and isset($_POST['custom'])) {
    $_SESSION['agile_paypal_validating_order'] = 1;
    if ($_POST['payment_status'] == 'Pending') {
        $paypal->validateOrder(intval($_POST['custom']), _PS_OS_PAYPAL_, floatval($_POST['mc_gross']), $paypal->displayName, $paypal->getL('transaction') . $_POST['txn_id'] . '<br />' . $errors, array(), NULL, false, $customer->secure_key);
    } else {
        $paypal->validateOrder(intval($_POST['custom']), _PS_OS_ERROR_, 0, $paypal->displayName, $errors . '<br />', array(), NULL, false, $customer->secure_key);
    }
    $_SESSION['agile_paypal_validating_order'] = 0;
}
if (intval($paypal->currentOrder) > 0) {
    $apt = new AgilePaypalTxn();
    $apt->id_cart = intval($_POST['custom']);
    $apt->id_order = $paypal->currentOrder;
    $apt->paypal_txn = $_POST['txn_id'];
    $apt->subscr_id = isset($_POST['subscr_id']) ? $_POST['subscr_id'] : '';
    $apt->remark = 'Payment status:' . $_POST['payment_status'];
    $apt->add();
}
if (intval($paypal->currentOrder) > 0 and Module::isInstalled('agilesellercommission')) {
    include_once dirname(__FILE__) . '/../../modules/agilesellercommission/agilesellercommission.php';
    include_once dirname(__FILE__) . '/../../modules/agilesellercommission/SellerCommission.php';
    SellerCommission::updateRecordType($paypal->currentOrder, intval(Tools::getValue('invoice')), $_POST['txn_id']);
}
if ($customer_isnew == 1 and Module::isInstalled('agilemultipleseller') and intval(Configuration::get('AGILE_MS_CUSTOMER_SELLER')) == 1 and intval(Configuration::get('AGILE_MS_AUTO_SIGNUP')) == 1) {
    include_once dirname(__FILE__) . '/../../modules/agilemultipleseller/agilemultipleseller.php';
    AgileMultipleSeller::createSellerAccount(new Customer($customer->id));
}