Citycom Service Ordering WIP 2025-08-05

This commit is contained in:
Frank Schubert
2025-08-05 09:54:36 +02:00
parent 07f2bad3c4
commit a2555a9e50
4 changed files with 17 additions and 6 deletions
+4
View File
@@ -5,6 +5,7 @@ class Citycom_OanApiClient {
private $username;
private $password;
private $token;
public $lastError;
public function __construct($user, $pass) {
@@ -194,6 +195,7 @@ class Citycom_OanApiClient {
"http" => [
"ignore_errors" => true,
"method" => "POST",
"content" => json_encode($data),
"header" => [
"Accept: application/json",
"Content-type: application/json",
@@ -203,6 +205,7 @@ class Citycom_OanApiClient {
];
$new_service = $this->runApiRequest($url, $ctx_options);
return $new_service;
}
@@ -332,6 +335,7 @@ class Citycom_OanApiClient {
$resp = json_decode($output);
//var_dump($resp);
if(!is_object($resp) || (property_exists($resp, "success") && !$resp->success)) {
$this->lastError = $output;
return false;
}