N
N
nikitoshq2020-01-14 13:33:01
API
nikitoshq, 2020-01-14 13:33:01

How do I remove the message status notification?

It turns out there is a store on Opencart, in it, on the success page, I added the functions:

function sendReq($data)
            {
              $request_data = json_encode($data);
              $ch = curl_init("https://chatapi.viber.com/pa/send_message");
              curl_setopt($ch, CURLOPT_POST, 1);
              curl_setopt($ch, CURLOPT_POSTFIELDS, $request_data);
              curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
              $response = curl_exec($ch);
              $err = curl_error($ch);
              curl_close($ch);
              if($err) {return $err;}
              else {return $response;}
            }
  
            function sendMsg($sender_id, $text, $type, $tracking_data = Null, $arr_asoc = Null)
            {
              global $auth_token, $send_name;
              $auth_token = 'авыавы1';
              $send_name = 'авыавы';
              $data['auth_token'] = $auth_token;
              $data['receiver'] = $sender_id;
              if($text != Null) {$data['text'] = $text;}
              $data['type'] = $type;
              $data['sender']['name'] = $send_name;
              if($tracking_data != Null) {$data['tracking_data'] = $tracking_data;}
              if($arr_asoc != Null)
              {
                foreach($arr_asoc as $key => $val) {$data[$key] = $val;}
              }
              
              return sendReq($data);
            }
  
            function sendMsgText($sender_id, $text, $tracking_data = Null)
            {
              return sendMsg($sender_id, $text, "text", $tracking_data);
            }

Which send a message to viber.
How can I remove this notification:
5e1d985a4118f661468088.png
Since I understand that one of these functions sends it. I tried turning off the error display, but it doesn't work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene Chefranov, 2020-01-14
@Chefranov

else {return $response;}
returns you the answer and prints it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question