Skip to content

Commit

Permalink
openpayz: privatmulifa cuts user realname over 50 bytes len
Browse files Browse the repository at this point in the history
  • Loading branch information
nightflyza committed Dec 11, 2024
1 parent a8522ba commit 2ef7b12
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.1 rev 9267
1.5.1 rev 9268
23 changes: 13 additions & 10 deletions docs/openpayz/frontend/privatmultifa/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* Кінець секції налаштувань
*/

include ("../../libs/api.openpayz.php");
include("../../libs/api.openpayz.php");

error_reporting(E_ALL);

Expand Down Expand Up @@ -106,9 +106,9 @@ function pbx_RequestGet() {
*/
function pbx_ispos($string, $search) {
if (strpos($string, $search) === false) {
return(false);
return (false);
} else {
return(true);
return (true);
}
}

Expand All @@ -126,7 +126,7 @@ function pbx_UserGetAllRealnames() {
$result[$each['login']] = $each['realname'];
}
}
return($result);
return ($result);
}

/**
Expand Down Expand Up @@ -157,7 +157,7 @@ function pbx_UserGetAllMobiles() {
$result[$each['login']] = $each['mobile'];
}
}
return($result);
return ($result);
}

/**
Expand Down Expand Up @@ -201,7 +201,7 @@ function pbx_GenerateHash($size = 12) {
* @return array
*/
function pbx_AddressGetFulladdresslist() {
//наглая заглушка
//наглая заглушка
$alterconf['ZERO_TOLERANCE'] = 0;
$alterconf['CITY_DISPLAY'] = 0;
$result = array();
Expand All @@ -227,7 +227,7 @@ function pbx_AddressGetFulladdresslist() {
}
}
}
return($result);
return ($result);
}

/**
Expand All @@ -244,6 +244,9 @@ function pbx_ReplySearch($customerid, $UsrBalanceDecimals = -1) {
$allmobiles = pbx_UserGetAllMobiles();
$userdata = pbx_UserGetStargazerData($customerLogin);
$agentData = getAgentData($customerLogin);
$realName = @$allrealnames[$customerLogin];
$realName = (mb_strlen($realName, 'UTF-8') > 50) ? mb_substr($realName, 0, 47, 'utf-8') . '...' : $realName;

if (!empty($agentData)) {
$agentData = json_decode($agentData, true);
if (!empty($agentData)) {
Expand Down Expand Up @@ -277,7 +280,7 @@ function pbx_ReplySearch($customerid, $UsrBalanceDecimals = -1) {
<Transfer xmlns="http://debt.privatbank.ua/Transfer" interface="Debt" action="Search">
<Data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="DebtPack" billPeriod="' . date("Ym") . '">
<PayerInfo billIdentifier="' . $customerid . '">
<Fio>' . @$allrealnames[$customerLogin] . '</Fio>
<Fio>' . $realName . '</Fio>
<Phone>' . @$allmobiles[$customerLogin] . '</Phone>
<Address>' . @$alladdress[$customerLogin] . '</Address>
</PayerInfo>
Expand All @@ -289,7 +292,7 @@ function pbx_ReplySearch($customerid, $UsrBalanceDecimals = -1) {
</DebtInfo>
<ServiceName>' . ISP_SERVICE_NAME . '</ServiceName>
<PayerInfo billIdentifier="' . $customerid . '" ls="' . $customerid . '">
<Fio>' . @$allrealnames[$customerLogin] . '</Fio>
<Fio>' . $realName . '</Fio>
<Phone>' . @$allmobiles[$customerLogin] . '</Phone>
<Address>' . @$alladdress[$customerLogin] . '</Address>
</PayerInfo>
Expand Down Expand Up @@ -442,7 +445,7 @@ function pbx_extractCustomerId($xmlParse, $validPayIdF) {
}
}
}
return($result);
return ($result);
}

/**
Expand Down

0 comments on commit 2ef7b12

Please sign in to comment.