citycom oan cleanup
This commit is contained in:
@@ -76,6 +76,13 @@ class SnoppCitycom extends Modules\ApiControllerModule
|
||||
return \mfResponse::Ok(["status" => $status]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $req_id
|
||||
* @return array
|
||||
*
|
||||
* Takes Order from SNOPP and updates CC service with correct product and
|
||||
* if service is finished, updates billing_date of cc service and preorder status to 500
|
||||
*/
|
||||
public function orderService($req_id) {
|
||||
if(!$req_id) {
|
||||
return \mfResponse::BadRequest(["message" => "id missing"]);
|
||||
@@ -125,19 +132,6 @@ class SnoppCitycom extends Modules\ApiControllerModule
|
||||
return \mfResponse::NotFound(["message" => "Home not found"]);
|
||||
}
|
||||
|
||||
/*
|
||||
if($ctag->ext_id && $ctag->ext_status == "finished") {
|
||||
if($preorder->status->code < 500) {
|
||||
$preorder->setNewStatusCode(500);
|
||||
$preorder->save();
|
||||
|
||||
}
|
||||
// update billing_date if nessecary
|
||||
$this->log->debug(__METHOD__.": Updating billing_date for {$ctag->ext_name} (Preorder {$preorder->id} {$preorder->oaid})");
|
||||
$cc_api->updateService($ctag->ext_id, ["billing_date" => (new \DateTime("now"))->format("Y-m-d")]);
|
||||
return \mfResponse::Ok(["message" => "Service active already", "activation_status" => "active"]);
|
||||
}
|
||||
*/
|
||||
|
||||
$data["up"] = $bb_up;
|
||||
$data["down"] = $bb_down;
|
||||
@@ -156,7 +150,6 @@ class SnoppCitycom extends Modules\ApiControllerModule
|
||||
// updateService() only updates if values are changed.
|
||||
if(!$cc_api->updateService($ctag->ext_id, $data)) {
|
||||
$this->log->error(__METHOD__.": Error updating service {$ctag->ext_id} for preorder {$preorder->id}");
|
||||
//return \mfResponse::InternalServerError(["message" => "Error activating service"]);
|
||||
}
|
||||
|
||||
// check if service is active, if not return deferred
|
||||
|
||||
Reference in New Issue
Block a user