echo "<br />Error Severity Code: " . $ErrorSeverityCode; } } if (!isset($_POST['paymentOption'])) { // Confirm the order $_cid = 0; $templateName = $plugin->get_lang('PaymentMethods'); $interbreadcrumb[] = array("url" => "list.php", "name" => $plugin->get_lang('CourseListOnSale')); $tpl = new Template($templateName); if ($_SESSION['bc_codetext'] === 'THIS_IS_A_SESSION') { $tpl->assign('isSession', 'YES'); $tpl->assign('session', sessionInfo($_SESSION['bc_code'])); } else { $tpl->assign('course', courseInfo($_SESSION['bc_code'])); } $tpl->assign('server', $_configuration['root_web']); $tpl->assign('title', $_SESSION['bc_title']); $tpl->assign('price', $_SESSION['Payment_Amount']); $tpl->assign('currency', $_SESSION['bc_currency_type']); if (!isset($_SESSION['_user'])) { $tpl->assign('name', $_SESSION['bc_user']['firstName'] . ' ' . $_SESSION['bc_user']['lastName']); $tpl->assign('email', $_SESSION['bc_user']['mail']); $tpl->assign('user', $_SESSION['bc_user']['username']); } else { $tpl->assign('name', $_SESSION['bc_user']['firstname'] . ' ' . $_SESSION['bc_user']['lastname']); $tpl->assign('email', $_SESSION['bc_user']['email']);
array('where'=> array('variable = ?' => array('buycourses_include_sessions'))) ); $result = array_shift($selectedValue); if ($codeType === 'SESSION' && $result['selected_value'] === 'true') { $tableSession = Database::get_main_table(TABLE_MAIN_SESSION); $tableBuySession = Database::get_main_table(TABLE_BUY_SESSION); $sql = "SELECT a.session_id, a.name, a.date_start, a.date_end, a.price FROM $tableBuySession a, $tableSession b WHERE a.session_id = ".$code." AND a.session_id = b.id;"; $res = Database::query($sql); $row = Database::fetch_assoc($res); $_SESSION['bc_title'] = $row['name']; $_SESSION['bc_codetext'] = 'THIS_IS_A_SESSION'; $tpl->assign('session', sessionInfo($code)); $tpl->assign('isSession', 'YES'); } else { $tableCourse = Database::get_main_table(TABLE_MAIN_COURSE); $tableBuyCourse = Database::get_main_table(TABLE_BUY_COURSE); $sql = "SELECT a.price, a.title, b.code FROM $tableBuyCourse a, $tableCourse b WHERE a.course_id = " . $code . " AND a.course_id = b.id;"; $res = Database::query($sql); $row = Database::fetch_assoc($res); $_SESSION['bc_title'] = $row['title']; $_SESSION['bc_codetext'] = $row['code']; $tpl->assign('course', courseInfo($code)); } $_SESSION['Payment_Amount'] = number_format($row['price'], 2, '.', '');
$ErrorShortMsg = urldecode($resArray["L_SHORTMESSAGE0"]); $ErrorLongMsg = urldecode($resArray["L_LONGMESSAGE0"]); $ErrorSeverityCode = urldecode($resArray["L_SEVERITYCODE0"]); echo "<br />SetExpressCheckout API call failed. "; echo "<br />Detailed Error Message: " . $ErrorLongMsg; echo "<br />Short Error Message: " . $ErrorShortMsg; echo "<br />Error Code: " . $ErrorCode; echo "<br />Error Severity Code: " . $ErrorSeverityCode; } } if ($_POST['payment_type'] == "Transfer") { $_cid = 0; $templateName = $plugin->get_lang('PaymentMethods'); $interbreadcrumb[] = array("url" => "list.php", "name" => $plugin->get_lang('CourseListOnSale')); $tpl = new Template($templateName); $_SESSION['bc_codetext'] === 'THIS_IS_A_SESSION' ? $tpl->assign('session', sessionInfo($_SESSION['bc_code'])) : $tpl->assign('course', courseInfo($_SESSION['bc_code'])); $tpl->assign('server', $_configuration['root_web']); $tpl->assign('title', $_SESSION['bc_title']); $tpl->assign('price', $_SESSION['Payment_Amount']); $tpl->assign('currency', $_SESSION['bc_currency_type']); if (!isset($_SESSION['_user'])) { $tpl->assign('name', $_SESSION['bc_user']['firstName'] . ' ' . $_SESSION['bc_user']['lastName']); $tpl->assign('email', $_SESSION['bc_user']['mail']); $tpl->assign('user', $_SESSION['bc_user']['username']); } else { $tpl->assign('name', $_SESSION['bc_user']['firstname'] . ' ' . $_SESSION['bc_user']['lastname']); $tpl->assign('email', $_SESSION['bc_user']['email']); $tpl->assign('user', $_SESSION['bc_user']['username']); } //Get bank list account $accountsList = listAccounts();