I need to take some data on WP from OSStore
I am writing the following:
$.ajax({ type: "POST", url: "http://test.pp.ua/index.php?route=common/forBlog&callback=?", dataType: 'jsonp', data: {'key': 1}, cache: false, crossDomain: true, success: function (data){ console.log(data); } }); The following file is written to the file:
header('Access-Control-Allow-Origin: *'); $data = array( 'test1' => 12, 'test2' => 'good' ); $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($data)); In Console I get the following: 
and the body itself with the data that the file returned 
Tell me how to solve this problem? Thank you for your time.
function () {console.log(data);}typo - saaaaaaaaasha