Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmiBX
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitrix
AmiBX
Commits
3c3c2595
Commit
3c3c2595
authored
Dec 10, 2021
by
Kulya
😊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Payment Events triggers
parent
9e3522b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
2 deletions
+53
-2
.gitignore
.gitignore
+1
-0
AloVoiceRest.php
vendor/alovoice/src/AloVoiceRest.php
+50
-1
BillzRest.php
vendor/alovoice/src/BillzRest.php
+2
-1
No files found.
.gitignore
View file @
3c3c2595
push
orig*
orig*
*.log
*.log
logs/*
logs/*
...
...
vendor/alovoice/src/AloVoiceRest.php
View file @
3c3c2595
...
@@ -1883,7 +1883,38 @@ function(result){
...
@@ -1883,7 +1883,38 @@ function(result){
'title'
=>
'Вкладки скриптов'
,
'title'
=>
'Вкладки скриптов'
,
'status'
=>
'off'
,
'status'
=>
'off'
,
)];
)];
// $res['nextintegration'] = 'status_useradd';
$res
[
'nextintegration'
]
=
'status_salepaymentsave'
;
$res
[
'rescheck'
]
=
$arResults
;
return
$res
;
}
private
function
status_salepaymentsave
(
$r
=
false
)
{
//OnPaymentEntitySaved salepaymentsave
$arResults
=
BxRest
::
call
(
'event.get'
);
$integrations
=
[];
if
(
!
empty
(
$arResults
[
"result"
])){
foreach
(
$arResults
[
"result"
]
as
$itg
){
if
(
strtoupper
(
$itg
[
"event"
])
==
"ONPAYMENTENTITYSAVED"
){
if
(
$itg
[
"handler"
]
==
$this
->
config
[
"alovoice_host"
]
){
$integrations
[]
=
array
(
'code'
=>
'salepaymentsave'
,
'title'
=>
'Отслеживания оплат'
,
'status'
=>
'on'
,
);
}
}
}
}
$res
[
'lines'
]
=
(
!
empty
(
$integrations
))
?
$integrations
:
[
array
(
'code'
=>
'salepaymentsave'
,
'title'
=>
'Отслеживания оплат'
,
'status'
=>
'off'
,
)];
// $res['nextintegration'] = 'status_alvcrmmenus';
$res
[
'rescheck'
]
=
$arResults
;
$res
[
'rescheck'
]
=
$arResults
;
return
$res
;
return
$res
;
...
@@ -2149,6 +2180,15 @@ function(result){
...
@@ -2149,6 +2180,15 @@ function(result){
return
array
(
'do'
=>
$doResult
,
'more'
=>
$moreResult
,
'result'
=>
'success'
);
return
array
(
'do'
=>
$doResult
,
'more'
=>
$moreResult
,
'result'
=>
'success'
);
}
}
if
(
$r
[
"code"
]
==
'salepaymentsave'
){
//OnPaymentEntitySaved salepaymentsave
$doResult
=
BxRest
::
call
(
'event.bind'
,[
'event'
=>
'ONPAYMENTENTITYSAVED'
,
'handler'
=>
$this
->
config
[
"alovoice_host"
],
]);
return
array
(
'do'
=>
$doResult
,
'result'
=>
'success'
);
}
if
(
$r
[
"code"
]
==
'contactupdate'
){
if
(
$r
[
"code"
]
==
'contactupdate'
){
$doResult
=
BxRest
::
call
(
'event.bind'
,[
$doResult
=
BxRest
::
call
(
'event.bind'
,[
'event'
=>
'ONCRMCONTACTUPDATE'
,
'event'
=>
'ONCRMCONTACTUPDATE'
,
...
@@ -2458,6 +2498,15 @@ function(result){
...
@@ -2458,6 +2498,15 @@ function(result){
return
array
(
'do'
=>
$aloCallScrpUnBindPlcResult
,
'result'
=>
'success'
);
return
array
(
'do'
=>
$aloCallScrpUnBindPlcResult
,
'result'
=>
'success'
);
}
}
if
(
$r
[
"code"
]
==
'salepaymentsave'
){
//OnPaymentEntitySaved salepaymentsave
$doResult
=
BxRest
::
call
(
'event.unbind'
,[
'event'
=>
'ONPAYMENTENTITYSAVED'
,
'handler'
=>
$this
->
config
[
"alovoice_host"
],
]);
return
array
(
'do'
=>
$doResult
,
'result'
=>
'success'
);
}
if
(
$r
[
"code"
]
==
'callcard'
){
if
(
$r
[
"code"
]
==
'callcard'
){
$doResult
=
BxRest
::
call
(
'placement.unbind'
,[
$doResult
=
BxRest
::
call
(
'placement.unbind'
,[
...
...
vendor/alovoice/src/BillzRest.php
View file @
3c3c2595
...
@@ -138,7 +138,8 @@ require_once (__DIR__.'/keys.php');
...
@@ -138,7 +138,8 @@ require_once (__DIR__.'/keys.php');
public
static
function
getAppSettings
()
public
static
function
getAppSettings
()
{
{
return
[
return
[
"url"
=>
"https://api.billz.uz/v4/"
,
// "url" => "https://api.billz.uz/v4/",
"url"
=>
"https://api.billz.uz/v1/"
,
"iss"
=>
"qam.bitrix24.ru"
,
"iss"
=>
"qam.bitrix24.ru"
,
"sub"
=>
"qamar.bitrix24"
,
"sub"
=>
"qamar.bitrix24"
,
"secret"
=>
"iRPiwoNhnyhyyLMtADtINSuxHyVmsrXpvtejrAuERdyhhj2EPtMxUorppLUnELVhRmIpnGWsHSpwCzCWsjJLENekd9WumpLjPHvUQDwWmcuwotmhvEyIzzSVkejywICwzKrSDXucLE3SGQtyDVcmpeFBneSMmxuKMjo6Q2kGIGbfQkupBm3mMGXmPIEpwMNYNV38VcemDd6fPYQnRcyYERXctSGMTXFwdmDLoYBE6btCfNZfkdoBFmbhpQJpBkifPUScyQRGeRbkFxjEwvnXjhCSCMbpkjjfWkFeesnPupKkiKKKL8MkSKx6HuRIzbmbcGNJNWtrkx3sSM1MjPzCTiWE2wM1SZQWVYu8hDBVUVDKxBeRisKTjjeidboGWJNhWcpzQEJe4cMSjBvNNxxBiveZ0iDdMpcSYsJNfoVTT8mSkavRzmHeeSGXKSDDTmwjUwfoPsHhWJTt7BrauLIRhIrjKnsYZscNvSGYRDyVwBXaS8YfELUBUMSFjYnpjJVs"
"secret"
=>
"iRPiwoNhnyhyyLMtADtINSuxHyVmsrXpvtejrAuERdyhhj2EPtMxUorppLUnELVhRmIpnGWsHSpwCzCWsjJLENekd9WumpLjPHvUQDwWmcuwotmhvEyIzzSVkejywICwzKrSDXucLE3SGQtyDVcmpeFBneSMmxuKMjo6Q2kGIGbfQkupBm3mMGXmPIEpwMNYNV38VcemDd6fPYQnRcyYERXctSGMTXFwdmDLoYBE6btCfNZfkdoBFmbhpQJpBkifPUScyQRGeRbkFxjEwvnXjhCSCMbpkjjfWkFeesnPupKkiKKKL8MkSKx6HuRIzbmbcGNJNWtrkx3sSM1MjPzCTiWE2wM1SZQWVYu8hDBVUVDKxBeRisKTjjeidboGWJNhWcpzQEJe4cMSjBvNNxxBiveZ0iDdMpcSYsJNfoVTT8mSkavRzmHeeSGXKSDDTmwjUwfoPsHhWJTt7BrauLIRhIrjKnsYZscNvSGYRDyVwBXaS8YfELUBUMSFjYnpjJVs"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment