public function delivery($msg_id, $msg_key)
    {
        $data = [
            'message_id' => $msg_id,
            'message_key' => $msg_key
        ];

        $xml = static::renderXML('delivery', $data);

        $response = $this->sendRequest($xml);

        // disable warnings
        libxml_use_internal_errors(true);

        $xmlresp = simplexml_load_string($response);
        $arr = json_decode(json_encode($xmlresp), true);

        // re-enable warnings
        libxml_clear_errors();
        libxml_use_internal_errors(false);

        $delivery = new DhiraaguSmsDelivery($arr);

        if (empty($delivery->message_status_id)) {
            throw DhiraaguDeliveryException::messageFailed($delivery->response_status, $delivery->response_status_desc);
        }

        return $delivery;
    }
public function delivery($msg_id, $msg_key)
    {
        $data = [
            'message_id' => $msg_id,
            'message_key' => $msg_key
        ];

        $xml = static::renderXML('delivery', $data);

        $response = $this->sendRequest($xml);

        // disable warnings
        libxml_use_internal_errors(true);

        $xmlresp = simplexml_load_string($response);
        $arr = json_decode(json_encode($xmlresp), true);

        // re-enable warnings
        libxml_clear_errors();
        libxml_use_internal_errors(false);

        $delivery = new DhiraaguSmsDelivery($arr);

        if (empty($delivery->message_status_id)) {
            throw DhiraaguDeliveryException::messageFailed($delivery->response_status, $delivery->response_status_desc);
        }

        return $delivery;
    }
public function delivery ( $ msg_id , $ msg_key ) { $ data = [ 'message_id' => $ msg_id , 'message_key' => $ msg_key ] ; $ xml = static :: renderXML ( 'delivery' , $ data ) ; $ response = $ this -> sendRequest ( $ xml ) ; // disable warnings libxml_use_internal_errors ( true ) ; $ xmlresp = simplexml_load_string ( $ response ) ; $ arr = json_decode ( json_encode ( $ xmlresp ) , true ) ; // re-enable warnings libxml_clear_errors ( ) ; libxml_use_internal_errors ( false ) ; $ delivery = new DhiraaguSmsDelivery ( $ arr ) ; if ( empty ( $ delivery -> message_status_id ) ) { throw DhiraaguDeliveryException :: messageFailed ( $ delivery -> response_status , $ delivery -> response_status_desc ) ; } return $ delivery ; }
Checks the delivery status of a message

@param string $msg_id
@param string $msg_key
@return DhiraaguSmsDelivery
@throws DhiraaguDeliveryException
Checks the delivery status of a message