Citycom Service Ordering WIP 2025-08-05
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user