<?php require_once "../config.php"; $params = ['key' => '6621a74e-e626-72d0-d3e7-8c9eb61b20da']; $request = new \pmill\Plesk\DeleteSecretKey($config, $params); $info = $request->process(); var_dump($info);
$request = new \pmill\Plesk\ListSecretKeys(['key' => $data['secret_key'], 'host' => $config['host']]); $keys = $request->process(); $secret_key_found = false; foreach ($keys as $key) { if ($key['key'] == $data['secret_key']) { $secret_key_found = true; } } if (!$secret_key_found) { throw new Exception("Couldn't find created secret_key"); } /** * 34. Delete secret key */ $request = new \pmill\Plesk\DeleteSecretKey($config, ['key' => $data['secret_key']]); $request->process(); $request = new \pmill\Plesk\ListSecretKeys($config); $keys = $request->process(); $secret_key_found = false; foreach ($keys as $key) { if ($key['key'] == $data['secret_key']) { $secret_key_found = true; } } if ($secret_key_found) { throw new Exception("Failed to delete secret_key"); } } catch (Exception $e) { throw $e; } finally { /*