function PayFromPaysystem(){ global $lang, $config, $smarty, $dbconn, $user; $form['file_name'] = "ecards.php"; $id_order = (isset($_REQUEST["id_order"]) && intval($_REQUEST["id_order"]) > 0) ? intval($_REQUEST["id_order"]) : null; if ($id_order == null) { header("Location: ".$config['server'].$config['site_root']."/".$form['file_name']); } else { $settings = GetSiteSettings(array('site_unit_costunit')); $paysys = $_REQUEST["paysys"]; //получаем переменную $card = GetCardOrderData($id_order); $amount = $card["price"]; if ($amount == '0.00') { header("Location: ".$config['server'].$config['site_root']."/".$form['file_name']); } $product_name = $amount." ".$settings["site_unit_costunit"]." ".$lang["cards"]["payment_product"]; $dbconn->Execute("INSERT INTO ".BILLING_REQUESTS_TABLE." (id_user, id_product, count_curr, currency, date_send, status, paysystem, id_group) VALUES ('".$user[0]."', '-2', '".$amount."', '".$settings["abbr"]."','".date("Y-m-d H:i:s")."','send','".$paysys."','".$card['id_order']."')"); $id_trunzaction = $dbconn->Insert_ID(); include_once "./include/systems/functions/".$paysys.".php";//инклуд без фильтраций MakePayment($paysys, $amount, $settings["site_unit_costunit"], $id_trunzaction, $product_name, array("force_disable_recurring"=>1)); header("Location: ".$config['server'].$config['site_root']."/".$form['file_name']."?sel=my_orders"); } }