1C-Bitrix Module
Production integration module for 1C-Bitrix projects.
Overview
Install the module, set API endpoint and key, then call helper methods from your business logic to enrich requests with GEO/IP context.
Setup Guide
- Download the ZIP package.
- Install module in 1C-Bitrix.
- Open module settings and add API URL + API key.
- Use module component and helper API in your templates/controllers.
Implementation Notes
- Install and activate the package in your CMS.
- Set API endpoint and API key in module settings.
- Validate client IP detection and User-Agent forwarding.
- Call lookup before auth/checkout/risk decisions.
- Add fallback handling for timeout/429/5xx responses.
Recommended flow: GEO/IP context first, business rules second.
Minimum CMS Version
1C-Bitrix 21.0+
README: implementation details
Bitrix module quick flow:
1) Copy integration/bitrix/portcore.geoip -> <bitrix_root>/bitrix/modules/portcore.geoip
2) Install module in admin: Settings -> Module list
3) Save API Endpoint URL + API Key in module settings
Component:
$APPLICATION->IncludeComponent('portcore:geoip.summary', '.default', ['GEOIP_ARRAY' => $geo]);
Lookup:
\Bitrix\Main\Loader::includeModule('portcore.geoip');
$geo = \Portcore\Geoip\Client::getByIp('2001:bc8:1da0:1e:da5e:d3ff:fe6f:dc87');
Request context:
- validates IPv4/IPv6
- user_id: bxu_{user_id} or bxs_{session_hash}
- user_agent from request (fallback Bitrix-PortcoreGeoip/1.0)