/** * Активирует метод платежа по его типу и ИД пользователя * * @param integer $type Тип метода платежа @see WalletTypes::getAllTypes(); * @param integer $uid ИД Пользователя * @return mixed */ public static function setActiveWallet($type, $uid) { global $DB; if (!WalletTypes::isValidType($type)) { return false; } Wallet::clearActiveWallet($uid); $sql = "UPDATE bill_wallet SET active = true WHERE type = ?i AND uid = ?i"; return $DB->query($sql, $type, $uid); }