Citycom API WIP
This commit is contained in:
@@ -71,11 +71,12 @@ class SnoppCitycom extends Modules\ApiControllerModule
|
|||||||
$cc_api_client = new \Citycom_OanApiClient(CITYCOM_OAN_API_USER, CITYCOM_OAN_API_PASS);
|
$cc_api_client = new \Citycom_OanApiClient(CITYCOM_OAN_API_USER, CITYCOM_OAN_API_PASS);
|
||||||
$cc_api = new \Citycom_OanApiHelper($cc_api_client);
|
$cc_api = new \Citycom_OanApiHelper($cc_api_client);
|
||||||
|
|
||||||
if(!$cc_api->orderServices($preorder, $cc_home_id, $data)) {
|
$services = $cc_api->orderServices($preorder, $cc_home_id, $data);
|
||||||
|
if(!$services) {
|
||||||
return \mfResponse::InternalServerError(["message" => "Error activating service"]);
|
return \mfResponse::InternalServerError(["message" => "Error activating service"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return \mfResponse::Ok();
|
return \mfResponse::Ok(["message" => "Services ordered successfully", "activation_status" => "active"]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ class Citycom_OanApiHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$service_return[] = [
|
$service_return[] = [
|
||||||
|
"service_number" => $new_service->service_number,
|
||||||
"sublocation_id" => $sublocation_id,
|
"sublocation_id" => $sublocation_id,
|
||||||
"service_type" => $ctag_service_type,
|
"service_type" => $ctag_service_type,
|
||||||
"ctag" => $ctag,
|
"ctag" => $ctag,
|
||||||
@@ -176,6 +177,7 @@ class Citycom_OanApiHelper {
|
|||||||
|
|
||||||
$service_return[] = [
|
$service_return[] = [
|
||||||
"sublocation_id" => $sublocation_id,
|
"sublocation_id" => $sublocation_id,
|
||||||
|
"service_number" => "30-fggreger-01",
|
||||||
"service_type" => $ctag_service_type,
|
"service_type" => $ctag_service_type,
|
||||||
"ctag" => $ctag,
|
"ctag" => $ctag,
|
||||||
"ont" => [
|
"ont" => [
|
||||||
|
|||||||
Reference in New Issue
Block a user