Jump to content

Recommended Posts

Posted

public function add()
    {
        $ticket_data = [
            'vars' => [
                'department_id' => 1,
                'staff_id' => 1, // This field is optional
                'service_id' => null, // This field is optional
                'client_id' => 1, // This field is optional
                'email' => null, // This field is optional
                'summary' => 'Something is terribly wrong',
                'priority' => 'emergency',
                'status' => 'awaiting_reply'
            ]
        ];

        $response = $this->post("support_manager.support_manager_tickets", "add", $ticket_data);
       if ($response->errors() !== false) {
            if ($response->errors() !== false) {
                // There were errors attempting that action
                return($response->errors());
            } elseif (($result = $response->response())) {
                // The response was successful and returned data
                return($result);
            } else {
                // Something else happened
                echo "Response code: " . $response->responseCode();
                var_dump($response->raw());
            }
        } elseif (($result = $response->response())) {
            // The response was successful and returned data
            return $result;
        } else {
            // Something else happened
            echo "Response code: " . $response->responseCode();
            var_dump($response->raw());
        }
    }
 this is working , got response  with ticket id ,
but tickets not available on control panel .
i'm missing something ?

Capture.JPG

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...