How to implement AJAX within a class storing shortcode atts as class variables

to pass a variable from JavaScript to the AJAX call, you have to put the message in the data :

data : {"message" : "my message"}

and you retrieve it in the PHP code :

function testAJAX() {

    $returnArray = array();
    $returnArray['message'] = $_POST["message"];

    wp_send_json($returnArray);
}

you can read about the use of wp_send_json here :
https://codex.wordpress.org/Function_Reference/wp_send_json