|
@@ -396,7 +396,7 @@ class cwp7_Admin {
|
|
|
protected function doRequest($endpoint, $action, $data) {
|
|
protected function doRequest($endpoint, $action, $data) {
|
|
|
$data['key'] = $this->cwp7Token;
|
|
$data['key'] = $this->cwp7Token;
|
|
|
$data['action'] = $action;
|
|
$data['action'] = $action;
|
|
|
- $data['debug'] = 1;
|
|
|
|
|
|
|
+// $data['debug'] = 1;
|
|
|
$ch = curl_init();
|
|
$ch = curl_init();
|
|
|
curl_setopt($ch, CURLOPT_URL, $this->cwp7URL . '/v1/' . $endpoint);
|
|
curl_setopt($ch, CURLOPT_URL, $this->cwp7URL . '/v1/' . $endpoint);
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
@@ -406,13 +406,6 @@ class cwp7_Admin {
|
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
|
|
|
curl_setopt($ch, CURLOPT_POST, 1);
|
|
curl_setopt($ch, CURLOPT_POST, 1);
|
|
|
$response = curl_exec($ch);
|
|
$response = curl_exec($ch);
|
|
|
- logModuleCall(
|
|
|
|
|
- 'cwp7',
|
|
|
|
|
- __FUNCTION__,
|
|
|
|
|
- $data,
|
|
|
|
|
- 'debug',
|
|
|
|
|
- curl_getinfo($ch)
|
|
|
|
|
- );
|
|
|
|
|
if(curl_getinfo($ch, CURLINFO_RESPONSE_CODE) != 200) {
|
|
if(curl_getinfo($ch, CURLINFO_RESPONSE_CODE) != 200) {
|
|
|
curl_close($ch);
|
|
curl_close($ch);
|
|
|
return array('status' => 'Error', 'err_msg' => curl_error($ch));
|
|
return array('status' => 'Error', 'err_msg' => curl_error($ch));
|