I am trying to send response back to ajax request in js by using REST API.
send request from ajax to server is okay and its processing okay. But to send the response from server to ajax, the ajax receive it as "error" instead of "success".
My ajax in js
My REST API
I have tried wp_send_json, json_encode, wp_send_json_success, but results are still the same.