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
34ec72bf
Commit
34ec72bf
authored
Jan 11, 2022
by
Kulya
😊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Billz Curl check7
parent
bb5f66d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
14 deletions
+36
-14
BillzRest.php
vendor/alovoice/src/BillzRest.php
+36
-14
No files found.
vendor/alovoice/src/BillzRest.php
View file @
34ec72bf
...
...
@@ -187,21 +187,43 @@ require_once (__DIR__.'/keys.php');
try
{
$obCurl
=
curl_init
();
curl_setopt
(
$obCurl
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$obCurl
,
CURLOPT_RETURNTRANSFER
,
true
);
curl_setopt
(
$obCurl
,
CURLOPT_POSTREDIR
,
10
);
curl_setopt
(
$obCurl
,
CURLOPT_USERAGENT
,
'Bitrix24'
.
static
::
VERSION
);
curl_setopt
(
$obCurl
,
CURLOPT_POST
,
true
);
curl_setopt
(
$obCurl
,
CURLOPT_POSTFIELDS
,
$sendData
);
curl_setopt
(
$obCurl
,
CURLOPT_FOLLOWLOCATION
,
1
);
curl_setopt
(
$obCurl
,
CURLOPT_SSL_VERIFYPEER
,
false
);
curl_setopt
(
$obCurl
,
CURLOPT_SSL_VERIFYHOST
,
false
);
$headers
=
array
();
$headers
[]
=
"Content-Type: application/json; charset=UTF-8"
;
$headers
[]
=
"Authorization: Bearer "
.
$arSettings
[
"token"
];
$headers
[]
=
"Cache-Control: no-cache"
;
curl_setopt
(
$obCurl
,
CURLOPT_HTTPHEADER
,
$headers
);
curl_setopt_array
(
$curl
,
array
(
CURLOPT_URL
=>
$url
,
CURLOPT_USERAGENT
=>
"TugBitrix24"
,
CURLOPT_RETURNTRANSFER
=>
true
,
CURLOPT_ENCODING
=>
''
,
CURLOPT_MAXREDIRS
=>
10
,
CURLOPT_TIMEOUT
=>
0
,
CURLOPT_FOLLOWLOCATION
=>
true
,
CURLOPT_HTTP_VERSION
=>
CURL_HTTP_VERSION_1_1
,
CURLOPT_CUSTOMREQUEST
=>
'GET'
,
CURLOPT_POSTFIELDS
=>
$sendData
,
CURLOPT_SSL_VERIFYPEER
=>
false
,
CURLOPT_SSL_VERIFYHOST
=>
false
,
CURLOPT_HTTPHEADER
=>
array
(
'Authorization: Bearer '
.
$arSettings
[
"token"
],
'Content-Type: application/json'
),
));
// curl_setopt($obCurl, CURLOPT_URL, $url);
// curl_setopt($obCurl, CURLOPT_RETURNTRANSFER, true);
// curl_setopt($obCurl, CURLOPT_POSTREDIR, 10);
// curl_setopt($obCurl, CURLOPT_USERAGENT, 'Bitrix24' . static::VERSION);
// curl_setopt($obCurl, CURLOPT_POST, true);
// curl_setopt($obCurl, CURLOPT_POSTFIELDS, $sendData);
// curl_setopt($obCurl, CURLOPT_FOLLOWLOCATION, 1);
// curl_setopt($obCurl, CURLOPT_SSL_VERIFYPEER, false);
// curl_setopt($obCurl, CURLOPT_SSL_VERIFYHOST, false);
// $headers = array();
// $headers[] = "Content-Type: application/json; charset=UTF-8";
// $headers[] = "Authorization: Bearer ".$arSettings["token"];
// $headers[] = "Cache-Control: no-cache";
// curl_setopt($obCurl, CURLOPT_HTTPHEADER, $headers);
$out
=
curl_exec
(
$obCurl
);
$info
=
curl_getinfo
(
$obCurl
);
...
...
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