Commit b87826cc authored by Antonio.Suerte's avatar Antonio.Suerte

Zendesk API Params Enhancement

parent 6c20b063
......@@ -128,7 +128,7 @@ class LogicSupport extends SupportModelClass {
if($ticketingConf -> staging)
$template["body"] = "[STAGING TICKET]\n{$template["body"]}";
$params = [
$params = json_encode([
"ticket" => [
"subject" => $template["title"],
"priority" => "urgent",
......@@ -142,7 +142,7 @@ class LogicSupport extends SupportModelClass {
"email" => $this -> getEmail()
]
]
];
]);
curl_setopt_array($handle, [
CURLOPT_URL => $ticketingConf -> endpoint_url,
......@@ -151,7 +151,7 @@ class LogicSupport extends SupportModelClass {
CURLOPT_ENCODING => "utf8",
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => $ticketingConf -> request_method,
CURLOPT_POSTFIELDS => json_encode($params),
CURLOPT_POSTFIELDS => $params,
CURLOPT_HTTPHEADER => [
"Content-type: application/json",
"Authorization: Basic {$hashed}"
......@@ -167,8 +167,9 @@ class LogicSupport extends SupportModelClass {
$details = [
"response_code" => $httpcode,
"ticket_body" =>
"<subject>{$template["title"]}</subject>\n".
"<content>\n{$template["body"]}</content>",
"<subject>{$template["title"]}\n</subject>\n".
"<content>\n{$template["body"]}\n</content>\n".
"<params>\n{$params}\n</params>",
"response_str" => $output
];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment