You content type in header should be Content-Type: application/x-www-form-urlencoded instead of Content-Type: application/json
FOR POSTMAN:
BODY should be x-www-form-urlencoded instead of form-data.
Find
curl_setopt($ch, CURLOPT_HTTPHEADER,'Content-Type: application/json');
Replace with::
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
TRY THIS KUDOS!
You content type in header should be `Content-Type: application/x-www-form-urlencoded` instead of `Content-Type: application/json`
FOR POSTMAN:
BODY should be `x-www-form-urlencoded` instead of `form-data`.
**Find**
curl_setopt($ch, CURLOPT_HTTPHEADER,'Content-Type: application/json');
**Replace with::**
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
TRY THIS KUDOS!