src/Vendors/Zenziva.php
public function send(array $destinations, string $message): ?array
    {
        $this->checkConfig();

        if (!empty($destinations)) {
            $destination = $destinations[0];
        }

        $query = http_build_query([
            'userkey' => $this->userkey,
            'passkey' => $this->passkey,
            'nohp'    => $destination,
            'pesan'   => $message,
        ]);

        $response = Request::get($this->baseUrl.'/smsapi.php?'.$query);

        $xml = simplexml_load_string($response->body);
        $body = json_decode(json_encode($xml), true);

        if (!empty($body['message']) and $body['message']['status'] != 0) {
            Log::error(sprintf('Zenziva: %s.', $body['message']['text']));
        }

        return [
            'code'    => $response->code,
            'message' => ($response->code == 200) ? 'OK' : $body['message']['text'] ?? '',
            'data'    => $body,
        ];
    }
public function send(array $destinations, string $message): ?array
    {
        $this->checkConfig();

        if (!empty($destinations)) {
            $destination = $destinations[0];
        }

        $query = http_build_query([
            'userkey' => $this->userkey,
            'passkey' => $this->passkey,
            'nohp'    => $destination,
            'pesan'   => $message,
        ]);

        $response = Request::get($this->baseUrl.'/smsapi.php?'.$query);

        $xml = simplexml_load_string($response->body);
        $body = json_decode(json_encode($xml), true);

        if (!empty($body['message']) and $body['message']['status'] != 0) {
            Log::error(sprintf('Zenziva: %s.', $body['message']['text']));
        }

        return [
            'code'    => $response->code,
            'message' => ($response->code == 200) ? 'OK' : $body['message']['text'] ?? '',
            'data'    => $body,
        ];
    }
Send message using Zenziva API.

@param array  $destinations
@param string $message

@return array|null