I'm building a module for our WHMCS at the moment and do use the GitHub example from poulpreben for help.
The cloud_tenant creation does work fine.
Now I integreated a function to delete the tenant if the Service is canceled. The function to delete it works fine, I tested it with hard coding a ID in it.
The next step is to automate this. I want to use the the query filter for this. As filter the name of the tenant shall be used.
The problem is that it does turn my "==" into "%3D%3D". I tried urlencode and urldecode. Also I did put it in the string encoded but it does not decode.
Here is my Code:
Code: Select all
$response = $smarty->client->get("cloud/tenants/query?type=cloudtenant&filter=name==" . $tenant_name);
Code: Select all
Client error response [url] http://XXX.XXX.XXX.XXX:9399/api/cloud/tenants/query?type=cloudtenant&filter=name%3D%3DXXXXX-xxxxxx.xx [status code] 400 [reason phrase] BadRequest
I do use GuzzleHTTP. Does maybe someone have a solution for this problem? Or a Idea how to solve it?
Thank you for your help!
Regards