示例#1
0
/**
 * Функция получения настроек соединения со стореджем платежей пользователя
 * @param int $userId идентификатор пользователя
 * @return false|array массив настроек соединения со стореджем пользователя или FALSE
 */
function payment_getconnection($userId)
{
    $config = payment_config();
    foreach ($config['shard'] as $k => $v) {
        if ($userId <= $k) {
            return $v;
        }
    }
    return false;
}
示例#2
0
function edit_payment($params)
{
    global $tpl, $template, $config, $mysql, $lang, $twig;
    $tpath = locatePluginTemplates(array('config/main', 'config/add_currencies'), 'eshop', 1);
    $id = $_REQUEST['id'];
    $config_filename = dirname(__FILE__) . '/payment/' . $id . '/config.php';
    if (file_exists($config_filename)) {
        include_once $config_filename;
        payment_config($id);
    } else {
        $error = "Файл {$config_filename} не существует";
        msg(array("type" => "error", "text" => $error));
    }
}