public function answerPreCheckoutQuery(bool $ok = true, string $error = null) {
        if (!isset($this->_pre_checkout_query_id)) {
            throw new BotException('Callback query ID not set, wrong update');
        }

        $parameters = [
            'pre_checkout_query_id' => $this->_pre_checkout_query_id,
            'ok' => $ok,
            'error_message' => $error
        ];

        return $this->execRequest('answerPreCheckoutQuery?' . http_build_query($parameters));
    }
public function answerPreCheckoutQuery(bool $ok = true, string $error = null) {
        if (!isset($this->_pre_checkout_query_id)) {
            throw new BotException('Callback query ID not set, wrong update');
        }

        $parameters = [
            'pre_checkout_query_id' => $this->_pre_checkout_query_id,
            'ok' => $ok,
            'error_message' => $error
        ];

        return $this->execRequest('answerPreCheckoutQuery?' . http_build_query($parameters));
    }
public function answerPreCheckoutQuery ( bool $ ok = true , string $ error = null ) { if ( ! isset ( $ this -> _pre_checkout_query_id ) ) { throw new BotException ( 'Callback query ID not set, wrong update' ) ; } $ parameters = [ 'pre_checkout_query_id' => $ this -> _pre_checkout_query_id , 'ok' => $ ok , 'error_message' => $ error ] ; return $ this -> execRequest ( 'answerPreCheckoutQuery?' . http_build_query ( $ parameters ) ) ; }
\brief Send an update once the user has confirmed their payment.
@param bool $ok True is everything is alright, elsewhere False.
@param string $error The error message if something went wrong.
@return bool True on success.
\ brief Send an update once the user has confirmed their payment .