dataType: 'jsonp',
$.ajax({
type: "POST",
url: '/testOrder.php',
data: {id:1},
dataType: 'json',
error: function(request,error) {
console.log(request);
console.log(error);
},
success: function(data) {
console.log(data);
}
});
<?php
$id = $_REQUEST['id'];
echo json_encode(['new_id'=>$id]);