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
4ae6225f
Commit
4ae6225f
authored
Feb 09, 2022
by
Kulya
😊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Begin adding Client to Billz 4
parent
5e9295eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
AloVoiceRest.php
vendor/alovoice/src/AloVoiceRest.php
+14
-2
BillzRest.php
vendor/alovoice/src/BillzRest.php
+2
-5
No files found.
vendor/alovoice/src/AloVoiceRest.php
View file @
4ae6225f
...
...
@@ -787,11 +787,23 @@ class AloVoiceRest
$resCont
=
BxRest
::
call
(
"crm.contact.get"
,[
"id"
=>
$clientId
]);
ALVC
::
eLog
(
$resCont
[
"result"
],
"------ Billz :: Client(contact) RES:"
);
if
(
!
empty
(
$resCont
[
"UF_CRM_1644411792448"
])){
if
(
empty
(
$resCont
[
"UF_CRM_1644411792448"
])
&&
!
empty
(
$resCont
[
"PHONE"
][
0
][
"VALUE"
])){
$arClientParams
=
[
"phone"
=>
$resCont
[
"PHONE"
][
0
][
"VALUE"
]
];
if
(
!
empty
(
$resCont
[
"NAME"
]
)){
$arClientParams
[
'firstName'
]
=
$resCont
[
"NAME"
];
}
if
(
!
empty
(
$resCont
[
"SECOND_NAME"
]
)){
$arClientParams
[
'lastName'
]
=
$resCont
[
"SECOND_NAME"
];
}
if
(
!
empty
(
$resCont
[
"BIRTHDATE"
]
)){
$arClientParams
[
'birthDate'
]
=
$resCont
[
"BIRTHDATE"
];
}
$clientAddRes
=
BillzRest
::
createOrder
(
$arClientParams
);
ALVC
::
eLog
(
$clientAddRes
,
"------ Billz :: Client Add RES:"
);
}
}
//
}
private
function
get_bx_order_products
(
$id
=
false
)
{
...
...
vendor/alovoice/src/BillzRest.php
View file @
4ae6225f
...
...
@@ -47,11 +47,8 @@ require_once (__DIR__.'/keys.php');
"id": "1200"
}
*/
$client_params
=
[
"firstName"
=>
(
!
empty
(
$params
[
"NAME"
]))
?
$params
[
"NAME"
]
:
"New Client"
];
// if(!empty())
$result
=
static
::
callCurl
(
"client.create"
,
$client_params
);
$result
=
static
::
callCurl
(
"client.create"
,
$params
);
return
$result
;
}
...
...
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