Changed Citycom order flow to new estmk activation workflow
This commit is contained in:
@@ -219,6 +219,21 @@ class Citycom_OanApiClient {
|
||||
|
||||
$url = str_replace("{service_id}", $service_id, $this->baseurl.CITYCOM_OAN_API_EP_UPDATE_SERVICES);
|
||||
|
||||
$ctx_options = [
|
||||
"http" => [
|
||||
"ignore_errors" => true,
|
||||
"method" => "PUT",
|
||||
"content" => json_encode($data),
|
||||
"header" => [
|
||||
"Accept: application/json",
|
||||
"Content-type: application/json",
|
||||
"Authorization: Bearer ".$this->token,
|
||||
],
|
||||
]
|
||||
];
|
||||
|
||||
$result = $this->runApiRequest($url, $ctx_options);
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function cancelService($service_id, $data) {
|
||||
@@ -449,7 +464,7 @@ class Citycom_OanApiClient {
|
||||
$output = file_get_contents($final_url, false, $ctx);
|
||||
|
||||
$resp = json_decode($output);
|
||||
//var_dump($resp);
|
||||
//var_dump($resp);exit;
|
||||
if(!is_object($resp) || (property_exists($resp, "success") && !$resp->success)) {
|
||||
$this->lastError = $output;
|
||||
return false;
|
||||
@@ -459,6 +474,8 @@ class Citycom_OanApiClient {
|
||||
|
||||
if(is_array($response)) {
|
||||
$return_data = $response;
|
||||
} elseif(is_object($response) && (!property_exists($response, "data") || !is_array($response->data))) {
|
||||
$return_data = $response;
|
||||
} elseif(is_object($response) && property_exists($response, "data") && is_array($response->data)) {
|
||||
$return_data = $response->data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user