Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
domainsigner.php
1
<?php
2
3
namespace
Bitrix\Sale\PaySystem\Robokassa
;
4
5
use
Bitrix\Main
;
6
7
class
DomainSigner
8
{
9
private
string
$domain;
10
11
public
function
__construct
(
string
$domain)
12
{
13
$this->domain = $domain;
14
}
15
16
public
function
signDomain
(): string
17
{
18
if
(Main\Loader::includeModule(
'bitrix24'
))
19
{
20
return \CBitrix24::RequestSign($this->domain);
21
}
22
23
$privateKey = Main\Analytics\Counter::getPrivateKey();
24
return
md5($this->domain . $privateKey);
25
}
26
27
public
function
isValidDomain
(
string
$signedDomain): bool
28
{
29
return
$signedDomain === $this->
signDomain
();
30
}
31
}
Bitrix\Sale\PaySystem\Robokassa\DomainSigner
Definition
domainsigner.php:8
Bitrix\Sale\PaySystem\Robokassa\DomainSigner\__construct
__construct(string $domain)
Definition
domainsigner.php:11
Bitrix\Sale\PaySystem\Robokassa\DomainSigner\isValidDomain
isValidDomain(string $signedDomain)
Definition
domainsigner.php:27
Bitrix\Sale\PaySystem\Robokassa\DomainSigner\signDomain
signDomain()
Definition
domainsigner.php:16
Bitrix\Main
Bitrix\Sale\PaySystem\Robokassa
Definition
domainsigner.php:3
modules
sale
lib
paysystem
robokassa
domainsigner.php
Создано системой
1.10.0