public function send($testmode = false)
    {
        $data = array_replace($this->params, [
            'username' => $this->username,
            'password' => $this->password,
            'message'  => $this->message->getMessage(),
            'msisdn'   => $this->message->getRecipient(),
        ]);

        $concat = $this->message->getConcatParts();

        if ($concat > 1) {
            $data['allow_concat_text_sms']     = 1;
            $data['concat_text_sms_max_parts'] = $concat;
        }

        // add test params if required
        if ($testmode) {
            if ($testmode == BulkSmsService::TEST_ALWAYS_SUCCEED) {
                $data['test_always_succeed'] = 1;
            } elseif ($testmode == BulkSmsService::TEST_ALWAYS_FAIL) {
                $data['test_always_fail'] = 1;
            }
        }

        return $this->curl->post($this->getUrl(), $data);
    }
public function send($testmode = false)
    {
        $data = array_replace($this->params, [
            'username' => $this->username,
            'password' => $this->password,
            'message'  => $this->message->getMessage(),
            'msisdn'   => $this->message->getRecipient(),
        ]);

        $concat = $this->message->getConcatParts();

        if ($concat > 1) {
            $data['allow_concat_text_sms']     = 1;
            $data['concat_text_sms_max_parts'] = $concat;
        }

        // add test params if required
        if ($testmode) {
            if ($testmode == BulkSmsService::TEST_ALWAYS_SUCCEED) {
                $data['test_always_succeed'] = 1;
            } elseif ($testmode == BulkSmsService::TEST_ALWAYS_FAIL) {
                $data['test_always_fail'] = 1;
            }
        }

        return $this->curl->post($this->getUrl(), $data);
    }
public function send ( $ testmode = false ) { $ data = array_replace ( $ this -> params , [ 'username' => $ this -> username , 'password' => $ this -> password , 'message' => $ this -> message -> getMessage ( ) , 'msisdn' => $ this -> message -> getRecipient ( ) , ] ) ; $ concat = $ this -> message -> getConcatParts ( ) ; if ( $ concat > 1 ) { $ data [ 'allow_concat_text_sms' ] = 1 ; $ data [ 'concat_text_sms_max_parts' ] = $ concat ; } // add test params if required if ( $ testmode ) { if ( $ testmode == BulkSmsService :: TEST_ALWAYS_SUCCEED ) { $ data [ 'test_always_succeed' ] = 1 ; } elseif ( $ testmode == BulkSmsService :: TEST_ALWAYS_FAIL ) { $ data [ 'test_always_fail' ] = 1 ; } } return $ this -> curl -> post ( $ this -> getUrl ( ) , $ data ) ; }
Send the message.

@param bool $testmode Testmode to use

@return mixed
Send the message .