/** * проверяет клиента по ip * * @throws CloudPaymentException */ private function filter() { $ip = @$_SERVER['REMOTE_ADDR']; if (empty($ip)) { throw new CloudPaymentException('lost client ip address'); } $allowIps = Config::get('payments.cloud.allowIp'); if (!empty($allowIps) && !in_array($ip, $allowIps) && strpos($ip, '10.') !== 0 && strpos($ip, '192.') !== 0) { Reporter::payExternalDeny($ip, $allowIps); throw new CloudPaymentException('disallow ip address'); } Reporter::payExternalAllow($ip); }